I’ve been looking into double quaternions and the belt-trick. The trick also known as the ‘waiter trick’ allows a rotation with respect to axis order, to rotate from -360 to 360 – full 720 degrees of twist. This alone wont work in a rig and needs additional support for the identity matrix and a feasable way to produce (t) the tracking value along the surface of the hypersphere, between each frame (frenet).

Possible ways to achieve the (t) value of the Dirac algorithm is to use a simple slider from a range of 0 – 2Pi. This is a simple solution but takes away controllability to the animator – essentially we need to derive the value from the controls themselves.

Ive been looking into fourier waves and the sawtooth wave, its amplitude and frequency can both be accurately achieved with the phase offset being directly linked to the (t) of the belt trick.

Passing the output of the belt-trick is a simple process of converting the quat to eulerangles. But deriving the t value is a lot more tricker, due mainly to the hemispherical problem of quaternions. A quaternion [v,w] is a vector and a twist on the surface of two 4d hemispheres, where abouts a transform travels across the hemispheres is Slerp.

What can happen is that if the vector crosses the equator of the hemispheres a 180 degree flip can happen – this is entirely correct but tricky to send to a fn as it keeps flipping. If we take the transform of two objects ‘a’ and ‘b’ with us storing the transform of ‘a’ relatively to ‘b’ as a script_function we can get the constantly updating angle of the transform.

But once we hit 180 degree’s it’ll flip and the transform will reverse – one way to fix this is to reset the transform space when we pass 180. Essentially resetting the rotation of of the transform: 0 -180, 0-180 – a sawtooth wave. A problem with this is rotating backwards.

We need a way of dialing up the transform space rotation, up and down and then feed this in the quat fn.

### Like this:

Like Loading...

*Related*