On the Subject of Rule of Three

“Third time’s the charm.” -Someone who somehow miraculously survived two previous bomb explosions.

Three spheres (red, yellow, and blue) move around a 3D space. Each sphere moves to three positions in order, then repeats. After the third movement, there is a long pause before the sequence starts again.

Each position consists of three coordinates with three possible values each:

  • Left, center or right (X axis)
  • Toward you, center or away from you (Y axis)
  • Front, center or back (Z axis)

The orientation of the X, Y, and Z axes match that of The Hypercube.

For each sphere and axis:

  1. Look at the three positions during one cycle.
  2. Interpret them as a 3-digit balanced ternary number:
    • First movement = least significant digit
    • Third movement = most significant digit

Convert each 3-digit balanced ternary value to decimal.

Each sphere now has three numbers: an X value, a Y value, and a Z value. This gives the coordinates of three points in 3D space. These points form a triangle. Your goal is to find the area of that triangle.

One way to calculate the area of a triangle is provided on the next page.

Remove any decimals from the calculated area. Convert the result back to balanced ternary.

Red-1
Yellow0
Blue1

Click any sphere to begin input. Enter the balanced ternary digits starting from the least significant digit as described in the table on the right.

Input all the digits before the spheres fully shrink to disarm the module.

Calculating the area of a triangle given points in 3D space:

To find the area of the triangle, pick any one of the three points as a reference point.

  1. Subtract its coordinates from those of the other two points.
    This gives two vectors starting from the reference point.
  2. Let u be one vector and v the other.
  3. Compute this value:
    Area = 0.5 × √(A² + B² + C²)
    A = (u2 × v3 − u3 × v2)
    B = (u3 × v1 − u1 × v3)
    C = (u1 × v2 − u2 × v1)
    u = (u1, u2, u3) (the first vector)
    v = (v1, v2, v3) (the second vector)