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 shows where the sphere is along three directions:

  • Left or right (X axis)
  • Toward you or away from you (Y axis)
  • Front or back (Z axis)
  • Or centered along that 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 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.

Click any sphere to begin input.

Enter the balanced ternary digits starting from the least significant digit:

  • Red = -1
  • Yellow = 0
  • Blue = 1

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 the other two points.
    This gives two vectors starting from the same point.
  2. Assign one vector to the variable u.
  3. Assign the other vector to the variable v.
  4. 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)