3 ms·
>Is there an easy explanation of what problems quaternions solve? Sure. Unit quaternions form a double-cover of SO(3). In other words, you can encode a rotati
by romwell 8y ago
>Is there an easy explanation of what problems quaternions solve?
Sure. Unit quaternions form a double-cover of SO(3).
In other words, you can encode a rotation of a 3-dimensional object with a single unit quaternion.
But wait, there's more! You could do the same with a matrix, or a triple of angles. Why not do that?
Answer: interpolation. The "natural" way you want to go from one rotation to another corresponds to exponentiation of quaternions. If you linearly interpolate matrices, the intermediate steps will do something nasty: they won't even be rotations!
The natural way to implement the Arcball interface for rotations is using quaternions. Here[1], I have implemented it in ProcessingJS and wrote up the math behind it.
Quaternions (like complex numbers) can do other things too, but this alone is a good start. Also gives you intuition why they aren't commutative: because rotations in 3-space aren't.
TL;DR: Unit complex numbers = rotations of plane. Unit quaternions = rotations of 3-space.
PS: you shouldn't think of complex numbers as the solution to the problem of "taking the square root of -1". Think of them as "how can I multiply/divide a 2D vector by another 2D vector?" - there's only one way to do it sanely (multiply/divide lengths, add/subtract angles). This is what the complex numbers are.
Hamilton was trying to solve the same problem in 3D, and couldn't (turns out, it is not possible[2]), but solved it in 4 dimensions, and later found many applications for them.
[1] http://www.math.tamu.edu/~romwell/arcball_js/index.html http://www.math.tamu.edu/~romwell/arcball_js/index.html
[2] https://en.wikipedia.org/wiki/Frobenius_theorem_(real_division_algebras) https://en.wikipedia.org/wiki/Frobenius_theorem_(real_divisi...
- throwawaymath 8y agoIn my opinion this is the best answer, because it neatly explains why quaternions are more useful than vectors for rotation. Vectors are "nicer" because they generalize to arbitrary dimensions. But quaternions handle 3-dimensional rotations in (essentially) a single step. The point about interpolation is really important, because all the machinery offered by vectors becomes a burden. It's also good to think about complex numbers in the way described here because it neatly abstracts the concept of numbers and maps them to a form of dimensionality. Great comment all around.