by Bootvis · 10y ago · 0 comments
In general the number of real numbers needed to describe a rotation is the number of rotational degrees of freedom. This number is n(n - 1) / 2 in n dimensions, or C(n, 2), basically the number of orthogonal (2-)planes of rotation in R^n.
[0] https://en.wikipedia.org/wiki/Degrees_of_freedom_(mechanics)
Similarly, when a quaternion is defined as representing a translation, that is likewise 3 degrees of freedom in 4 numbers. The four numbers would be similar to a real cartesian translation with dX, dY, dZ, and a fourth number = sqrt( dX^2 + dY^2 + dZ^2 ).
It's like the 4th number is a checksum for the other 3. You are adding a fourth number to use a more elegant mathematical calculation, which automatically keeps the dependent data relationships intact, like magic.
How do you encode translations with quaternions? Don't you need dual quaternions for that?
I think of it like this: a complex number represents a rotation in a plane. You need two "coordinates" to do that. 2d has one plane, but 3d has two planes - think about how an anti-air cannon rotates left-right and up-down. So, if we've got two rotations to represent, you must need two complex numbers - that's four "coordinates", or one quaternion.
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
Why not 3 planes?
to be completely honest, I'm not sure if this intuition is correct. But it seems to make sense
Rotations in 2D are one-dimensional. Complex numbers are two-dimensional but we fix one degree of freedom by fixing the length.
Rotations in 3D are there-dimensional. Quaternions are four-dimensional but we fix the length again.