Skip to content

jamylak/600cell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

600-cell Visualizer

AI Generated finetuned for the visualisation and not code quality.

600cell.mov

Interactive C + Raylib viewer for the 600-cell, a regular 4D polytope. The app generates the polytope's 4D vertices, connects nearest-neighbour edges, rotates the shape through multiple 4D planes, projects it down into 3D and then 2D, and lets you explore a highlighted W-slice of the structure in real time.

What This Repo Does

  • Generates the 120 canonical 4D vertices of the 600-cell
  • Builds edge connectivity by detecting the shortest 4D neighbour distance
  • Animates simultaneous rotations in the XY, XZ, XW, YZ, YW, and ZW planes
  • Projects the rotating 4D shape into 3D and then onto the 2D window
  • Colors points and edges by their current W coordinate
  • Highlights a configurable W slice so you can see which parts of the polytope sit near a chosen hyperplane
  • Lets you orbit the projected view in 3D and manually drag the XW and YW rotations
  • Shows hover details for vertices and edges, including degree, current 4D coordinates, and projected edge length

At A Glance

Area What You See
Geometry A rotating projection of the 4D 600-cell
Color Hue shifts with the current W coordinate
Brightness Points and edges brighten when they are near the active W slice
Left Drag Orbit the 3D projection
Right Drag Push the shape through XW and YW rotations
Mouse Wheel Zoom the projection
Side Panel Live sliders for projection, styling, rotation speeds, and slicing

Visual Overview

flowchart LR
    A["4D Vertex Families<br/>8 axis points<br/>16 sign points<br/>96 golden-ratio points"]
    B["Nearest-Neighbour Edge Build<br/>connect shortest 4D pairs"]
    C["Animated 4D Rotation<br/>XY XZ XW YZ YW ZW"]
    D["4D -> 3D Projection<br/>controlled by wDist"]
    E["3D Orbit View<br/>yaw + pitch from left-drag"]
    F["3D -> 2D Projection<br/>controlled by zDist"]
    G["Screen Render<br/>edges, points, hover inspector"]

    A --> B --> C --> D --> E --> F --> G

    classDef geo fill:#16324f,stroke:#8fd3ff,color:#f4fbff,stroke-width:2px;
    classDef motion fill:#3c1642,stroke:#f08bd7,color:#fff4fb,stroke-width:2px;
    classDef proj fill:#234f1e,stroke:#9be27f,color:#f6fff4,stroke-width:2px;
    classDef render fill:#5b3a00,stroke:#ffd166,color:#fff9ec,stroke-width:2px;

    class A,B geo;
    class C motion;
    class D,E,F proj;
    class G render;
Loading

How To Read The Visualization

flowchart TB
    W["Chosen W Slice<br/>sliceW +/- sliceThickness"]
    P["Points near the slice<br/>larger radius + brighter glow"]
    E["Edges near the slice<br/>extra width + alpha boost"]
    C["Hue by W value<br/>blue/cyan through warmer tones over time"]
    H["Hover inspector<br/>vertex degree, 4D coords, edge metrics"]

    W --> P
    W --> E
    C --> P
    C --> E
    P --> H
    E --> H

    classDef slice fill:#1d3557,stroke:#8ecae6,color:#f1f8ff,stroke-width:2px;
    classDef focus fill:#5a189a,stroke:#f72585,color:#fff5ff,stroke-width:2px;
    classDef info fill:#264653,stroke:#e9c46a,color:#fffbea,stroke-width:2px;

    class W slice;
    class P,E,C focus;
    class H info;
Loading

Visual Legend

  • Point color: encodes the current W coordinate
  • Point size: grows when a vertex is close to the active W slice
  • Edge brightness: increases when an edge sits near the slice or is hovered
  • Hover focus: unrelated geometry is dimmed so local structure is easier to read
  • Bottom info card: switches between vertex-specific and edge-specific measurements

Controls

Global

  • q: quit
  • 1: open the main 600-cell viewer
  • 2: open page 2 placeholder
  • space: pause or resume animation

Viewer Page

  • mouse wheel: zoom in or out
  • left drag: orbit the 3D projection
  • right drag: manually adjust XW and YW 4D rotation
  • hover vertex: inspect degree, W, slice delta, and current 4D coordinates
  • hover edge: inspect endpoint ids, 4D edge length, projected length, and mean W

Side Panel Sliders

  • View and styling: Zoom, Line Width, Point Size, Edge Alpha
  • Projection: W Distance, Z Distance
  • Rotation rates: rXY, rXZ, rXW, rYZ, rYW, rZW
  • Slice controls: Slice W, Slice Width, Slice Boost

Why The UI Feels Like A Slice Explorer

The most useful mental model is that the app is not only drawing a spinning wireframe. It is also giving you a moving spotlight through the fourth dimension:

  • sliceW picks a target location along the W axis
  • sliceThickness defines how much nearby geometry counts as "in slice"
  • sliceBoost makes that neighbourhood stand out visually

This makes it easier to see how a 4D object changes as different parts of it pass near a chosen hyperplane.

Build

Dependencies

  • raylib
  • pkg-config
  • a C compiler such as cc or clang

Commands

make
make run

About

600cell Visualiser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors