How to derive the Log and Exp functions of a Geometric Algebra Rotor for Spherical Interpolation (Slerp) in 4D

74 Views Asked by At

I am trying to create a Slerp function between two 4D Rotors

Rotor Slerp(Rotor a, Rotor b, t) { ... }

I have been told you can do an interpolation using Log and Exp functions to scale the bivector by the angle of rotation, scale it with t, and then turn the bivector back into the rotor.

Rotor difference = a.Reverse * b;
Rotor interpolatedRotor = a * Exp(t * Log(difference));

where Exp takes a 4D Bivector and returns a 4D Rotor, and Log takes a 4D Rotor and returns a 4D Bivector.

I was directed to this notebook, but it is riddled with divide by zeros errors, sqrt of negatives and unclamped ASin functions leading to a bunch of NaN values, but on top of that I don't understand what it is the code is actually doing. I tried to put logic in place to account for all the problems, but the Slerp does not actually do what it is supposed to do.

I could really use a hand helping me break down the Log and Exp functions with respect to the components of a Rotor and the components of a Bivector, and if it is something that is different for different dimensions, then answers that focus on 4D would be great.

Thanks for the help!