In particular, it feels a bit like a waste of coding space to always use unit ones.
In particular, it feels a bit like a waste of coding space to always use unit ones.
https://en.wikipedia.org/wiki/Gimbal_lock
Because matrix multiplication is not commutative, you can't easily compose a matrix representing rotation around an arbitrary axis from "component rotation matrices".
With quaternions/clifford algebras, you can say "here's the vector I want to rotate about and here's this is how much I want to rotate", and it just magically works.
Normally in 3d space you will have to construct quaternions for rotations along yaw, pitch and roll, and then take their product to get the quaternion of the orientation of the rigid body.
That is, when using quaternions to describe orientations,we are actually describing the rotations done to bring the body from its default orientation to its present orientation.
Is this not just using Euler angles via quaternions? If I understand correctly, tracking rotation via yaw, pitch, and roll will still run into issues of gimbal lock because it's the same parameterization just using quaternions.
https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matri...
I guess it doesn't matter if you're doing everything on the computer, but it's pretty cool that with quarternions you can immediately see the composite rotation's axis and angle without any extra work!
Gimbal lock is no problem of rotation matrices but of euler angles. Just look up the wikipedia page you posted: "The problem of gimbal lock appears when one uses Euler angles in applied mathematics"
You can represent any (any!) rotation with rotation matrices.
Quaternions are neither commutative. Fortunately you don't need commutativity to build up arbitrary rotations.
0° -> 90° -> 180° -> 270° -> X
and you want to return to the original state. Well, you can do that either by continuing to rotate in the same direction, corresponding to X=360° or by going back along the path you came corresponding to X=0°. These alternatives are unrepresentable in a single cover. (For angles you also have X=-360°, 720°, etc. corresponding to making any number of revolutions in either direction before coming to rest at the desired target, which if you think is weird makes quaternions an even better chart on SO(3) than angles are on SO(2)).Of course, the same problem exists for angles in SO(2), and from what I've seen people usually deal with that by using the [sin, cos] pair instead.
http://paulbourke.net/fractals/quatjulia/
Apparently there's also an application in multiantenna radio transmission: http://www.ece.ualberta.ca/~hcdc/Library/StCommClass/Hugh00....