A downloadable game for Windows and Linux

Download NowName your own price

Black Hole Simulator

A real-time 3D black hole physics simulator , featuring gravitational lensing, accretion disk dynamics, N-body black hole interactions, and tidal disruption events. You can explore the open-source repository on GitHub.


Features

Black Holes

  • Multiple black holes with independent mass, spin (Kerr parameter a), position and velocity
  • N-body gravitational interaction using the Paczyński–Wiita pseudo-Newtonian potential
  • Black hole mergers — momentum conserved, ~5% mass-energy radiated as gravitational waves (Christodoulou formula), spin approximated from angular momentum
  • Hawking evaporation — mass loss rate ∝ 1/M²
  • Kerr event horizon radius: r₊ = GM + √(G²M² − a²)
  • Photon sphere, ISCO (prograde Kerr), shadow radius all derived per-BH

Accretion Disk

  • Keplerian thin disk with temperature profile T ∝ (r/r_ISCO)^−3/4 (Novikov–Thorne)
  • Doppler shift — blueshift approaching side, redshift receding side
  • Gravitational redshift — colors fade toward infrared near the horizon
  • Lense–Thirring precession (frame dragging) for spinning black holes
  • Photon ring reconstructed from disk particle angular distribution

Planet & Body Simulation

  • GasPlanet: tidal spaghettification, Roche limit disruption, comet-tail debris stream
  • CelestialBody: hard rocky object, gravitational infall, EH fade
  • Time dilation for objects near the horizon (Schwarzschild factor)
  • Objects accrete into the BH on crossing the event horizon

Particles

  • Free particle system with RK4 integration under multi-BH gravity
  • PARTICLE_FORCE: optional weak inter-particle gravity (self-gravity, O(N²) branchless)
  • PARTICLE_AUTO_ZOOM: perspective-correct particle size (size ∝ 1/depth)
  • Thermal glow — velocity-dependent color shift toward blue-white
  • Absorbed by BH when crossing rs, released when disk is disabled

Stars & Lensing

  • Realistic 3D star sphere (80 000 px radius) — stars fixed in world space, rotate with camera
  • Gravitational lensing of stars and particles using thin-lens deflection angle: δφ = 4GM / (rc²)
  • Einstein ring formation when source, BH, and observer are aligned

Camera

  • Free-fly 3D camera with perspective projection
  • Mouse drag rotate, WASD move, Space/Ctrl up/down
  • Time dilation on camera — sim slows down as camera approaches horizon

Controls

Camera

Key Action
Mouse dragRotate
W / A / S / DMove forward / left / back / right
Space / LCtrlMove up / down
LShiftSpeed ×3
Arrow keysRotate camera

Black Holes

Key Action
HSpawn BH in front of camera
[ / ]Cycle selected BH
M / NMass ±0.05 M_geo
K / JSpin ±0.05

Objects

Key Action
BSpawn GasPlanet
VSpawn CelestialBody

Toggles

Key Action
TabOpen / close config panel
OPause / Resume
Z / XTime lapse ±0.5×
PPhysics mode: realistic ↔ 2-body
TCamera time dilation ON/OFF
EHawking evaporation ON/OFF
GBH gravity ON/OFF
FBH mergers ON/OFF
YVirtual accretion disk ON/OFF
CFree particles visible ON/OFF
RRedshift fading ON/OFF
IParticle temperature glow ON/OFF
USpaghettification ON/OFF
SRealistic 3D stars ON/OFF
ESC / QQuit

Config Panel (Tab)

Navigate with ↑↓, adjust value with ← →.


Physics & Algorithms

Spacetime & Gravity

  • Kerr metric — event horizon, ISCO, photon sphere computed analytically
  • Paczyński–Wiita potential — pseudo-Newtonian approximation for N-body BH interactions: V(r) = −GM / (r − r_s)
  • Schwarzschild gravitational redshift: z = 1 / √(1 − r_s/r)
  • Geodesic integration — RK4 on the Schwarzschild effective potential for disk particles

Gravitational Lensing

  • Thin-lens approximation: θ± = (β ± √(β² + 4θ_E²)) / 2
  • Einstein radius: θ_E = √(4GM · D_LS / (c² · D_OS · D_OL))
  • Applied to stars, particles, and celestial bodies; produces Einstein rings and double images

Orbital Mechanics

  • Keplerian angular velocity: ω = √(GM) · r^−3/2
  • Lense–Thirring frame dragging: Δω = 2GM·a / r³
  • Novikov–Thorne disk temperature: T ∝ r^−3/4 · (1 − √(r_ISCO/r))^1/4

Mergers

  • Christodoulou formula approximation: M_final = (M₁+M₂) · (1 − 0.0523η), η = M₁M₂/(M₁+M₂)²
  • Spin from angular momentum: a_final ≈ (L_1 + L_2 + L_orb) / M_final²

Spaghettification

  • Roche limit tidal disruption: intensity = 1 − r/r_Roche
  • Shrink rate ∝ intensity², debris stream inherits orbital tangential velocity (TDE debris stream model)

Thank you for using my project! If you enjoy exploring this simulation, please consider leaving a rating or supporting my work.

Connect & Support:

If you encounter any issues or bugs, please leave a comment on this game page. Enjoy the spacetime simulation! ',:)

Download

Download NowName your own price

Click download now to get access to the following files:

BlackHoleSimulator-1.2.1.rar 43 MB
BlackholeSimulator-1.3.0.rar 43 MB

Leave a comment

Log in with itch.io to leave a comment.