ganja.js icon indicating copy to clipboard operation
ganja.js copied to clipboard

Documentation or usage examples for generated Rust code.

Open pka opened this issue 4 years ago • 2 comments

As a Rust programmer, I tried to reproduce a CoffeeShop example with Rust. I was able to figure out a few things, but had to give up without documentation and examples.

I tried to reproduce https://enkimute.github.io/ganja.js/examples/coffeeshop.html#pga2d_separating_axis and downloaded a generated 2D Projective Geometric Algebra file. I already struggled implementing the basic point method (1e12-x*1e02+y*1e01 in Javascript), because there is no e02 in pga2d.rs.

Are there any pointers to existing usage examples, which could help me? I'm also fluent in C++ and Python, so maybe documentation for one of these languages would help me as well.

pka avatar Mar 28 '20 20:03 pka

In the meantime I got some miminal examples running: https://github.com/pka/ganja-rs.

I still don't undertstand 1e02 in the PGA 2d examples. The generated modules don't have an e02 and https://bivector.net/tools.html doesn't list e02 as well.

The Rust templates from https://github.com/enkimute/ganja.js and https://bivector.net/tools.html differ. Which one should be used?

Last question: Which license do the generated modules have?

pka avatar Mar 30 '20 22:03 pka

e02 is the same as -e20

andreaskundig avatar Oct 05 '20 20:10 andreaskundig