Spatial Motion
Generic spatial transforms and movement for Rust, built on geometric algebra traits.
Dimension-agnostic: works with any position, rotor, and bivector types that implement the right traits from the scalars and vector-space ecosystem.
Types
Transform<P, R>— position (P) + orientation (R), with composition via*Movement<V, B>— velocity (V) + spin (B), applied to transforms via+=
Position can be any affine type (Point or Vector). Movement velocity is always a vector. They connect through P + V = P (Point + Vector = Point).
Operations
- Transform composition:
transform * transform(requires position to support addition) - Inverse:
transform.inv() - Apply movement:
transform += movement - Apply to point:
transform.apply(point)orTransform::apply_point(&self, point) - Interpolation:
transform.lerp(&other, ratio)
Example
use ;
use ;
use ;
let mut transform: = one;
let movement = Movement ;
transform += movement;
AI-assisted development
This crate is designed for use with AI coding assistants. Fully generic over position/rotor/bivector types, minimal trait bounds per method, and no implicit behavior. The Exp trait from scalars connects bivectors to rotors, and vector_space::Transform connects rotors to vectors.