Friday, July 8, 2022

Quaternions and Anti-twisters

Anti-twisters are a motion of 3D space that allows the centre of the space to rotate continually without the rest of the space getting tangled up. If we think of the space as a number of strings or belts coming from the centre, then the word tangled makes more sense. The process is also basically the same as the belt trick, tangloids and is the topic of orientation entanglement

In this gif you can see the central cube rotating continually and the six belts attach the cube to the rest of the space, without getting tangled up. The same trick works regardless of how many strings you have:
we can think of this at its limit as the whole continuous 3D space rotating in a manner that avoids overlap. 

The method is simpler than it looks. Each frame is calculated independently: it starts with a set of radial belts (or the red band in this video), then rotates them by around the blue axis as shown. i.e. from 0 at the outer radius, up to 180 degrees in the centre.


That becomes the state of your radial belts for that frame. For the next frame the blue axis is at a new orientation in the horizontal plane, as shown.


If you look carefully at the first video, you might see that the central object rotates twice before the belts (the 3D space) returns to its start position. The same is true for quaternions, orientations are represented as a (w,x,y,z) quantity, which only returns to the same value after rotating 720 degrees. 

So is there a connection between anti-twisters and quaternions?

Looking at the first video, the overall motion is simply an extended version of the motion of the two vertical belts, which look like this:

These two '?' shaped belts rotate around the vertical axis, and also rotate around their own axis by the same (but opposite) angle. The box ends up spinning twice the angle of either individual rotation.

If we look at just the top belt, and distort it slightly then we can draw it as two of the same belt shapes, just different sizes. Here in red and green:
From the top to the bottom, the red belt rotates around the vertical axis by angle A, and around its own axis by angle -A. The green belt rotates around the vertical axis by angle A and around its own axis by angle A. The combined motion rotates the inner cube the angle 2A around the vertical axis.

Unit quaternions also rotate around two independent axes by equal angles. We could describe it in 4D but it is easier to visualise in 3D by taking the stereographic projection of the quaternion space around the w axis. In this projection the two axes of rotation are the two axes of a torus, so around the torus and around its ring (a non-straight axis). Let's make the torus's axis of symmetry vertical here, to match the anti-twister example.

A quaternion rotation of a vector v is first a right multiply vq' (the conjugate of q) which rotates the vector around the vertical axis by angle A and around its ring by angle -A:


Then a left multiply qv rotates around the vertical axis by angle A and around its ring by angle A. The result qvq' rotates an angle of 2A around the vertical axis.

So as you can see, there is some similarity between a single quaternion multiplication and the transformation applied by the green or red belt in the anti-twister motion. 

They aren't exactly the same, but it would be tempting to say that a quaternion is a representation of half the anti-twister mechanism, and quaternion multiplication qvq' is a representation of the whole anti-twister mechanism, which itself is just a way of describing the interval of 3D space between the inner and outer radius, a bijection from R3 to R3 (it wouldn't be a bijection if the belts ever overlapped).

HOWEVER, there is one problem with this identification of quaternions and anti-twisters. The anti-twister maintains a state, which is the yaw of the blue axis in the third video. The central object turns according to where the blue axis orients to, but the blue axis can only change in two dimensions, it has no effect if it twists (rotates about its own length). If you jump the blue axis to a different angle in order to modify the central rotation in any of its three possible degrees of freedom, then the belts still wouldn't tangle, but they could (probably) get an unlimited amount of stretch. 

I am not sure to what extent this is a problem with the identification. It may be that it is better to identify the quaternion with the superposition of belt configurations for all possible blue-axis orientations, or something like that. 

Some more details are given here.