6 ms·
The reason this works is often skipped in computationally oriented writeups: Rotations of 3-dimensional real space form the topological group SO(3). Naive para
by gspr 5y ago
The reason this works is often skipped in computationally oriented writeups:
Rotations of 3-dimensional real space form the topological group SO(3). Naive parameterizations of that group do not form a cover [1], but the group of norm-1 quaterinons, Spin(3), does.
The failure of naive parameterizations, like the Euler angles, to be a cover manifests itself as gimbal lock.
[1] https://en.wikipedia.org/wiki/Covering_space https://en.wikipedia.org/wiki/Covering_space
- quietbritishjim 5y agoYou're definitely right to bring up Gimbal lock [1] One of the benefits of knowing about it is to know when it doesn't matter to you. In that case, you can just use Euler angles, as you say. If you just need to express a rotation in terms of three angles, or convert back from three angles (e.g. yaw/pitch/roll [2]) to a rotation matrix, then you don't need to know about quartertonians at all. [1] https://en.wikipedia.org/wiki/Gimbal_lock https://en.wikipedia.org/wiki/Gimbal_lock [2] https://en.wikipedia.org/wiki/Aircraft_principal_axes https://en.wikipedia.org/wiki/Aircraft_principal_axes
- gspr 5y agoEven in this case you need to take care of the action of rotations on points near the poles, don't you? (I don't remember, it's been a long time since I did such calculations). But yes, otherwise I agree with you.
- gilbetron 5y agoIf you are going to apply 3 angles directly, then you run into problems (specifically, if you pitch +/- 90 degrees, then roll and yaw become the same thing, aka gimbal lock). If you take those 3 angles and convert them to a matrix, and use that matrix to apply the angles, you're all good. You can then even take the new matrix and pull 3 angles out of that.
- toxik 5y ago… and those three angles will be discontinuous at the poles.
- GolDDranks 5y agoHere's a similar argument from my naive, intuition-based perspective: It's important to remember that the the group of rotations in 3d space is represented by _unit_ quaternions. This is a subset of the full 4d quaternion space: a spherical shell around the origin, like the skin of a 3d ball but in 4d. A 3d ball has a 2d, "flat" skin that is "spherically" symmetric. A 4d ball has a 3d, "volumetric" skin that is, similarly, "spherically" symmetric. If we are stuck to that 3d skin, it makes perfect sense that it manages to represent rotations in 3d, which have 3 degrees of freedom and spherical symmetry. The space of rotations that is formed by this "skin" has two special points: the point where all the imaginary coordinates are zero and the real coordinate is one, and it's dual, the negative one, precisely because we are talking about _unit_ quaternions. (Similarly as there is only two "purely x" points in a unit circle: (1, 0) and (-1, 0)). These points represent the identity rotation, i.e. "don't rotate at all". This makes sense, if you think how complex numbers work: the effect of multiplying "one" is that it keeps everything as-is, whereas every other "unit" complex number has a rotating effect. Then as you think the three imaginary dimensions as degrees of freedoms you can start traveling into, from this neutral point, you get all kinds of rotations. The geometry of the "round", "skin-shaped" space ensures that the rotations wrap around the correct way, "spherically". Especially that after you have travelled "tau" (2 times pi) units, you are again in purely "real", "not rotated" state. And the spherical symmetry means that this works similarly in _any_ direction you can travel to. The only gotcha is that the unit quaternion space contains doubly the space of minimal 3d rotations, because of the negative number symmetry. There's some good arguments why this is especially beautiful and true, but they are a bit beyond me.
- hanche 5y agoThere is a nice experiment you can do, illustrating this: Hold a glass of water in the palm of your hand. Not too full, especially not until you get the hang of the following move: Assuming you use your right hand, rotate your hand counterclockwise. At first, your hand goes under your arm, until it has rotated about 270 degrees or so. You can now continue that rotation, but you have to lift your hand up, so it is now above the arm. Keep going, and you end up where you started, but the glass has done two full revolutions. Hopefully without spilling an water (takes practice). The fun thing is, after just one revolution, your arm is twisted into a really uncomfortable configuration. The mathematical explanation is that SO(3) is doubly connected, whereas the unit quaternions, like any sphere, is simply connected. At any time, each part of your arm has undergone some rotation from the orientation at rest. Halfway through the move, as you travel from the shoulder down to the hand, this rotation starts at the identity, and changes continuously through one rotation, back to the identity once more. But in the unit quaternions, that path takes you from one pole to the opposite pole. This explains why you can’t untwist your arm. Sorry if that made no sense. Edit: Have a look at “Your palm is a spinor” [1], and then at this Phillipine* tradtional dance [2] about 40 seconds in. I knew I had written about this before [3]. [1] https://www.youtube.com/watch?v=fTlbVLGBm3Q https://www.youtube.com/watch?v=fTlbVLGBm3Q [2] https://www.youtube.com/watch?v=mOO_IQznZCQ https://www.youtube.com/watch?v=mOO_IQznZCQ [3] https://math.stackexchange.com/a/383549 https://math.stackexchange.com/a/383549 * I wrote Thai originally.
- imadr 5y agoHow far into algebra do you need to get to understand "Rotations of 3-dimensional real space form the topological group SO(3)"? I kinda understand that norm-1 quaternions map to rotations in 3D space somehow but I can't prove it myself. What kind of curriculum do I need to follow to really grasp this?
- gspr 5y agoTo understand the definitions and apply them in practice, a first course in group theory + a basic understanding of vector calculus suffices. To add the adjective "topology", the first parts of a general topology course is enough. To truly appreciate groups like SO(3), a course in differential geometry and differential topology is useful. Edit: This is all assuming you have no background in mathematics (or, alternatively, physics) at all. If you do, a targeted text can teach you these concepts in a few pages.
- billfruit 5y agoThe thing is group theory is taught in an incredibly abstract manner, its hard to find any motivating application for it, or any problems it helps us solve. Also terminology/definitions are vague too, whether a vector has an endpoint or it something unachored in space is itself not clear from many treatments.
- gspr 5y ago> The thing is group theory is taught in an incredibly abstract manner, its hard to find any motivating application for it, or any problems it helps us solve. Mathematics is abstractly defined. But for basic group theory there's a plentitude of very concrete examples to rely on. > Also terminology/definitions are vague too, Absolutely not. There is no vagueness at all! Everything is completely well-defined in most introductory textbooks/courses (or you can even read the precise definitions on Wikipedia, which is often not the case). > whether a vector has an endpoint or it something unachored in space is itself not clear from many treatments. Vectors do not have endpoints. Vectors are not anchored. Vectors are elements of vector spaces. Vector spaces are completely clearly defined.
- rnhmjoj 5y agoTechnically the unit quaterions are not Spin(3), but only isomorphic to it, they are properly Sp(1) = GL(1, H). It's all fuzzy because the low dimensional classical groups are all isomorphic to each other: SU(2) ~ Sp(1) ~ Spin(3).
- gspr 5y agoIndeed.
- jacobolus 5y agoThis seems extraordinarily nitpicky. Like saying that unit complex numbers are technically not the group of plane rotations about a fixed point, but only isomorphic to it. Or for that matter like saying that the "real number line" is technically not a line, but only isomorphic to one.
- rnhmjoj 5y agoWell yeah, it is. The point I wanted to make is that these isomorphism are "exceptional"[1] and only hold for the lower dimensional groups. The general Spin group and quaterions are very different objects. [1]: https://en.wikipedia.org/wiki/Exceptional_isomorphism https://en.wikipedia.org/wiki/Exceptional_isomorphism
- joppy 5y agoThat really depends on how you define Spin(3), for example some would define it as the compact simply-connected Lie group of a certain type, at which point the unit quaternions model of Spin(3) is as good as any other.
- tobinfricke 5y ago> Technically X is not Y, but only isomorphic to it Not sure this is a useful argument. If two structures are isomorphic, there is no way to tell them apart. If you can't tell them apart - maybe they are the same thing.
- nick__m 5y ago
- hanche 5y agoI know what you mean, but I would hesitate to call Euler angles naïve. ;-)
- an1sotropy 5y agoSpeaking of gimbal lock - it was a real (as opposed to only theoretical/mathematical) concern for navigation during the Apollo 11 moon landing [1]. Euler angles are fugly and annoying. Quarternions are clean and refreshing. [1] https://apollo11space.com/apollo-and-gimbal-lock/ https://apollo11space.com/apollo-and-gimbal-lock/
- blovescoffee 5y agoThis is really interesting. Why does the failure of naive parameterizations to form a cover imply a group with gimbal lock? I'm unclear on how a cover is linked to gimbal lock. I've taken undergrad topology and algebra if you could explain in those terms (I understand what a covering is).
- bollu 5y agoDo correct me if I'm wrong: I thought Spin(3) was a double cover, with the quaternions being one sheet of the covering, that of the connected component of the identity?!