symtropy-math
N-dimensional geometric algebra for game physics. Stack-allocated, zero-heap, const-generic.
use ;
// 3D rotation in the xy plane by 90°
let plane = unit_plane;
let r = from_plane_angle;
let p = new;
let rotated = r.rotate_point; // → (0, 1, 0)
// Works in 4D too
let tesseract_rotation = unit_plane;
let r4d = from_plane_angle;
Features
Point<D>,Bivector<D>,Rotor<D>,Transform<D>— all const-genericShape<D>trait with GJK-compatible support functionSphere<D>,ConvexHull<D>,Hyperplane<D>colliders- Stack-allocated via
nalgebra::SVector— zero heap in hot paths - Works in 2D, 3D, 4D, or any dimension
- WASM compatible
Why Bivectors Instead of Quaternions?
Quaternions only work in 3D. Bivectors (oriented planes) generalize rotations to any dimension. A rotation happens in a plane, not around an axis. In 4D there are 6 rotation planes — bivectors handle this naturally.
Part of the Symtropy consciousness-physics engine.