4 ms·
Right. uhm. glad to get the blood flowing ;) Ganja.js is a personal project that got quite out of hand. Its primary goal was to lower the threshold for people
by enkimute 7y ago
Right. uhm. glad to get the blood flowing ;)
Ganja.js is a personal project that got quite out of hand. Its primary goal was to lower the threshold for people to discover Geometric Algebra through examples and see its coordinate-free approach to geometry in action on the web. (since there was, and is, literally nothing else out there.)
Javascript is not the ideal language for that. Without operator overloading, much of the charm is lost - because of this, ganja contains a minimal transpiler (which is what all the regular expressions are for). This is purely out of necessity, as in practice I feel one needs a language with operator overloading for a GA implementation to be useful.
Furthermore, to be able to provide demo's in a wide range of Algebras, ganja contains three different algebra generators. (each of which produces the code that actually implements the algebra). This is another choice that typically does not exist for any specific use case (one would pick an approach and stick to it - like e.g. the Klein library) - and that adds a lot of complexity.
To visualize results, it also contains a range of different visualizers (2D, 3D, projective, conformal, SVG, GL, implicit, ..), none of which would be needed in a generic implementation. This again adds complexity that has no place in a 'reference' implementation. (which ganja was never intended to be).
In short, a lot of trickery was needed for ganja to reach its primary goal: clean examples that showcase how GA can simplify a wide range of applications. It certainly is not intended as a 'how-to' or reference for an Algebra generator, and when preparing for the Siggraph course, I saw no opportunity to use it as such. Instead, I opted to create separate reference implementations that are available at https://bivector.net/tools.html https://bivector.net/tools.html. (for c++, rust, python, c#)
With the increased interest, I did start a rewrite of ganja.js, and one that is not for my brain only.
Cheers.