5 ms·
I feel like there are 2 schools of thoughts on learning about quaternions: #1: This article, and the associated 3Bl1Br describe their abstract representations.
by the__alchemist 3y ago
I feel like there are 2 schools of thoughts on learning about quaternions: #1: This article, and the associated 3Bl1Br describe their abstract representations. Visualizations of 4-component imaginary structures etc. They provide a deep dive from a mathematician's perspective. If you're into this sort of thing (You probably are if you watch 3Bl1Br regularly...), it's outstanding.
#2: Quaternions as a powerful tool for representing orientations and rotations. Applicable whenever you're programming something that uses these concepts. Most common are computer graphics and robotics, but you can imagine other uses like biometrics, scientific models of molecules etc.
The visualizations you might use for type 2 are standard 2D and 3D space operations. You don't need to directly map the 4 quaternion parameters. You need these building blocks; find from a library, article, first-principles etc.
- Rotate a vector using a quaternion
- Find the quaternion that specifies the shortest rotation from one vector to another
- Find the quaternion that rotates around a given axis a given amount
- Rotate an orientation and/or composing rotations
- Find the quaternion that rotates one orientation to another
Using these building blocks (And maybe one or 2 I left out), you can do any sort of work with rotations and orientations. If you can visualize the rotations, either in your head, or with physical objects or a computer render, you won't forget the principles.
Warning: There are 2 types of quaternions (JPL and Hamilton). Every article/lib etc uses one, but they rarely annotate which! Mixing the 2 will produce incorrect results.
- ajkjk 3y agoAs far as I know those two models of quaternions are the same thing. The quaternions in these videos are (an awkward representation of) 3d rotation operators, under the correspondence i = R_yz, j = R_zx, k = R_xy (although you can assign whichever axis to whichever quaternion you want, and you can arbitrarily swap i<>-i, j<>-j, k<>-k. From googling it looks like the JPL convention is to swap k<>-k, such that ij = -k instead of ij = k).
- wiml 3y agoThis is, I think, the difference between thinking of a quaternion (or a vector!) as a collection of numbers with rules for manipulating them, and thinking of a quaternion (or a vector) as an abstract geometrical object that exists in a space and has certain properties. The fascinating thing, to me, is that for so many geometrical objects, you can start with a short list of straightforward properties, and show that they exactly correspond to the collection-of-numbers concept over an arbitrary basis. Oftentimes, if you want to do something to the stuff on your screen, if you can describe it in terms of the abstract objects with no reference to the basis, you can then transliterate that to operations on a bunch of floats in a way that is simpler and more robust than working with the floats from the beginning.
- lqr 3y agoFor simple applications there's no need to learn about quaternions at all. There could be a library type called Rotation3D or something. You should never need to know which representation it uses. The important part is to know Euler angles are bad ;) But once you get into something more sophisticated like using rotations in a dynamical system, statistical filtering, optimizing a rotation, etc., the abstractions begin to leak.
- lamontcg 3y agoYeah, I worry that people who just want to use quaternions to make video games will get discouraged that they can't master the content in this kind of webpage and their good old imposter syndrome will kick in hard. When all they really need to do is play around with with the black-box approach to quaternions and just treat them as magical and better "rotation matricies".