News for hackers. Stuff that matters.
Re:How Quaternions encode rotations: derivation and sample code by lloeki on Wednesday September 07, 2016 @10:54AM (#12443886)
Unfortunately you got it wrong, and your AAA example shows it very well.

Just as in 2d with a complex, in 3d you can encode rotations with a 3d vector. The problem is that to reach any point from any other arbitrary point you can't use a single rotation, but a combination of two, sometimes three. Think about how your AAA gun operates or FPS viewpoint controls. Thus you start to use rotations along the three axes of a base which gives you a typical rotation matrix.

As soon as you start to compose rotations along axes you introduce a terrible phenomenon known as gimbal locking, where discontinuities appear especially near north and south poles.

And so, just as a 2D rotation in a plane can be represented by a vector orthogonal to that plane (i.e in a space outside the plane), the gimbal lock and all artifacts that are cumbersome when constraining ourselves in 3D can be dealt with by going up a dimension... Hence quaternions which encode+ a rotation by putting an arbitrary but well chosen axis and an amplitude in a space grown othrogonally to our 3D space.

+ Or isomorohically so

There are no comments on this comment yet.