Everything this renderer simulates, term by term —
with the equation behind each and where it shows up on screen. Units use
\(G\) (gravitation), \(c\) (light speed), \(M\) (black hole mass).
Spacetime curvature & the Schwarzschild metric
General relativity says mass curves spacetime, and objects (including
light) follow the straightest possible paths — geodesics —
through that curved geometry. For a non-rotating, uncharged mass, the
exact solution is the Schwarzschild metric, which
gives the spacetime "interval" \(ds\) between nearby events:
$$ds^2 = -\left(1-\frac{r_s}{r}\right)c^2\,dt^2 + \left(1-\frac{r_s}{r}\right)^{-1}dr^2 + r^2\,d\Omega^2$$
The whole render is, in effect, this metric evaluated millions of
times a frame: each ray is a null geodesic (\(ds^2 = 0\),
the condition for light) traced backwards from your eye.
Schwarzschild radius & the event horizon
The factor \((1-r_s/r)\) hits zero at \(r = r_s\), the
event horizon: the radius inside which no path —
not even light's — leads back out. It depends only on mass:
$$r_s = \frac{2GM}{c^2}$$
On screen this is the boundary of the black disk, and the
Schwarzschild radius read-out. For the Sun it's ~3 km;
for Sgr A*, ~12 million km. Everything else (ISCO, photon
sphere, shadow) is measured in multiples of \(r_s\).
Light bending & the geodesic equation
Tracing a photon reduces (in the orbital plane) to a single
second-order equation for \(u = 1/r\) versus angle \(\varphi\):
$$\frac{d^2u}{d\varphi^2} + u = \frac{3GM}{c^2}\,u^2$$
The left side alone is a straight line; the right-hand
\(\tfrac{3GM}{c^2}u^2\) term is pure relativity — the same correction
that explains Mercury's perihelion precession and the 1919 eclipse
light-bending measurement. The renderer integrates this per ray (the
integration steps control sets how finely). Toggling
gravitational lensing off drops this term, giving flat,
Newtonian-looking light.
Photon sphere & the photon ring
At exactly \(r = \tfrac{3}{2}r_s\) gravity can bend light into a
(highly unstable) circular orbit — the photon sphere:
$$r_\text{ph} = \frac{3}{2}\,r_s = \frac{3GM}{c^2}$$
Rays that graze this radius loop around the hole one or more times
before escaping, piling up into the razor-thin bright
photon ring that traces the shadow's edge.
The black hole shadow
Crucially, the dark silhouette you see is not the horizon —
lensing magnifies it. A distant observer sees a shadow of apparent
radius \(b_\text{crit}\) (the critical impact parameter):
$$b_\text{crit} = \frac{3\sqrt{3}}{2}\,r_s \;\Rightarrow\; d_\text{shadow} = \sqrt{27}\,r_s \approx 5.2\,r_s$$
So the shadow looks ~2.6× wider than the horizon itself — this is the
number the Event Horizon Telescope's images of M87* and Sgr A* are
built around, and the shadow diameter read-out here.
Accretion disk & the ISCO
Infalling gas can't orbit arbitrarily close: below the
innermost stable circular orbit (ISCO) any orbit
spirals in. For Schwarzschild:
$$r_\text{ISCO} = \frac{6GM}{c^2} = 3\,r_s$$
That sets the disk's default inner edge. Viscous friction heats the
gas; a Shakura–Sunyaev thin disk has a temperature profile that falls
off with radius,
$$T(r) \propto \left(\frac{\dot{M}\,M}{r^3}\right)^{1/4}$$
which the renderer maps through a blackbody colour ramp — hotter,
bluer-white near the ISCO, cooler and oranger outward. The
accretion rate \(\dot{M}\) and mass controls feed
straight into this.
Relativistic beaming & Doppler shift
The disk orbits at a large fraction of \(c\). The side rotating
toward you is Doppler-boosted — brighter and bluer; the receding side
dims and reddens. Specific intensity isn't invariant, but
\(I_\nu/\nu^3\) is, so the observed brightness scales as the Doppler
factor cubed (times a photon-energy factor):
$$\delta = \frac{1}{\gamma\,(1-\boldsymbol{\beta}\cdot\hat{n})}, \qquad \frac{I_\nu^\text{obs}}{I_\nu^\text{emit}} = \delta^{3}$$
This is why a real black hole disk looks lopsided — one side blazing,
the other muted. The Doppler beaming toggle controls it.
Gravitational redshift
Light climbing out of the gravity well loses energy, shifting redder.
A photon emitted at radius \(r\) and seen far away is stretched by:
$$1 + z = \left(1 - \frac{r_s}{r}\right)^{-1/2}$$
which diverges at the horizon (infinite redshift). Combined with the
Doppler term above, it tints and dims disk light near the inner edge.
Controlled by the gravitational redshift toggle.
Hawking temperature (and why we don't render it)
Quantum field theory near the horizon predicts a faint thermal glow
with temperature inversely proportional to mass:
$$T_H = \frac{\hbar c^3}{8\pi G M k_B}$$
For any astrophysical black hole this is absurdly cold — nanokelvin
for stellar-mass, far below the 2.7 K microwave background — so it
contributes nothing visible. It's in the read-outs for scale only.
What's simplified
This is a Schwarzschild (non-rotating, uncharged)
model — no Kerr spin or frame-dragging, which would skew the shadow
and disk. The disk is rendered at the optics level (geometry, Doppler,
redshift, blackbody colour) rather than via full radiative transfer,
and the starfield is procedural. The goal is a faithful look
and feel for the real geometry, fast enough to spin in real time.