# 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)` or `Transform::apply_point(&self, point)`
- Interpolation: `transform.lerp(&other, ratio)`
## Example
```rust
use ga2::{Bivector, Vector, Rotor};
use spatial_motion::{Transform, Movement};
use scalars::{One, Zero};
let mut transform: Transform<Vector<f32>, Rotor<f32>> = Transform::one();
let movement = Movement {
velocity: Vector::new(1.0, 0.0),
spin: Bivector::new(0.1),
};
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.