|
|
|
|
|
by hohohmm
2033 days ago
|
|
The main problem with GA is if you want a unified transformation hiearchy, geometric algebra could quickly get very complicated, as it requires projective GA to handle translation and dual-quaternion to handle non-uniform scaling. Geometry algebra appears beautiful to simple rotation cases and explains very well concepts that feel incomplete in simple vector math, but in real application for genric game engine, you can't really code up a scene graph with unified transforms in like 2 hours. Not to mention that even the GA people do not all agree with each other how to do the more advanced GA stuff(strange inversions and ext). Surprisingly very few people talk about this on Youtube with all those GA tutorial videos, and you can find scant information on the bivector site forum. In comparison, despite matrix represetntion's weaker mappng to geometric concepts, it handles everything in a more unified interface without too much complications. For that matter the GA math feels much to be desired. There probably exists a undiscovered better version of GA that handles translation and scaling better and everybody could instantly agree on. Until that day GA probably won't see much general usage. |
|
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... )