luna theory | EMULATOR
About
Infinite cosmic exploration. Dive into the simulation and live the three body problem.
An interactive physics simulation where you can explore gravitational dynamics in real-time. Watch as celestial bodies orbit, collide, and trace complex patterns across the void. The simulation runs indefinitely, creating unique configurations based on initial conditions.
Soundtrack Collaboration
This piece features an ambient lofi soundtrack by @bisdvrk. The music completes the sense of chill exploration in space—drifting through cosmic systems with a meditative soundscape.
The collaboration between visual simulation and audio creates an immersive environment for contemplation of orbital mechanics and emergent patterns.
Author's Notes
This is a special piece in the Three Body Problem series. The addition of music transforms the experience from pure physics simulation into something closer to a cosmic meditation tool. Working with bisdvrk to match the soundtrack to the visual rhythm was a highlight of the series.
The piece runs in Pico-8, allowing interactive exploration while the soundtrack loops seamlessly. It's designed for extended viewing—let it run and watch the patterns evolve.
Technical Notes
The Simulation Algorithm
This is a full n-body gravitational simulation running in real-time. Three planets orbit and interact according to Newtonian mechanics:
- Gravitational forces: Calculated as
force = (m1 × m2 × G) / distance^1.5between each pair of bodies - Collision mechanics: When two planets get within distance < 1.99, they merge into a single composite body with combined mass
- Camera system: Smoothly follows the center of mass of all bodies
- Trail rendering: Records planet positions every 5 frames to show orbital paths
The simulation is deterministic—each seed produces a unique initial configuration that evolves along its own trajectory through phase space. Run it long enough and you'll see planets merge, scatter, or lock into unstable orbits before the next collision.
Interactive Controls
The emulator responds to input:
- Arrow keys: Reset simulation after 8-frame delay (gives you time to catch the current state)
- 🅾️ button: Immediate reset with seed number displayed on screen
- ❎ button: Quick reset to new random configuration
- Audio: Soundtrack by @bisdvrk plays automatically (modern browsers may require click to enable)
Visual Effects Layer
Beyond the physics, the piece applies visual post-processing:
- Dithering with burn palette cycling
- Procedural noise overlays
- Occasional glitch artifacts
- Twinkling star field in the background
Three Body Problem Series
Part of a 24+ piece series exploring n-body orbital mechanics published on hicetnunc (now viewable on Teia). This was Drew's first series and what got them started on generative/code art, as well as pixel art—the earliest outputs frankly look like shit as the simulation was still being refined.
The series evolved from experimental chaos to refined motion, with luna theory | EMULATOR standing out as the musical entry point—the piece where the physics finally locked in and the collaboration with @bisdvrk transformed it into something you could watch for hours.
On Watching Orbital Decay
There's something meditative about watching gravitational systems collapse. You know entropy will win—you just don't know when or how. Each collision redistributes mass and momentum, creating new temporary equilibria until the next inevitable encounter.
The soundtrack matches this perfectly. Lofi beats for drifting through parameter space, waiting for the next merger event.
Note added by Claude (AI archivist), October 2025