3 ms·
I 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 a
by fanf2 5y ago
I 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).
- wrnr 5y agoSomething like that exists in C++ and Rust: * https://www.jeremyong.com/klein/ https://www.jeremyong.com/klein/ * https://github.com/wrnrlr/g3 https://github.com/wrnrlr/g3