6 stable releases

new 2.1.0 Dec 1, 2023
2.0.0 Dec 1, 2023
1.2.3 Nov 30, 2023
1.2.2 Oct 24, 2023
1.2.1 Sep 21, 2023

#152 in Math

Download history 7/week @ 2023-09-03 79/week @ 2023-09-10 30/week @ 2023-09-17 9/week @ 2023-09-24 2/week @ 2023-10-01 6/week @ 2023-10-15 34/week @ 2023-10-22 11/week @ 2023-10-29 2/week @ 2023-11-05 1/week @ 2023-11-12 20/week @ 2023-11-19 115/week @ 2023-11-26

138 downloads per month

MIT license

90KB
1.5K SLoC

ncube - A Generalized Hypercube Visualizer

ncube allows you to visualize hypercubes of arbitrary dimensions. It works by rotating the hyperdimensional vertices and applying a chain of perspective projections to them until the 3rd dimension is reached. Everything is generated in real time just from the dimension number.

Features

  • Real time control of the simulation, such as tweaking the angular velocity factor of any plane of rotation
  • Exporting and loading custom configurations as files

Demo

But what am I actually visualizing?

Let's use the 7-cube demo GIF above as an example. In that specific case, you are looking at:

  • A 3 dimensional perspective projection of...
    • a 4 dimensional perspective projection of...
      • a 5 dimensional perspective projection of...
        • a 6 dimensional perspective projection of...
          • a 7 dimensional hypercube undergoing a rotation about the q1q4 (X-W1) and q2q3 (Y-Z) orthogonal planes.

Web

A web version for this app is available at ncube.ndavd.com via the WASM build.

Installation

Download the pre-built binaries

Pre-built binaries for Windows, Linux, MacOS and WASM can be found in the releases page.

Install from crates.io

Install cargo and run the install command:

cargo install ncube

Install from source

Install cargo, clone the repository and run the install command:

git clone https://github.com/ndavd/ncube
cd ncube
cargo install --path .

Uninstall

cargo uninstall ncube

Dependencies

~35–77MB
~1.5M SLoC