Let's talk about geometric algebra for a moment. I want to clarify some points, and also indicate why you might want to learn it 👇👇
By "algebra," what is meant is that you have "numbers" which you can add, subtract, multiply and divide in ways that make sense. These operations compose, and produced well defined results that stay inside the set of "numbers" as you've defined it
The benefit is that once you've defined how the operations work for a set of fundamental numbers, you can systematically build up the entire set of numbers from those operations, and implement the computation with algorithms.
A good example of this is the polynomial algebra. Once you have a basis, after you define addition/subtraction/mul/div for that basis, and now you write a program that performs those operations, and bam, computer algebra system for symbolic polynomial algebra.
What does this look like for geometry? Well, we need to define our "elements" in the algebra, as well as the operations. If you're used to vector algebra, the operation you may be used to is the "dot product" or the "cross product"
It turns out, neither of those are great ideas for building out the geometry of space, because we can't produce rotations or translations. We need something more fundamental, and it turns out the *reflection* is the perfect building block.
The reflection is composable. Take two reflections and you can produce any rotation OR translation (consider two parallel reflections). Take three and you get a roto-reflection (translation + reflection). Take 4 and you're back to the rotations again
In other words, if we take our set of numbers to be the set of all reflections in space, we can produce a well defined algebra that defines every isometry of space. This is the driving point of geometric algebra!
Instead of having one-off equations for rotations, reflections, translations, that either don't compose well or have *too many* degrees of freedom (as in matrix formulations), let's pare it back to the minimal operation (the reflection), and build up from there
The quaternion actually shows up *within* the geometric algebra as the product of two reflections! The dual-quaternion *also* shows up as the product of two reflections! They should not be understood in terms of weird 4D manifolds or hyperspheres, but as compositions
As elements in the algebra that were formed by transforming space (built on reflecting the space around), you can transform any element that lives in that space without any special cases (e.g. no need for inverse-transpose xforms for your normal vectors)
Furthermore, these elements form a continuous group. If you shift reflections around in your composition, you can smoothly change a rotation into a translation and back. This is why you can blend them smoothly (which you cannot do with matrices).
None of the above touches on the "mechanics" of geometric algebra which explains the algebraic details of the geometric product and all the other operations. This is just a "why would you want to" and it goes beyond just an "easier to understand quaternion."
If you could represent a plane, a line, and a point within this algebra, you would get all those geometric transforms for free. And it turns out, you can! An awesome insight from @enkimute is that a reflection and a plane are in fact one and the same.
That is, a plane is simply the set of points that are invariant after a reflection. Similarly, a line is the set of points invariant upon rotation, and a point is the point invariant upon 3 reflections.
This means that to transform any of these primitives, you simply transform the action they correspond to. There is no difference. Rotation a reflection around, rotating a plane around, same thing.
Seen in this light, a quaternion can be thought of as a representing equivalently a *line* in space with a certain weight associated with its rotation. We can sandwich one quaternion with another to "rotate that line" without any issue.
We can also infer other operations like applying a reflection to a quaternion, or rotating a reflection etc. Once you have the basic building blocks, you don't need special formulae for all these things. It just falls out of the algebra
The topic is fairly deep, and I can't really do it justice in a twitter thread. To learn more, check out the Geometric Algebra for Computer Science book by Leo Dorst, this talk from @enkimute and if you want to see some code, I have a library in my profile
Just remember, don't think about geometry as "things that occupy physical space." Starting with this definition is backwards because it doesn't define any operation/action, which is the cornerstone of how an algebra or group is built.
You can follow @m_ninepoints.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: