Expand description
N-dimensional geometric algebra for the Symtropy consciousness-physics engine.
All types are parameterized by const D: usize — the spatial dimension.
This forces stack allocation via nalgebra::SVector<f64, D>, giving zero-allocation
physics ticks with full SIMD optimization for the common 2D/3D/4D cases.
§Usage
use symtropy_math::{Point, Bivector, Rotor, Transform};
// 3D rotation in the xy plane by 90°
let plane = Bivector::<3>::unit_plane(0, 1);
let r = Rotor::from_plane_angle(&plane, std::f64::consts::FRAC_PI_2);
let p = Point::<3>::new([1.0, 0.0, 0.0]);
let rotated = r.rotate_point(&p);The bivector component count is computed at compile time:
- 2D: 1 component (xy)
- 3D: 3 components (xy, xz, yz)
- 4D: 6 components (xy, xz, xw, yz, yw, zw)
Re-exports§
pub use bivector::Bivector;pub use capsule::Capsule;pub use compound::CompoundShape;pub use convex_hull::ConvexHull;pub use halfspace::HalfSpace;pub use hyperbox::HyperBox;pub use hyperplane::Hyperplane;pub use point::Point;pub use rotor::Rotor;pub use shape::Shape;pub use sphere::Sphere;pub use transform::Transform;
Modules§
- bivector
- capsule
- D-dimensional capsule (cylinder with hemispherical caps).
- compound
- Compound shape: a rigid body composed of multiple convex sub-shapes.
- convex_
hull - halfspace
- D-dimensional half-space (infinite plane with one solid side).
- hyperbox
- D-dimensional axis-aligned box (hyperbox / tesseract).
- hyperplane
- point
- rotor
- shape
- sphere
- transform
Type Aliases§
- Bivector2
- Bivector3
- Bivector4
- Point2
- Type alias for common dimension specializations.
- Point3
- Point4
- Rotor2
- Rotor3
- Rotor4
- Transform2
- Transform3
- Transform4