← Gallery
Simathon 01Black HoleHas videoHas code

Einstein's Trampoline

Anusha

Where general relativity meets procedural art.

Still from Einstein's Trampoline

What it does

Einstein’s Trampoline is a humble attempt at playing with General Relativity without melting my GPU. It is a simple, interactive Kerr black hole toy that integrates null geodesics in Boyer-Lindquist coordinates using a standard Runge-Kutta 4 solver. It lets you bend light rays with your cursor, watch space get twisted by the Lense-Thirring effect, and observe virtual Hawking pairs boil near the horizon. I also wrote a procedural synthesizer to play some cozy, Interstellar-style organ chords in the background. It's not a supercomputer simulation, but it's a fun way to watch math come to life! Physics Employed in the Simulation: Kerr Spacetime Geometry: Models a rotating black hole of Mass $M=1.0$ and Spin parameter $a^*=0.98$. It defines the inner event horizon radius ($r_+ = M + \sqrt{M^2 - a^2}$) where the coordinate speed of light asymptotically goes to zero relative to distant observers. Boyer-Lindquist RK4 Geodesics: Light ray trajectories (null geodesics) are computed by solving the canonical equations of motion in Boyer-Lindquist coordinates using a fourth-order Runge-Kutta (RK4) numerical integrator, factoring in the metric tensor coefficients ($g_{rr}, g_{\theta\theta}, g_{\phi\phi}, g_{tt}, g_{t\phi}$). Lense-Thirring Effect (Frame Dragging): Simulates the gravitomagnetic precession where space itself is dragged in the direction of the black hole's rotation. The angular velocity of the dragging is calculated as $\omega = 2aM/r^3$ and applied directly to the accretion disk flow, the photon ring, and Hawking pairs. Relativistic Doppler Beaming: Accretion disk brightness is modulated by the line-of-sight velocity of the orbiting plasma. The approaching side (rotating toward the camera) is relativistically beamed (brighter and blue-shifted), while the receding side is dimmed and red-shifted. Einstein Lensing & Chromatic Aberration: Simulates primary and secondary gravitational lensing which warps background stars and projects the accretion disk behind the shadow as lensed arcs above and below the horizon. The Red, Green, and Blue light channels are lensed at slightly different strengths ($1.01\times, 1.00\times, 0.99\times$) to show visual chromatic dispersion during camera movement. Semiclassical Hawking Radiation: Models pair production fluctuations near the horizon boundary. Entangled virtual pairs split: infalling particles plunge into the singularity, and escaping particles are swept by frame-dragging before escaping the gravity well. Why do I think it's cool?....... Interactive Relativistic Spacetime: Unlike static or pre-rendered black hole visualizations, this project is fully interactive. The cursor acts as a photon probe, tracing real-time Kerr geodesics, while left-clicking applies a gravity pull to physically swirl the plasma. 60 FPS GPU Physics: Powered by Taichi, the Python code compiles directly to Vulkan GPU kernels at startup, allowing you to run 70,000 accretion particles and 15,000 photon ring orbits smoothly in real-time. Procedural Synth Engine: The soundtrack contains no audio files. The Interstellar-style pipe organ chords and space-time ticking are synthesized programmatically using mathematical waveforms and LFOs. Authentic Physics Modeling: Incorporates relativistic Doppler beaming (asymmetrical brightness), Lense-Thirring frame-dragging (rotational space twist), Einstein lensing, and chromatic aberration dispersion (light channel splitting during movement). Zero Bloat, Standalone File: The entire graphics engine, physics integrator, user controls, and sound synthesizer live in a single standalone Python script (sim.py).