8 ms·
In my opinion, Geometric Algebra and bivectors (https://bivector.net https://bivector.net) in particular is a much better (both practically and pedagogically) a
by newpavlov 5y ago
In my opinion, Geometric Algebra and bivectors (https://bivector.net https://bivector.net) in particular is a much better (both practically and pedagogically) approach compared to quaternions and significantly more elegant. It's a real shame that people continue to focus so much on quaternions in this day and age.
- kilovoltaire 5y agoCame here to say this! I always felt like quaternions weren't a perfect fit for 3d rotation, and when I finally learned about bivectors my faith in the elegance of mathematics was restored :D I liked this article: https://marctenbosch.com/quaternions/ https://marctenbosch.com/quaternions/
- the__alchemist 5y ago> Why does i2=j2=k2=−1 and ij=k? Why do we take a vector and upgrade it to an "imaginary" vector in order to transform it, like q(xi+yj+zk)q∗? Who cares as long as it rotates vectors the right way, right? Yikes! This is the sort of thing that scares people away from complex numbers from a young age.
- deleted 5y ago[deleted]
- Twisol 5y agoAren't you doing a bit of an injustice to that article by cherry-picking that line? It's obviously written humorously; the very next words are: > Personally, I have always found it important to actually understand the things I am using. I remember learning about Cross Products and Quaternions and being confused about why they worked this way, but nobody talked about it. Later on I learned about Geometric Algebra and suddenly I could see that the questions I had were legitimate, and everything became so much clearer. Clearly, "who cares as long as" is not the true belief of the author, but rather a mocking call-out of teachers who do think that way.
- wyager 5y agoSpecifically, GA allows you to invent complex numbers, quaternions, etc. very easily instead of it taking hundreds of years. I've read linear and geometric algebra and it's amazing for linear operations. Unfortunately it gets more complex when you want to use it for nonlinear operations (such as translation) - now you need to use CGA or PGA or something. Still, seems like it would be amazing for computer graphics, physical simulation, etc. especially if someone can figure out a good strategy for efficient compilation (e.g. representing a multivector with exactly the minimal number of non-zero entries, with non-zero basis elements tracked at compile time).
- chombier 5y ago> It's a real shame that people continue to focus so much on quaternions in this day and age. No really, unit quaternions are nice because it's pretty clear they belong to a sphere, therefore you can fairly easily extend geometric methods on the usual sphere to perform filtering, averaging, interpolation etc on rotations. With GA it's not so obvious.
- ChrisLomont 5y agoGA is much slower in practice and takes more to store. In places speed and cache are important, quaternions are much better. Game engines don't need much if anything from GA (and I've written about using GA decades ago for software, and did it for some time, before realizing that trading that elegance for worse performance was not worth it). Here's [1] one example from the godfather of GA demonstrating how poorly GA performs [1] https://webspace.science.uu.nl/~kreve101/asci/GAraytracer.pdf https://webspace.science.uu.nl/~kreve101/asci/GAraytracer.pd...
- deleted 5y ago[deleted]
- fanf2 5y agoI have done some experiments with type-directed static optimization of geometric algebra, but I didn’t get far enough to find out if it would scale up to real applications. The idea was to represent in the type system which components are known to be zero, so that (for instance) the GA representation of a vector or a rotation is the same size as it would be as a traditional matrix-based linear algebra. And the type system can check that the resulting of an operation is what you expect, eg, two planes intersect in a line. So, similar optimizations to gaigen, but (I hoped) more automatic and less runtime machinery. But as I said, I didn’t get it to work.
- fault1 5y agoi've played with some libraries recently in julia that followed this strategy; https://discourse.julialang.org/t/ann-cliffordalgebras-jl/71955/ https://discourse.julialang.org/t/ann-cliffordalgebras-jl/71... and I was surprised at how high dimensionality you could go. I'd like to see a c++20 version.
- ChrisLomont 5y ago>the same size as it would be as a traditional matrix-based linear algebra You can get it that small, it's all been done, but that's far larger than a quat, which can be stored in 3 components when normalized, and in 4 for quick and easy computation. For large models and more importantly scarce GPU memory, increasing model size results in less complex models and slower computation. There really is no benefit for 3D engines I can tell (and I was early on the GA bandwagon 20ish years ago... It just has not and I suspect will never pan out due to the inefficiencies not being worth it).
- jvanderbot 5y agoQuanternions' ubiquity is relatively recent. Rotation matrices ruled supreme in games and graphics and it was only after concerted effort to abolish R's were Q's made ubiquitous. Two heartbeats later, we're bearish on Q's.
- joppy 5y agoRotation matrices are still ubiquitous even in systems which use quaternions: if you want to apply a dense linear transformation to a vector (be it a rotation or otherwise), pretty much nothing will beat (in terms of speed) a matrix-vector multiplication. For instance even if you work out the rotation matrices using quaternions, an engine will end up shipping a rotation matrix to a graphics card to actually transform the bulk of vertices in a scene.
- chadcmulligan 5y agoGA strikes me as the monad's of physics
- chombier 5y ago"Geometric Algebra is just a Clifford algebra over an Euclidean space, what's the problem?"
- joppy 5y agoQuaternions are the even part of the Clifford (aka Geometric) algebra associated to a three-dimensional space, so the connection is quite close. This case is also quite special because the quaternions form a division algebra over the real numbers, meaning that each nonzero quaternion has an inverse. Finite-dimensional real division algebras are quite rare: indeed the only ones up to isomorphism are the real numbers, complex numbers, and quaternions. Geometric algebra is great if you want to extend things to higher dimensions, or spaces with different metric signatures (the 4-dimensional spacetime for example). But quaternions should not be discounted just because they fit into a generalisation - they have many quite special properties all of their own.
- rovolo 5y agoTo be pedantic, "each nonzero quaternion has a multiplicative inverse"