Black hole: mathematical and physical derivation
This page reconstructs, at advanced-university level, the equations driving the simulation: from the Schwarzschild metric to null geodesics, from the relativistic accretion disk to invariant radiative transfer. We state explicitly what is exact, what is approximated and what is a visualization choice.
Everything is in geometrized units G = c = 1; in the renderer we fix the Schwarzschild radius rₛ = 2M = 1.
1. Schwarzschild metric and null geodesics
The exterior geometry of a non-rotating spherical mass is the vacuum Schwarzschild solution of Einstein's equations. In coordinates (t, r, θ, φ):
The timelike and azimuthal Killing vectors yield two first integrals of motion — energy E and angular momentum L per unit mass — along every affine geodesic:
For a photon (null geodesic) the condition gᵤᵥ ẋᵘẋᵛ = 0 reduces, in the equatorial plane, to a radial equation with an effective potential. Setting u = 1/r gives the orbit equation, whose derivative is the photon Binet equation:
The impact parameter is b = L/E. The photon sphere (unstable circular photon orbit) is at r = 3M = 1.5 rₛ, and the observed shadow corresponds to the critical impact parameter bᵪ = 3√3·M. The renderer numerically integrates the equivalent vector form of this geodesic (velocity-Verlet), reproducing lensing, the Einstein ring, the photon sphere and the shadow. (Carroll; Kokkotas, Univ. Tübingen; Hirata, Ohio State.)
2. Relativistic accretion disk
The thin, optically-thick disk follows the Shakura–Sunyaev model in its relativistic Novikov–Thorne version, with a zero-stress boundary condition at the innermost stable circular orbit (ISCO). The locally emitted flux and the effective (Stefan–Boltzmann) temperature are:
For Schwarzschild the ISCO is at rᵢₛ𝒸ₒ = 6M = 3 rₛ. Each annulus radiates as a blackbody at its local temperature: the color is therefore the true blackbody color T → sRGB along the Planckian locus, not an arbitrary gradient. The first computed image of such a disk is due to Luminet (1979). (Shakura–Sunyaev 1973; Novikov–Thorne 1973; Luminet 1979.)
3. Radiative transfer and relativistic effects
Along a ray, the quantity Iᵥ/ν³ is invariant (Liouville's theorem for photons). With the redshift factor g = νₒᵦₛ/νₑₘ, for an emitter on a circular orbit g combines gravitational and time dilation with the longitudinal Doppler.
A blackbody seen with factor g remains a blackbody at temperature g·T (Doppler invariance of the Planck spectrum), with bolometric intensity scaling as g⁴. The same g thus drives brightness and color: the approaching side of the disk is brighter and bluer (relativistic beaming), the receding side darker and redder. (Luminet 1979; Vincent et al. 2011, GYOTO.)
4. Rotation: Kerr and frame dragging
A realistic black hole rotates: the correct metric is Kerr, where the dragging of inertial frames (frame dragging) has angular velocity ω = −g_{tφ}/g_{φφ}. The renderer does not integrate Kerr; the Spin slider adds frame dragging in a gravitomagnetic dipole (Lense–Thirring) approximation — physically motivated but NOT the full Kerr metric.
Interstellar's Gargantua uses the true Kerr metric ray-traced offline (James, von Tunzelmann, Franklin & Thorne 2015). Full public GR ray-tracing codes (e.g. GYOTO) integrate Kerr, but not in real time in the browser.
5. Playground: body dynamics
In the playground the bodies (planets with moons, stars, comets) move in the Paczyński–Wiita pseudo-Newtonian potential, which exactly reproduces the ISCO at 6M and the relativistic plunge without integrating the full geodesics — a standard compromise in N-body / accretion models.
Moons are integrated as a restricted problem: they feel both the black hole and the host planet (within its Hill sphere). Stars crossing the tidal radius are torn into a debris stream (a particle model, not hydrodynamics). (Paczyński–Wiita 1980.)
6. Limits: what it is NOT (scientific honesty)
The baseline is Schwarzschild (non-rotating); spin is approximate (Lense–Thirring), not Kerr. The disk is optically thick with blackbody emission: its turbulent gaseous structure is a procedural stand-in for magnetorotational (MRI) turbulence, not a GRMHD solution; it does not model self-gravity, vertical thickness or polarization. Background stars are procedural (their lensing, however, is real). In the playground the added bodies are occluded by the disk/horizon but not lensed, and the integration is pseudo-Newtonian, not full-geodesic.
Open solutions: what we can (and cannot) integrate
Excellent open-source relativistic ray-tracing codes exist — GYOTO (Observatoire de Paris), RAPTOR, ipole, grtrans, Blacklight — and an open implementation of Luminet's method. But they are offline codes (C/C++/Python) computing single frames in minutes/hours: they cannot run in real time inside a WebGL fragment shader in the browser.
What we genuinely integrate are their physical–mathematical formulations: the Schwarzschild geodesic, the Novikov–Thorne disk, the g factor and the Iᵥ/ν³ invariant, the blackbody color. Our shader reimplements them in GLSL and cites them; it does not embed the external code. Stating this is part of the "fail loud, never fake" rule.
Frequently asked questions
Are the equations used real and correct?
Yes for the lensing geometry: integrating null geodesics in the Schwarzschild metric is exact and reproduces the photon sphere, Einstein ring and shadow (critical impact parameter 3√3 M). GR orbital velocity, redshift, the Liouville invariant and bolometric g⁴ beaming use the exact formulas; the color is the true blackbody color of the local temperature.
Is it identical to Interstellar's black hole?
No. Gargantua uses the Kerr (rotating) metric ray-traced offline. Here the baseline is Schwarzschild in real time; spin is a Lense–Thirring approximation.
Can I integrate GYOTO or a full GR code?
Not in real time in the browser: those are offline codes. We reimplement their formulations in GLSL and cite them. Precision scientific images do use exactly those codes.
References & sources
- S. M. Carroll, “Lecture Notes on General Relativity” — Schwarzschild geodesics (Caltech).
- K. Kokkotas, “Particle Trajectories & The Classical Tests”, General Relativity course, Universität Tübingen.
- C. Hirata, “Geodesics in the Schwarzschild geometry”, ph6820, The Ohio State University.
- J.-P. Luminet (1979), “Image of a spherical black hole with thin accretion disk”, Astronomy & Astrophysics 75, 228.
- N. I. Shakura & R. A. Sunyaev (1973), “Black holes in binary systems”, Astronomy & Astrophysics 24, 337.
- I. D. Novikov & K. S. Thorne (1973), “Astrophysics of Black Holes”, in Black Holes (Les Houches).
- B. Paczyński & P. J. Wiita (1980), “Thick accretion disks and supercritical luminosities”, Astronomy & Astrophysics 88, 23.
- O. James, E. von Tunzelmann, P. Franklin & K. S. Thorne (2015), “Gravitational lensing by spinning black holes… Interstellar”, Classical and Quantum Gravity 32, 065001.
- F. H. Vincent et al. (2011), “GYOTO: a new general relativistic ray-tracing code”, Classical and Quantum Gravity 28, 225011.
- C. W. Misner, K. S. Thorne & J. A. Wheeler, “Gravitation” (1973).
- Blackbody color → sRGB: N. Bartlett's Planckian-locus approximation (data by M. Charity).
- Stack: Three.js, React Three Fiber, @react-three/drei, @react-three/postprocessing, KaTeX. Development: Fosforonero — Matteo Pizzi (Rome, Italy).