| Crates.io | hypersphere |
| lib.rs | hypersphere |
| version | 0.1.1 |
| created_at | 2023-08-26 05:48:43.533928+00 |
| updated_at | 2023-08-26 06:05:12.588423+00 |
| description | Simple 4D primitives for rotation and projection. |
| homepage | |
| repository | https://github.com/OptimisticPeach/hypersphere |
| max_upload_size | |
| id | 955369 |
| size | 32,758 |
This crate implements some simple rotation and projection primitives for 4D geometry on top of glam.
Implements 4D to 3D projection on the surface of a sphere by way of stereographic projection.
It allows you to project both points and vectors tangent to the sphere at a point through a stereographic projection. The latter is useful when embedding 3D geometry on the surface of a hypersphere and ensuring that normal vectors remain normal vectors under projection (recall that stereographic projection is angle-preserving).
Implements a double-quaternion representation of 4D rotations.
Includes:
XY, XZ, etc.).Includes functions to:
Implements a simple algorithm to generate the 600-cell's vertices (not indices), as useful sample data.