hazy-frames
Crystal clear coordinate transformations for Python.
hazy-frames is a lightweight library for managing hierarchical coordinate frames and transforming points and vectors between them. Built for the NumPy and SciPy ecosystems with a pythonic, chainable API.
from hazy import Frame, Point, Vector
# Create coordinate frames with chaining
world = Frame.make_root(name="world")
camera = (
world.make_child("camera")
.translate(z=5)
.rotate_euler(y=90, degrees=True)
.freeze()
)
# Transform points between frames
point_world = world.point(1, 2, 3)
point_camera = point_world.to_frame(camera)
Features
Type Safety: Points and Vectors are distinct types
Mathematical Correctness: Only formally valid operations allowed
Chainable API: Fluent method chaining for frame transformations
Zero Runtime Overhead: Uses views where possible, avoids unnecessary copies
Easy Opt-Out: Convert to numpy arrays when you need raw manipulation
Contents:
Installation
pip install hazy-frames
Or with uv:
uv add hazy-frames