# Ganja.jl

*Visualization for geometric algebra, not just algebra using Ganja, Grassmann*

Inspired by pyganja: *Visualisation library for geometric algebra with cefpython and ganja.js*

- ganja.js:
*Javascript Geometric Algebra Generator for Javascript, c++, c#, rust, python. (with operator overloading and algebraic literals)* - Grassmann.jl:
*⟨Leibniz-Grassmann-Clifford-Hestenes⟩ differential geometric algebra / multivector simplicial complex*

Basic interoperability proof of conept:

```
using Ganja
w = loadganja()
loadexample!(w,"sphere.js")
using Grassmann; basis"++++-"
no,ni = (v5-v4)/2,v4+v5
addelement!(w,no-ni/2)
```

## ganja.js - Geometric Algebra for javascript.

**G**eometric **A**lgebra - **N**ot **J**ust **A**lgebra

Ganja.js is a Geometric Algebra code generator for javascript. It generates Clifford algebras and sub-algebras of any signature and implements operator overloading and algebraic constants.

(**Mathematically**, an algebra generated by ganja.js is a graded exterior (Grassmann) algebra
(or one of its subalgebras) with a non-metric outer product, extended (Clifford) with geometric and contraction inner products, a Poincare duality operator and the main
involutions and morphisms.)

(**Technically**, ganja.js is a code generator producing classes that reificate algebraic literals
and expressions by using reflection, a built-in tokenizer and a simple AST translator to
rewrite functions containing algebraic constructs to their procedural counterparts.)

(**Practically**, ganja.js enables real math syntax inside javascript, with element, vector and matrix
operations over **reals**, **complex numbers**, **dual numbers**, **hyperbolic numbers**, **vectors**, **spacetime events**, **quaternions**, **dual quaternions**, **biquaternions** or **any other Clifford Algebra**.)

(**Seriously**, look at the examples,
run some quick numbers using the GAlculator
or play the wedge game first.)

## Grassmann.jl - Geometric Algebra for Julia language

The Grassmann.jl package provides tools for doing computations based on multi-linear algebra, differential geometry, and spin groups using the extended tensor algebra known as Leibniz-Grassmann-Clifford-Hestenes geometric algebra.
Combinatorial products include `∧, ∨, ⋅, *, ⋆, ', ~, ∂`

(which are the exterior, regressive, inner, and geometric products; along with the Hodge star, adjoint, reversal, and boundary operators).
The kernelized operations are built up from composite sparse tensor products and Hodge duality, with high dimensional support for up to 62 indices using staged caching and precompilation. Code generation enables concise yet highly extensible definitions.
The DirectSum.jl multivector parametric type polymorphism is based on tangent bundle vector spaces and conformal projective geometry to make the dispatch highly extensible for many applications.
Additionally, the universal interoperability between different sub-algebras is enabled by AbstractTensors.jl, on which the type system is built.