Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Update demo gif and add more details to the README
Browse files Browse the repository at this point in the history
ndavd committed Sep 21, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 27b6dc2 commit 56daebc
Showing 8 changed files with 187 additions and 6 deletions.
Binary file added .github/Hexeract-q1q4-q2q5-q3q6.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/Penteract-q1q4-q3q5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/Penteract-q4q5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 17 additions & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -4,12 +4,27 @@
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.**

Aditional features:
<div>
<img align="center" width="200px" src='https://raw.githubusercontent.com/ndavd/ncube/main/.github/Penteract-q4q5.gif' />
<img align="center" width="200px" src='https://raw.githubusercontent.com/ndavd/ncube/main/.github/Penteract-q1q4-q3q5.gif' />
<img align="center" width="200px" src='https://raw.githubusercontent.com/ndavd/ncube/main/.github/Hexeract-q1q4-q2q5-q3q6.gif' />
</div>

### 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](https://raw.githubusercontent.com/ndavd/ncube/main/.github/demo.gif)

## 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._

## Installation

### Download the pre-built binaries
@@ -22,8 +37,7 @@ cargo install ncube
```

### Install from source
You need to setup Rust (install [cargo](https://doc.rust-lang.org/stable/cargo/)) to build this project from source.
After that, simply clone clone the repository and run the install command:
Install [cargo](https://doc.rust-lang.org/stable/cargo/), clone the repository and run the command:
```
git clone https://github.com/ndavd/ncube
cd ncube
167 changes: 167 additions & 0 deletions .github/demo.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"dimension": 7,
"rotations": [
[
1,
4,
0.0,
0.0
],
[
2,
4,
0.0,
0.0
],
[
2,
6,
0.0,
0.0
],
[
0,
6,
0.0,
0.0
],
[
2,
5,
0.0,
0.0
],
[
4,
5,
0.0,
0.0
],
[
2,
3,
0.0,
0.0
],
[
0,
4,
0.0,
0.0
],
[
0,
5,
0.0,
0.0
],
[
0,
2,
0.0,
0.0
],
[
4,
6,
0.0,
0.0
],
[
1,
2,
0.0,
1.0
],
[
1,
5,
0.0,
0.0
],
[
0,
1,
0.0,
0.0
],
[
3,
5,
0.0,
0.0
],
[
3,
6,
0.0,
0.0
],
[
1,
3,
0.0,
0.0
],
[
0,
3,
0.0,
0.5
],
[
3,
4,
0.0,
0.0
],
[
5,
6,
0.0,
0.0
],
[
1,
6,
0.0,
0.0
]
],
"camera_transform": {
"translation": [
0.5281572,
-2.319585,
0.7684779
],
"rotation": [
0.5347303,
0.24569845,
-0.16603738,
0.79128206
],
"scale": [
1.0,
1.0,
1.0
]
},
"edge_thickness": 0.01,
"edge_color": {
"Rgba": {
"red": 1.0,
"green": 0.3429401,
"blue": 0.0,
"alpha": 1.0
}
},
"face_color": {
"Rgba": {
"red": 1.0,
"green": 0.6162337,
"blue": 0.33639002,
"alpha": 0.1
}
},
"unlit": false
}
Binary file modified .github/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "ncube"
version = "1.1.0"
version = "1.2.1"
edition = "2021"
authors = ["Nuno David <[email protected]>"]
license = "MIT"
description = "Generalized hypercube visualizer"
readme = ".github/README.md"
repository = "https://github.com/ndavd/ncube"
exclude = [".github/demo.gif", ".github/workflows"]
exclude = [".github/*.gif", ".github/workflows"]
keywords = ["simulation", "hypercube", "bevy", "mathematics", "tesseract"]
categories = ["simulation", "mathematics", "visualization", "graphics"]

0 comments on commit 56daebc

Please sign in to comment.