On the Subject of Calculating the Anchor Sphere

This manual contains reworded instructions on how to calculate the anchor sphere starting from the point when the transformation matrix is acquired. The example will contain 6 dimensions and 3 global transformations. Use this alongside the original manual.

If there are no transformations at all (the cube doesn't move), the anchor sphere is at the point where all axes are negative.

Subtransformations

Let the example matrix be the following:

X Y Z W V U
1 -Z -Y V W -X U
2 X -Y -U W -V Z
3 -X -V -Z U -W -Y

For each of the 3 global transformations create loops of axis transformations (you can start at any):

  1. (X -> -Z, Z -> V, V -> -X); (Y -> -Y); (W -> W); (U -> U)
  2. (Z -> -U, U -> Z); (X -> X); (Y -> -Y); (W -> W); (V -> -V)
  3. (Y -> -V, V -> -W, W -> U, U -> -Y); (X -> -X); (Z -> -Z)

Get rid of positive self-to-self axis transformations, in each loop disregard the first axis of each transformation, reverse and concatenate the resulting sequences (which will be called subtransformations):

  1. -X+V-Z; -Y
  2. +Z-U; -Y; -V
  3. -Y+U-W-V; -X; -Z

Note: one-axis subtransformations (-Y; -Y; -V; -X; -Z from the example) are called reflections.

Primary values

Within each subtransformation take all possible pairs of adjacent (including last then first) axes, look up each pair in the primary values table (row first, column second) and multiply by -1 if exactly one axis in the pair is negative. DO NOT multiply by -1 the values of reflections. Each subtransformation should end up with quantity of values equal to number of axes involved.

    • -X+V-Z > -X+V; +V-Z; -Z-X > -8, -6, 9
    • -Y > -Y-Y > 3
    • +Z-U > +Z-U; -U+Z > -7, -4
    • -Y > -Y-Y > 3
    • -V > -V-V > 9
    • -Y+U-W-V > -Y+U; +U-W; -W-V; -V-Y > -9, -9, 8, 3
    • -X > -X-X > 1
    • -Z > -Z-Z > 4

Within each global transformation take the absolute value of the sum of all values and then modulo 2^n, where n is the number of axes (if there are no values, this sum is 0):

  1. |(-8) + (-6) + 9 + 3| % 64 = 2
  2. |(-7) + (-4) + 3 + 9| % 64 = 1
  3. |(-9) + (-9) + 8 + 3 + 1 + 4| % 64 = 2

Convert results into binary with number of bits equal to n:

  1. 2 = 000010
  2. 1 = 000001
  3. 2 = 000010

These binary strings are associated with global rotations respectively.

Anchor sphere

For each global transformation lookup which axes have which signs in the subrotations list and invert bits of this global transformation's binary string according to the "Axis <-> Position" table from the original manual:

  1. -X+V-Z, -Y -> 6th, 5th, 4th, 5th; 000010 -> 000111
  2. +Z-U; -Y; -V -> 3rd, 1st, 5th, 2nd; 000001 -> 111011
  3. -Y+U-W-V, -X, -Z -> 5th, 6th, 3rd, 2nd, 6th, 4th; 000010 -> 011100

Call resulting values a1, a2, ... an.

Create a0 (use the original manuals's algorithm on page 7):

  • 4th digits of a1, a2, a3 are 1, 0, 1 -> a0 = 110011

Convert all ai excluding a0 from gray code to binary.

To convert from gray code to binary, set the first bit of binary equal to the first bit of gray code, the subsequent bits are as follows: binary[i] = binary[i-1] XOR grayCode[i].

  1. 000111 -> 000101
  2. 111011 -> 101101
  3. 011100 -> 010111

XOR a0 with all other ai. Replace all 0s with "-" and all 1s with "+". Assosiate the string of axes on the bottom of page 7 of the original manual with the result. This is the position of the anchor sphere.

  • 110011 XOR 000101 XOR 101101 XOR 010111 = 001100 -> --++-- (XYZWVU) -> anchor sphere = -X-Y+Z+W-V-U