Expand description
Frame morphisms — Galilean now, Lorentz later (W5).
A frame morphism transforms a pose from one reference frame to another. The simplest case is a Galilean transformation: a rigid translation + rotation between frames moving at constant velocity relative to each other. Lorentz transformations (special relativity) are deferred — they require the full 4D spacetime metric and time dilation.
§Why this matters
Without frame morphisms, a pose in “camera space” and a pose in “world space” are just two Vec<f64> values with no relationship. The engine can’t compose them, invert them, or chain them. Frame morphisms make the relationship explicit and computable.
§Galilean transformation
A Galilean transformation between frame A and frame B is:
- A translation (offset of B’s origin in A’s coordinates)
- A rotation (orientation of B’s axes relative to A’s)
- A velocity (for moving frames — B moves at constant velocity relative to A)
Position transforms as: p_B = R^(-1) * (p_A - offset - v * t) Time is absolute: t_B = t_A (no time dilation)
Lorentz transformation (future) would add:
- Time dilation: t_B = γ * (t_A - v·x_A / c²)
- Length contraction: x_B = γ * (x_A - v * t_A)
- Where γ = 1 / sqrt(1 - v²/c²)
Reference: docs/vibescript-full-impl-PLAN.md §8.15 W5,
excellence-first §4.
Structs§
- Galilean
Morphism - A Galilean frame morphism — translation + rotation + velocity (W5).
- Lorentz
Morphism - A Lorentz frame morphism — special relativistic 4D spacetime transformation.