# Cosmic Visualizer — Code Note ## Dependencies | Package | Purpose | |:--------|:--------| | `matplotlib` | 3D rendering, animation | | `networkx` | Layout (`spring_layout` with `dim=3` for playback) | | `numpy` | RNG, array ops | | `pillow` | GIF fallback writer | | `ffmpeg` | MP4 export (install via `winget install ffmpeg` on Windows) | ## Pipeline (Decoupled Compute vs Post-Processing) **Export** (`rst_export_cosmos.py`): Runs physics at full CPU speed; no rendering. Dumps edge list per cycle to `universe_history.pkl`. **Master Visualizer** (`rst_master_visualizer.py`): Reads `.pkl`, cinematic render with metric expansion, Sovereign Ladder HUD. Use `--scale cosmos|mineral|atomic|quantum` for topological filtering. ## Engine Integration - **Export** imports from `rst_engine.axiom_pure`: `init_graph`, `run_universe_timeline` - **Playback** is read-only—loads pickled edge lists, applies spring_layout and 0-Energy camera interpolation ## Usage **Step 1 — Export:** ```powershell python rst_export_cosmos.py [--nodes 512] [--cycles 100] [--output universe_history.pkl] ``` | Argument | Default | Description | |:---------|:--------|:------------| | `--nodes` | 512 | Graph size. Use 1024 for massive scale. | | `--cycles` | 100 | Physics cycles (frames). | | `--output` | `universe_history.pkl` | Output path. | | `--seed` | 42 | RNG seed. | **Step 2 — Playback:** ```powershell python rst_master_visualizer.py [--history universe_history.pkl] [--scale cosmos] [--fps 30] [--output Master_Cosmos_Render.mp4] ``` | Argument | Default | Description | |:---------|:--------|:------------| | `--history` | `universe_history.pkl` | Path to exported `.pkl`. | | `--fps` | 20 | Frames per second. | | `--output` | base name for MP4/GIF | No extension. | ## Outputs - `Relational_Big_Bang_Playback.mp4` — primary (requires FFmpeg) - `Relational_Big_Bang_Playback.gif` — fallback if FFmpeg unavailable Both written to the Cosmic Visualizer directory.