enkimute
and ofcourse the go-to reference https://bivector.net
or join 1000+ profs, researchers and enthusiasts on the bivector discord here https://discord.gg/vGY6pPk
If you rotate around just one axis, the Lie algebra feels just like Euler angles .. in fact its exactly the same thing, but if you rotate around more than one .. it keeps working intuitively and usably - Euler angles absolutely do not.
There is also a writeup called 'may the forque be with you' available on bivector.net
It has the dual quaternions as even subalgebra (in 3D), and unifies all linear and angular aspects. It leads to remarkable new insights, as removing the need for force-couples (pure angular acceleration is caused by pushing along a line at infinity), while pure linear acceleration is caused by forces along lines through the center of mass.
These geometric ideas are independent of dimension - forces, both angular and linear are always lines. The treatment of inertia becomes a duality map, and things like Steiners theorem are not needed at all.
On top of this, the separation of the metric that sets GA apart means that this formulation of rigid body dynamics works not only in flat Euclidean space, but unmodified in the Spherical and Hyperbolic geometries. (by a simple change of metric of the projective dimension).
For a (graphics/game programmer oriented) tutorial on this see https://www.youtube.com/watch?v=pq9YfdPHhIo&ab_channel=Bivec...
Additionally the GA formalism enables closed form solutions for the exponential map for all bivector algebras. (see 'Graded symmetry Groups' https://www.researchgate.net/publication/353116859_Graded_Sy...).
https://www.youtube.com/watch?v=UzEytSmwEpk&ab_channel=probi...
The 'generated by' in that sentence is referring to the code generation - not the mathematical generators. I'll change 'algebra' to 'algebra implementation' to make that more clear. (I figured the very sentence 'an algebra generated by ganja.js' disambiguates the interpretation, but I'm happy to stand corrected.)
Ganja can create numerical implementations for a wide range of algebras (not just 'a certain algebra'), including any associative algebra (you can give it a Cayley table), although the focus is on Clifford Algebras, and providing the ability to stay close to the mathematical syntax. In order to do that it provides operator overloading, algebraic literals, etc .. (all features that do not natively exist in javascript). Because it is not 'a certain algebra', but a wide range, for which the code is only generated at runtime - it seemed a reasonable way of describing what is going on.
Thanks for letting me know it confused you - will fix it right away!
Consider for example R_(2,0,1) in both scenarios.
Using Geometric Product as Group Composition
e1 = reflection w.r.t. x=0 axis
e2 = reflection w.r.t. y=0 axis
e12 = reflection w.r.t. y=0 axis followed by reflection w.r.t. x=0 axis
= 180 rotation around origin.
Using Anti-Geometric Product as Group Composition e1 = not a group element, because anti-norm is zero.
e2 = not a group element, because anti-norm is zero.
e12 = not a group element, because anti-norm is zero.
So to get the same behavior you need the following elements when using the Anti-Geometric product as composition e02 = reflection w.r.t. x=0 axis
e01 = reflection w.r.t. y=0 axis
e0 = reflection w.r.t. y=0 axis followed by reflection w.r.t. x=0 axis
= 180 rotation around origin.
So choosing the geometric anti-product as group composition operator is possible, but imho breaks the readability of your transformations completely.All I can say is that I hope that those linked articles do not give people an excuse to not consider the model in which vectors, grade-1 elements, are reflections. This is the true half of the picture that is new and being missed.
Linear equations form a linear space, you can add them and multiply them with scalars. (creating things called line-pencils, plane-bundles etc .. classic projective geometry). Hence you call the grade-1 elements of the graded version of such a linear space 'vectors'. (just like you can make vector spaces with functions or all other sorts of objects).
So the reflection formula from GA in general, which is to reflect an arbitrary element X w.r.t. a grade-1 element a :
-aXa
is simply to be read as reflecting the object 'X' in the plane (3D) or line (2D) or sphere (3D CGA) or circle (2D CGA) 'a'.
Such a reflection should modify all other reflections, except for itself (where it should only flip orientation) :
-aaa = -a
It is easy to verify that this holds for general Euclidean planes written as homogeneous linear equations in their grade-1 element form. And from that everything else follows. (composition of reflections gives you rotations/translations (leaving points invariant in 2D), etc).
Planes being grade 1 elements in no way implies characterizing them by a normal vector.
Anthony Lasenby, professor astrophysics and cosmology at Cambridge, is also absolutely still actively researching and publishing, all in the mindset of the GA4Physicists book. (See a recent (feb 2020) lecture of him here : https://www.youtube.com/watch?v=x7eLEtmq6PY&t=7s )
(GA4P is considered one of the few comprehensive and up to date treatments of geometric algebra, not just in physics).
Algebraically we can always use the Hodge dual and its inverse to move to/from k-vectors from/to n-k vectors.
Geometrically we can always say two points define a line or two lines define a point.
Group Theory - here we can't swap. Two reflections make a rotation but two rotations do not make a reflection. So reflections are 'naturally' grade 1.
If you want everything to fit intuitively together, you want reflections to be grade 1, and by consequence hyperplanes (lines in 2D, planes in 3D, etc) to be grade 1 (i.e. vectors).
Doing it the other way around is possible but will be more verbose and less intuitive. (also with 'reflections' as natural grade 1 elements, the move from Euclidean to Conformal becomes trivial, simply reflect in (hyper)spheres instead, in this space it is also easier to see that the two approaches are not equivalent, it is natural to say that (in 2D) the 'meet' of two circles is a point pair, but not that the 'join' of two points is a point pair. (why would it not be a line just like in PGA?)).
Imho, one should learn to appreciate both halves of the picture, as for each specific problem one of them might be more natural. (for the popular Euclidean group and its associated geometry this view we're not used to may very well be more intuitive one, imho).
For other subgroups GA reps will also exist. (like e.g. if one wants to include projective transformations as versors, that would be the projective group (which preserves the cross ratio of 4 points), and has a GA representation in R3,3).
These spaces quickly become so big that efficient numerical implementations (while not impossible with enough symbolic work at compilation time, see e.g. https://www.jeremyong.com/gal/) are difficult. Other advantages of GA do of course remain.
The rich structure of GA (that ultimately follows from just one axiom extra) unifies a wide range of concepts and theories. Considering just one application, or one link, puts one at risk of arriving at a model that breaks these connections to other parts of mathematics. It seems unfair to expect to understand the why without considering the connections to Lie Groups, their associated geometries, differential forms, etc.
That said, I have some unpublished examples displaying and processing bvh (mocap) files that I'll try to cleanup and put online.
> Also is it possible to collapse a series of such transforms in a single versor like you can do with matrices without going into dual quaternion stuff? In generic game developemnt, translation, rotation, and non-uniform scaling are all extremely basic things that cannot be handwaved away or "too big".
Versors combine just like matrices (using just the ordinary product). (doing this for translations/rotations _are_ the dual quaternions, but you don't have to (and imho shouldn't) call them that.). Non-uniform scaling along your scenegraph (as opposed to in the beginning (object space) or at the end (view space)) is usually frowned upon in professional game development. (it makes it impossible to correct matrices using Gramm-Shmidt, and adds a lot of complexity to things like tracing hit rays etc).
> Also, why the need o a dual(e12, e02, e01) to represent a point when in vector it's just a (e0, e1, e2). This is just counterinuitive. This is what I mean by "quickly gets complicated" and it feels nearly as opaque as cross product in vector math.
This is because geometry and group theory are intricately connected. When you use matrices, you represent elements with vectors and transformations with matrices - they're separate things. In Geometric Algebra, every element also _is_ a transformation. (a plane represents a reflection in that plane, a line represents a 180 degree rotation around that line, a point represents a point reflection in that point). So now there is a strong link. Whatever you use to represent reflections should also represent planes, same for rotations/translations and lines, or point reflections and points.
It is in fact very intuitive and simple, its just different from what you're used to. For example, in 2D, given a point at euclidean position (3,4), here are the two mindsets:
* classic : it is a sum of three times the 'x' vector and 4 times the 'y' vector. (and actually than add in '1' homogeneous vector). '3x + 4y + w' (in memory : 3,4,1 )
* GA : (3,4) is a system of equations. Namely 'x=3' and 'y=4', or homogeneously : 'x-3=0' and 'y-4=0'. Such homogeneous linear equations are lines (in 2D), and represented by vectors : 'e1-3e0' and 'e2-4e0', solving such a system of equations is just the outer product: '(e1-3e0) ^ (e2 - 4e0) = 3e20 + 4e01 + e12'. (in memory : 3,4,1)
so because it is on the bivector basis, this element (3e20 + 4e01 + e12) now represents both the point at (3,4) as well as a rotation of 180 degrees around that point. Just like the line (e1-3*e0) represents both the line `x=3` as well as a reflection w.r.t. that line. For the same reason the product of two lines will give you the rotation or translation between them and the product of two points will always give you the translation.
So I'd argue its a lot more intuitive, don't factor out the time it took you to find the linear algebra approach intuitive.
Its geometric product between motors is the equivalent of the 4x4 matrix product.
Although the basic computational complexity tells the story :
4x4 matrix product : 16 floats storage, 64 multiplies, 48 additions.
3D PGA versor product : 8 floats storage, 48 multiplies, 40 additions.
- no closed form exponential/logarithm (i.e. cant interpolate)
- no numerical stability for subgroups (i.e. need Gramm-Shmidt, SVD)
- no covariant transformations (i.e. need adjugate to transform axial vectors)
- no geometric construction. (e.g. in GA product of two elements is (square of) versor between them)
- costly inverses (just some sign swaps in GA)
https://enkimute.github.io/ganja.js/examples/coffeeshop.html
Setting up a unified transformation hierarchy is actually very easy, and again not really different from how you would approach it with matrices. (plus, its more performant). Simply swap the matrix with the appropriate versor.
Which (versors or matrices) are appropriate depends on the symmetry group you are interested in :
Orthogonal Group (just rotations : distance + origin preserving) in d dimensions -> use the geometric algebra R_d. (classically : complex numbers, quaternions)
Lorentz Group (rotations + boosts : spacetime distance + origin preserving) in d space dimensions and 1 time dimension -> use the geometric algebra R_{d,1}. (classically : Lorentz transformations)
Euclidean Group (translations + rotations : distance preserving) in d dimensions -> use the geometric algebra R_{d,0,1}. (classically : planar quaternions, dual quaternions)
Conformal Group (translations + rotations + dilations : angle preserving) -> use the geometric algebra R_{d+1,1}. (classically : linear fractional transformations)
General Linear Group (translations + rotations + sheering + ... : preserves parallelism/incidence) : use d+1 x d+1 matrices.
Working in a symmetry group that is 'to big' comes at a cost - both in algorithmic complexity as well as numerical precision. If you only want translations/rotations, but are using matrices you'll have to resort to things like Gramm-Shmidt or SVD to re-orthogonalize your matrices after doing numerical calculations. (you have to project it back to the solution manifold in math terms - this is almost never trivial and often impossible).
(for those interested, I explain this in-depth in my GAME2020 talk : https://www.youtube.com/watch?v=ichOiuBoBoQ&ab_channel=Bivec... )
Prof. Anthony Lasenby (Cambridge) Geometric Algebra as New Language for Physics
Framing it in terms of vectors/bivectors is what allows us to quantify these ideas. (i.e. have to write down your planes/lines/points with numbers at some point).
But you got the essence! The abstract/coordinate free/geometric/group theory ways of thinking about this are most insightful.
So in PGA, vectors are reflections, other isometries are combinations of reflections, and the geometry are the associated invariants. (including planes, lines, points and screw axi).
A fun extension is to replace the reflection by an inversion (reflection in a sphere). Vectors now become inversions (leaving spheres invariant), the rotors become the conformal group (composition of two inversions), leaving circles invariant, etc .. the corresponding Clifford Algebra is CGA (R(4,1), with a proper parametrisation).