Comment by aap_
4 days ago
He's still computing cross(z, d) and dot(z, d) separately. that looks like a code smell to me. with quaternions this would be easier: just calculate the quotient between z and d and take the square root (which means adding 1 and renormalising). the square root is necessary if one is dealing with vectors, which live in a kind of square-y space. finding the rotation between two spinors is even simpler: it's just the quotient of the the spinors as quaternions. unfortunately hamilton's view that quaternions are the quotient of vectors has never been quite abandoned. it's much more natural to think of them as quotients of spinors.
the dot/cross product are the same operation but expanded into coordinates. Maybe the quaternion (/geometric algebra) version is more compact but it's not like it's a different set of computations. Whereas their removal of the trig functions actually does skip a bunch of unnecessary steps.
> He's still computing cross(z, d) and dot(z, d) separately. that looks like a code smell to me. with quaternions ...
Fair point, but I think you misspelled Projective Geometric Algebra
If you only care about rotations in 3d, quaternions do everything you need :) with all the added benefits of having a division algebra to play with (after all the cross product is a division-algebraic operation). PGA is absolutely great, but quite a bit more complex mathematically, and its spinors are not as obvious as quaternionic ones. in addition GA is commonly taught in a very vector-brained way, but i find spinors much easier to deal with.