Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main advantage of quaternions is composing rotations.

The analogy would be to 2D rotations with complex numbers. When you multiply two complex numbers, you're composing the rotations (in the 2D case: it ends up just adding the arg, or the phase angle). Likewise, multiplying two quaternions lets you compose the 3D rotations. This is a lot more efficient than multiplying two 3x3 matrices.

For intuition, quaternions are closely related to the axis-angle representation which is the same as the Lie algebra so(3).

As for acting on vectors, you can just think of different rotation parameterizations as implementations of the same abstract Rotation trait. A Rotation acts on vectors, composes, etc, in exactly the same way regardless if the underlying implementation is a matrix, a quaternion, euler vector, euler angles, gibbs vector, etc.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: