E1: Conformal Geometric Algebra (CGA)
Module: sci_form::experimental::cgaFeature flag: experimental-cga
Overview
Replaces the internal geometry engine (separate quaternions + vectors) with Conformal Geometric Algebra
Theory
G(4,1) Multivector
The conformal model embeds 3D Euclidean space into a 5D space with signature
A general multivector has
Motors
A Motor is the composition of a rotor (rotation) and translator:
- Rotor:
- Translator:
- Motor:
Objects transform via the sandwich product
Point Embedding
3D coordinates lift to conformal points:
Coordinates are recovered from the transformed multivector by extracting the Euclidean components and normalizing.
API
use sci_form::experimental::cga::*;
// Multivector operations
let a = Multivector::basis(1); // e₁
let b = Multivector::basis(2); // e₂
let ab = a.geometric_product(&b); // e₁e₂
let rev = ab.reverse(); // ẽ₁₂ = e₂e₁
// Motor from axis-angle
let motor = Motor::from_axis_angle([0.0, 0.0, 1.0], std::f64::consts::FRAC_PI_2);
// Transform a point
let point = cga_point([1.0, 0.0, 0.0]);
let rotated = motor.apply(&point);
let coords = extract_point(&rotated); // ≈ [0, 1, 0]
// Dihedral rotation
let dihedral_motor = Motor::dihedral([0.0, 0.0, 0.0], [1.0, 0.0, 0.0], 1.047);Applications
- Conformer generation: Dihedral torsion scans using CGA motors instead of rotation matrices
- MOF assembly: Unit cell lattice vectors as translation motors, SBU placement via motor composition
- Supercell construction: Motor exponentiation
Tests
cargo test --features experimental-cga --test regression -- test_cgaCovers: multivector algebra, motor construction, point embedding round-trips, dihedral rotations, and materials assembly comparison.