This renders an n-dimensional hypercube and rotates it about all of its planes of rotations. Written in Rust and is <100 lines of code.
A simple 3D cube perspective projected.
4D Hypercube (Tesseract) Perspective projected
4D Hypercube (Tesseract) Orthographically projected
5D Hypercube (Penteract) Perspective projected
6D Hypercube (Hexeract) Perspective projected
And last but not least, just for some fun, a rendering of a 10D Hypercube (in perspective projection).
- nannou
- ndarray
- lazy_static
- Install the Rust toolchain (the latest stable version is usually fine).
- Clone this repository and change into its directory:
git clone <repository-url> cd Hypercube-Renderer
- Build and run the project with Cargo:
This will compile the renderer and open a window showing a rotating 4D tesseract.
cargo run
The dimension of the hypercube is controlled by the DIM constant at the top of src/main.rs. Edit that value and run cargo run again to render a cube (3), penteract (5), hexeract (6), or any other dimension you would like to visualize.





