hazy-frames
Hierarchical coordinate frames - crystal clear transforms
A Python library for managing hierarchical reference frames and frame-aware geometric primitives with efficient transformation caching, inspired by optiland.
hazy-frames fills the gap between heavyweight robotics frameworks like ROS and specialized libraries like pytransform3d or astropy. It provides a lightweight, Pythonic API for tracking geometric objects across multiple coordinate systems - perfect for raytracing, computer graphics, robotics simulations, CFD mesh generation (OpenFOAM blockMesh), or any application requiring coordinate transformations. Born from the need of managing objects across different frames in a non-sequential raytracing project, it offers a clean, intuitive interface that just works.
Philosophy: Do one thing well with minimal dependencies (only numpy and scipy). No visualization, no physics simulation, no file I/O - just clean, efficient coordinate transformations. The library enforces geometric semantics (e.g., Point + Point is forbidden, but Point - Point = Vector is allowed) as an opt-out contract - preventing common bugs while staying Pythonic. Designed as a lightweight building block that integrates seamlessly into your existing toolchain.
Features
- Hierarchical Frame System: Build complex frame hierarchies with parent-child relationships
- Frame-Aware Primitives:
PointandVectorclasses that carry frame information - NumPy Integration: Native array support with batch operations, factory methods, and stack functions
- Automatic Transformations: Transform primitives between any frames in the hierarchy
- Efficient Caching: Transformation matrices are cached for performance
- Proper Geometric Semantics: Type-safe arithmetic operations (e.g., Point - Point = Vector)
- Flexible Transformations: Support for rotation (Euler angles, quaternions, matrices), translation, and scaling
Installation
Install directly from PyPI:
pip install hazy-frames
Or download the wheel from releases:
pip install hazy_frames-0.2.1-py3-none-any.whl
For development:
# Clone the repository
git clone https://github.com/Littie28/hazy-frames.git
cd hazy-frames
# Install with development dependencies
uv sync --group dev
Quick Start
from hazy import Frame, Point, Vector
# Create a frame hierarchy
world = Frame.make_root("world")
robot = world.make_child(name="robot")
robot.translate(x=5, y=0, z=0).rotate_euler(z=90, degrees=True)
camera = robot.make_child(name="camera")
camera.translate(x=0, y=0, z=1)
# Create frame-aware primitives
point_in_camera = camera.point(1, 0, 0)
# Transform between frames
point_in_world = point_in_camera.to_frame(world)
point_in_robot = point_in_camera.to_frame(robot)
print(f"Camera: {point_in_camera}")
print(f"World: {point_in_world}")
print(f"Robot: {point_in_robot}")
Documentation
Full documentation, tutorials, and API reference are available at ReadTheDocs.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for hazy-frames 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hazy_frames-0.2.1.tar.gz | 193.0 kB | Without provenance | Details for hazy_frames-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hazy_frames-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for hazy_frames-0.2.1-py3-none-any.whl |
Total release size: 212.9 kB
Release files / hazy_frames-0.2.1.tar.gz
| Download URL | hazy_frames-0.2.1.tar.gz |
|---|---|
| Size | 193.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
487cbf48318f18c7d5350fef2866dc6a6024f303949aee20c6b973436df9dca4
|
|
BLAKE2b-256 checksum How to use checksums |
042dc8ab7fb1c3755f850acd468e706fc92b37fc317185ac4e9039e5cd390aa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / hazy_frames-0.2.1-py3-none-any.whl
| Download URL | hazy_frames-0.2.1-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cc8128927076d6ea6a8f193df882f1491543892a12fb18df0940211e85fbb8e
|
|
BLAKE2b-256 checksum How to use checksums |
4b54b82a7655f9d6a170d1eb50c8be6d1c65ef9d20d55362b8168f7736557d18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for hazy-frames 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.