← Back to simulation

Physics of the Black Hole Simulation

This document provides a comprehensive description of every physics model, equation, and approximation used in this interactive black hole ray-tracing simulation. Each section traces the origin of the equations to their foundational references and discusses where the simulation is physically accurate and where it departs from reality.

Scope note: Schwarzschild photon geodesics are modeled from the exact Binet equation. Spinning-hole lensing, accretion-flow emission, jet emission, and the GRMHD-inspired controls are progressively more approximate and are documented as such below.

1. Units and Conventions

The simulation uses geometrized units where:

All distances in the simulation (observer distance, planet orbit, accretion disk extent) are expressed in multiples of rs. This normalization is standard in numerical relativity for Schwarzschild spacetimes [1].

Design choice: Setting rs = 1 rather than rg = GM/c² = 1 keeps equations simple: the event horizon sits at r = 1, the photon sphere at r = 1.5, and the ISCO at r = 3 (for Schwarzschild). When converting to Kerr spin parameters, the code maps between rs and rg units with the factor 0.5.

2. Schwarzschild Metric and Null Geodesics

The spacetime around a non-rotating, uncharged black hole of mass M is described by the Schwarzschild metric (1916) [2]:

ds² = −(1 − rs/r) c² dt² + (1 − rs/r)−1 dr² + r² (dθ² + sin²θ dφ²)

where rs = 2GM/c² is the Schwarzschild radius. For photons (null geodesics), ds² = 0.

The motion of photons is governed by two conserved quantities arising from the metric's symmetries: energy E (time-translation symmetry) and angular momentum L (rotational symmetry). By restricting motion to the equatorial plane (θ = π/2), which is always possible by symmetry, the orbit equation can be derived from these conservation laws and the null condition [1] [3].

3. The Binet Equation for Photons

The core of the simulation's gravitational lensing is the Binet equation for null geodesics in Schwarzschild spacetime. Using the substitution u = 1/r, the orbital equation for photons is [1] [3] [28]:

(du/dφ)² = rs u³ − u² + 1/b²

where b is the impact parameter. Differentiating with respect to φ yields the second-order ODE:

u/dφ² = −u + (3/2) rs u²

In the simulation's units where rs = 1, this becomes:

u/dφ² = −u + 1.5 u²

This is the exact Schwarzschild core implemented in the shader's geodesic_accel() function when the optional spin perturbation is disabled. The first term (−u) corresponds to the Newtonian inverse-square gravity, while the second term (1.5u²) is the purely relativistic correction responsible for light bending, the existence of the photon sphere, and the black hole shadow.

Key features of this equation

Accuracy: The underlying orbital equation is exact for photon geodesics in Schwarzschild spacetime. Rendered accuracy still depends on the numerical integrator, step budget, and adaptive stepping used by the shader. The implementation follows the standard Schwarzschild null-geodesic treatment in Misner, Thorne & Wheeler [1], Wald [3], and Chandrasekhar [28].

4. Numerical Integration (Leapfrog & RK4)

The Binet ODE is a second-order equation integrated as a coupled first-order system:

du/dφ = v      dv/dφ = −u + 1.5u² + fspin

where v = du/dφ and fspin is the frame-dragging correction (see Section 5). The same integrators are used for the true Kerr geodesic equations (Section 5.2).

Leapfrog / Störmer-Verlet (default)

When RK4 is disabled, the simulation uses the Leapfrog (Störmer-Verlet) method, a 2nd-order integrator that is symplectic in its fixed-step form:

du += 0.5 * accel(u) * step;   // half-step velocity
u  += du * step;                // full-step position
du += 0.5 * accel(u) * step;   // half-step velocity

With a fixed step, Leapfrog is symplectic and avoids the secular energy drift that afflicts non-symplectic methods like plain Euler. In this renderer, however, the same update rule is combined with adaptive step sizing (see below), so the strict long-time symplectic guarantee does not apply exactly to the implementation. In practice it still gives a low-cost, stable second-order method that performs well for photons winding near the photon sphere.

Runge-Kutta 4th order (RK4)

When enabled, the simulation uses classical RK4 [28], which is fourth-order accurate, O(Δφ&sup4;):

k1 = accel(u)
k2 = accel(u + 0.5*step*du)
k3 = accel(u + 0.5*step*(du + 0.5*step*k1))
k4 = accel(u + step*(du + 0.5*step*k2))
u  += (step/6)*(du_k1 + 2*du_k2 + 2*du_k3 + du_k4)
du += (step/6)*(k1 + 2*k2 + 2*k3 + k4)

RK4 is essential for accurate rendering of higher-order lensing images (photons that complete multiple half-orbits around the photon sphere before escaping). In practice, it reduces integration drift in the strong-lensing regime, although the final image still depends on the available step budget.

Adaptive step sizing

The step size Δφ is refined near the photon sphere (u ≈ 0.667) using a Gaussian reduction factor:

step ×= 1 − 0.7 · exp(−12 (u − 0.667)²)

This reduces the step by up to 70% when the photon is near the unstable circular orbit, where small numerical errors lead to significant trajectory deviations. Additionally, the step is bounded by a maximum relative change in u, preventing large jumps in regions of rapid curvature change.

5. Kerr Black Hole & Frame Dragging

A spinning black hole is described by the Kerr metric (1963) [5], parameterized by the dimensionless spin a/M (0 = Schwarzschild, 1 = maximally spinning). The full Kerr null geodesic equations require the Carter constant [6] and Boyer-Lindquist coordinate integration, which is computationally expensive for real-time rendering.

5.1. Public spin approximation (all exposed modes)

For all publicly exposed spin-enabled rendering modes, the simulation keeps the Schwarzschild Binet photon solver and adds a perturbative frame-dragging correction:

u/dφ² = −u + 1.5u² + a · s · ksq · 0.8 u³

where a is the spin parameter, s is the spin alignment factor (dot product of orbital angular momentum with spin axis, ranging from −1 to +1), and ksq is a user-adjustable heuristic strength parameter ("shadow squeeze"). A cumulative azimuthal rotation Δψ = a·ksq·s·Δφ·0.85u³ is applied to the 3D ray position about the spin axis. This perturbative spin treatment is applied only in the exterior public lensing path; the dedicated interior pipeline falls back to pure Schwarzschild Binet dynamics so its analytical escape classification remains exact. In the public Fast (Binet lensing) mode, the implementation also applies a small spin-dependent capture-threshold shift to squeeze the shadow boundary. That extra capture rule is an implementation shortcut / visual heuristic, not an exact Kerr critical-curve result. Together these approximations capture qualitative frame-dragging effects but cannot reproduce the exact Kerr shadow boundary.

5.2. True Kerr geodesics (Mino-time formulation)

The codebase also contains an experimental Kerr geodesic integrator based on the separability discovered by Carter (1968) [6]. In Mino time σ (where dλ = Σ dσ), the geodesic equations separate into independent ODEs in r and θ:

r/dσ² = R′(r)/2 = 2rP − (rM)K
d²(cosθ)/dσ² = −cosθ(η + ξ² − a²) − 2a²cos³θ
dφ/dσ = aP/Δ + ξ/sin²θ − a

where:

The radial and polar equations are polynomial in r and cosθ, while the azimuthal equation remains rational through Δ and sin²θ; taken together they are still computationally cheap per step. The constants ξ and η are currently initialized from the camera ray direction using flat-space expressions and then projected onto the Kerr constraint surface (dr/dσ)² = R(r). That makes this a promising exact-equation solver, but not a validated user-facing Kerr rendering mode in its current state.

The 3D Cartesian position is reconstructed at each step from Boyer-Lindquist coordinates: x = √(r² + a²) sinθ cosφ, y = √(r² + a²) sinθ sinφ, z = r cosθ. Event-horizon capture uses the analytical Kerr outer horizon r+ = M + √(M² − a²) with a small numerical buffer in the current implementation.

Accuracy: The separated Mino-time equations themselves are the exact Kerr null-geodesic equations [6] [28]. In this repository, however, the feature remains experimental and is not presented as a validated public rendering mode.

Current status: This integrator is work-in-progress and is not yet exposed in the user interface. All user-facing modes currently use the same approximate Binet photon solver described in Section 5.1. The "Kerr-inspired disk velocities" mode uses Kerr equatorial angular velocity to drive disk matter but does not change the photon geodesic solver.

6. ISCO: Innermost Stable Circular Orbit

The ISCO marks the inner edge of a stable accretion disk. Matter inside the ISCO plunges rapidly into the black hole. The ISCO radius depends on the black hole spin and was derived by Bardeen, Press & Teukolsky (1972) [8]:

rISCO = rg (3 + Z2 ∓ √[(3 − Z1)(3 + Z1 + 2Z2)])

where:

Z1 = 1 + (1 − χ²)1/3 [(1 + χ)1/3 + (1 − χ)1/3]
Z2 = √(3χ² + Z1²)

with χ = a/M the dimensionless spin parameter, and − for prograde, + for retrograde orbits. In the code, this is implemented in the calculateISCO() function in js/app/core/renderer.js. In the current UI, the sign of a/M is used to mirror the black hole's spin direction, while the disk model stays on the co-rotating branch; a separate retrograde-disk toggle is not exposed. The implementation converts from gravitational radii (rg = GM/c²) to Schwarzschild radii (rs = 2rg) with the factor 0.5.

Spin a/MISCO (prograde) in rsISCO (retrograde) in rs
0 (Schwarzschild)3.03.0
0.52.183.65
0.91.164.18
0.998 (near-extremal)0.624.47
1.0 (extremal limit)0.54.5
Accuracy: The Bardeen-Press-Teukolsky ISCO formula is exact for equatorial circular orbits in Kerr spacetime. The simulation's implementation faithfully follows this formula [8].

7. Accretion Disk Models

The simulation offers three accretion disk models, each appropriate for different astrophysical regimes:

7.1. Thin Disk (Shakura–Sunyaev-Type Profile with Kerr ISCO Inner Edge)

This is the default mode, modeling a geometrically thin, optically thick accretion disk appropriate for luminous AGN (quasars) and stellar-mass X-ray binaries accreting below the Eddington limit.

Temperature profile

The surface temperature follows the familiar zero-torque thin-disk proxy used in the Shakura & Sunyaev (1973) [10] treatment and in the Newtonian-limit form often used as a visual stand-in for Novikov & Thorne (1973) [11]:

T(r) = T0 · x−3/4 · (1 − √(1/x))1/4

where x = r/rin and rin is the ISCO radius. In this renderer, the inner edge tracks the Kerr ISCO, but the flux profile itself is not the full spin-dependent Novikov-Thorne/Page-Thorne relativistic correction. It is the simpler Shakura-Sunyaev-style zero-torque profile:

Flux profile

The radiated flux (energy per unit area per unit time):

F(r) ∝ (1/x³) · (1 − √(1/x))

This simple zero-torque profile peaks at r = (49/36) rin ≈ 1.36 rin. The code applies a normalization factor of 18.0 for visual brightness scaling.

Disk velocity

Matter in the thin disk follows Keplerian circular orbits. In the Schwarzschild case, the renderer uses the familiar local orbital speed:

vφ = 1 / √(2(r − 1))

This is the local azimuthal speed relative to a static Schwarzschild frame. It approaches c as r → 1.5 (the photon sphere) and goes as 1/√(2r) at large distances, recovering the Newtonian Keplerian limit v ∝ 1/√r.

In the Kerr-inspired disk-velocity mode, the code first uses the standard equatorial Kerr angular velocity:

Ω = 1 / (rg3/2 + a)

where rg = 2r (converting from rs to gravitational radii). This is the standard Kerr equatorial Keplerian angular velocity [8]. The renderer then converts this to a flat-space azimuthal speed for Doppler/beaming calculations. That captures the leading spin dependence, but it is not a full local-tetrad Kerr velocity treatment. With the current UI's sign convention, negative a/M values mirror the spin direction and the co-rotating disk velocity sign; a separate retrograde-disk branch is not exposed.

Limb darkening

The thin disk emission includes Eddington limb darkening, which accounts for the angle-dependent intensity of an optically thick atmosphere:

I(μ) = I(1) · (2/5 + 3/5 · μ)

where μ = cos θemission is the cosine of the angle between the emitted photon and the disk normal (z-axis). This reduces the brightness of disk regions viewed at grazing angles, which is particularly visible for the underside of the disk seen through gravitational lensing.

Sub-step disk crossing detection

Near the photon sphere (r ≈ 1.5 rs), photon paths wind tightly and a single integration step can skip over the z = 0 equatorial plane. To reliably capture secondary and tertiary Einstein rings, the disk-crossing test is subdivided into 4 sub-checks when the photon is close to the photon sphere and the step subtends a large angle. This ensures that higher-order lensed images of the disk are not missed by the finite step size.

Turbulence

The disk surface displays procedural turbulence using fractional Brownian motion (fBm) noise layered over spiral arm structures. This is purely artistic — real disk turbulence arises from the magnetorotational instability (MRI) [12] and requires full 3D magnetohydrodynamic (MHD) simulations to model accurately. However, the visual character (filamentary, multi-scale structure) is qualitatively reasonable.

7.2. Thick Torus (ADAF/RIAF)

This mode models an advection-dominated accretion flow (ADAF) [13], also known as a radiatively inefficient accretion flow (RIAF). This is appropriate for low-luminosity AGN like M87* and Sgr A* — the two targets imaged by the Event Horizon Telescope (EHT) [14].

Geometry

The torus has a configurable center radius r0 and aspect ratio H/R. The vertical density profile follows a Gaussian, motivated by hydrostatic equilibrium in a vertically isothermal atmosphere:

ρ(R, z) ∝ exp(−z² / 2H²)

Emissivity

The radial emissivity uses a hybrid model combining a configurable power-law decay with a Gaussian torus profile centered at r0. The self-similar ADAF solution of Narayan & Yi (1994) [13] predicts:

The power-law index β ("radial falloff") is user-configurable (default 2.5, range 0.5–5.0). The pure Narayan & Yi value is β = 3.5, but GRMHD simulations show values typically in the range 2–4 depending on magnetic field topology and heating prescriptions. The emissivity is blended 50/50 with a Gaussian profile exp(−1.2 ((rr0)/(0.6r0))²) to produce a visually defined torus ring rather than a centrally-concentrated blob. Inside r0, the falloff exponent is reduced to 0.6β to prevent excessive brightening toward the center.

Opacity

The absorption coefficient is user-configurable (default 0.015, range 0.001–0.15). ADAFs are optically thin to bremsstrahlung radiation, so the default is low. Higher values produce a more opaque, surface-like torus; lower values let more emission accumulate along the line of sight through the volume.

Outer extent

The torus outer edge is set by a configurable multiplier (default 3.5×) relative to r0, with a smooth falloff. This controls how far the accretion flow extends radially.

Electron temperature

The two-temperature ADAF model (Narayan & Yi 1995 [15]; Esin et al. 1997 [16]) predicts Ter−0.5:

T(r) = T0 · (r0/r)0.5

Gas velocity

ADAF gas orbits at roughly 50% of the Keplerian velocity (sub-Keplerian due to significant radial pressure support), consistent with ADAF theory [13].

7.3. Slim Disk (Super-Eddington)

The slim disk model represents super-Eddington accretion, where the accretion rate exceeds the critical value at which radiation pressure balances gravity. Key features:

This mode is appropriate for ultraluminous X-ray sources (ULXs) and narrow-line Seyfert 1 galaxies.

Configurable parameters

Three user-adjustable parameters control the slim disk appearance:

7.4. Disk Self-Irradiation (Returning Radiation)

An important relativistic correction incorporated into both the thin and slim disk models is returning radiation. Light emitted from the inner regions of the accretion disk (near the ISCO) does not always escape to infinity. Because of the strong gravitational lensing near the black hole, a significant fraction of the emitted flux is bent back and strikes the disk again, depositing its energy back into the plasma [45].

In this renderer, returning radiation is represented by a heuristic, Cunningham-inspired inner-disk enhancement, not by recursive ray tracing or a calibrated transfer-function evaluation. The boost is made stronger for higher spin and is forced to decay rapidly outward as r−3.5, so the visual effect remains concentrated near the ISCO. By the Stefan-Boltzmann law, the effective display temperature is then raised by the fourth root of this enhancement factor. This produces a plausible extra brightening of the inner disk, but it should be read as a visualization proxy rather than a quantitative returning-radiation result.

8. Black-Body Radiation & Spectrum

The accretion disk's thermal emission is modeled as black-body (Planck) radiation. At each point on the disk, the local temperature determines the emitted spectrum via Planck's law:

Bν(T) = (2hν³/c²) / (exp(hν/kT) − 1)

Rather than evaluating this integral at runtime, the simulation uses a precomputed spectrum lookup texture (spectra.png):

The disk temperature range spans 4,500 K (reddish-orange, like a cool K-type star) to 30,000 K (blue-white, like an O-type star). In this renderer these values should be read as effective display-side color temperatures, not as mass-scaled physical inner-disk temperatures; real stellar-mass accretion disks can peak far into the UV/X-ray.

9. Gravitational Redshift

Photons climbing out of a gravitational potential well lose energy. The gravitational redshift between an emission radius re and an observer at ro in Schwarzschild spacetime is [1]:

1 + z = √[(1 − rs/ro) / (1 − rs/re)]

In the simulation's units (rs = 1):

g(re) = √[(1 − 1/re) / (1 − 1/ro)]

This factor is applied as a multiplicative shift to the effective temperature: Tobs = Temit · g. For a full Planck spectrum, the identity Bν(DT) = D³ Bν/D(T) means a temperature rescaling would encode both frequency shift and specific-intensity scaling. In this renderer, however, the lookup texture stores chromaticity rather than absolute Planck radiance, so the hue shift and the explicit D³ brightness factor are handled separately (see Section 11).

Implementation note

The renderer applies the static Schwarzschild redshift factor √[(1 − 1/re) / (1 − 1/ro)] to the source temperature first, then applies a separate special-relativistic transfer factor for moving emitters:

ftransfer = γ(1 + v · )

This factorization keeps the static gravitational piece and the local kinematic piece separate, so the transverse time-dilation part encoded in γ is not counted twice. It is still a local-frame approximation, not a full invariant GR transfer calculation built from emitter tetrads and constants of motion, so the thin disk is most faithful in the non-spinning Schwarzschild limit and becomes progressively more approximate in plunging, volumetric, and Kerr-inspired modes.

Accuracy: The static Schwarzschild redshift law is exact for stationary emitters. Combined with the separate SR Doppler factor it gives a consistent local approximation for moving emitters in this renderer, but it is not a full GR redshift treatment for arbitrary source motion.

10. Relativistic Doppler Effect

Moving matter in the accretion disk introduces a Doppler shift. The local special-relativistic Doppler factor used for emitter or observer motion is [17]:

D = 1 / [γ(1 + v · )]

where γ = 1/√(1 − v²) is the Lorentz factor, v is the emitter's velocity, and is the photon direction at the emission point.

In the simulation, the kinematic transfer factor along a ray is:

ftransfer = 1/Dobserver · 1/Demitter = γobs(1 + vobs · ) · γemit(1 + vemit · )

The static gravitational redshift factor from Section 9 is applied separately.

This factor is applied to the disk temperature: Tobs = Temit / ftransfer. A blueshift (f < 1) raises the observed temperature (approaching side), while a redshift (f > 1) lowers it (receding side). This creates the characteristic left-right brightness asymmetry in the disk image.

Accuracy: The relativistic Doppler formula itself is exact. The blue/red asymmetry in the accretion disk is one of the most prominent observational signatures, confirmed theoretically by Luminet (1979) [18] and computationally by the Interstellar team (James et al. 2015) [19]. In the renderer, extreme transfer factors are guarded by minimum/maximum clamps for numerical stability, so the implementation should be read as exact only until those guardrails activate.

11. Relativistic Beaming & Liouville's Theorem

Beyond the color/temperature shift, relativistic motion also changes the observed intensity of radiation. For thermal emitters and the background-sky proxy, the simulation offers two beaming modes. Jets use a separate synchrotron beaming law described in Section 15.

Physical beaming (D³ Liouville)

From Liouville's theorem in phase space, the quantity Iν/ν³ is a Lorentz invariant along a photon's path [20]. For a black-body source, this means:

Iobs = D³ Iemit

where D is the Doppler factor. Although the Planck function satisfies Bν(DT) = D³ Bν/D(T), the simulation's spectrum texture stores chromaticity (normalized color) rather than full Planck intensities. Therefore the temperature shift TDT only changes the observed hue, not the brightness. The D³ intensity factor must be — and is — applied explicitly to the emitted intensity.

In the current implementation, this explicit intensity factor is applied consistently to all thermal emitters that use the black-body lookup (thin disk, thick torus, slim disk, and planet illumination) and to the background-sky proxy in physical mode. The jet branches keep their own synchrotron beaming law rather than using the D3/cinematic black-body toggle.

For numerical stability, several shading paths clamp extreme transfer factors before applying the thermal D3 correction, and the background-sky boost is capped at a large finite value. In cinematic mode, the background uses the same softened observer-frame beaming curve as the rest of the non-physical path. These are implementation guardrails / presentation choices, not changes to the underlying exact transfer law.

Cinematic beaming

For artistic rendering (similar to the Interstellar movie visualization), the simulation offers a softened beaming model:

IobsD~2.15 Iemit
(with D clamped to [0.62, 1.48])

This reduces the dramatic brightness contrast between the approaching and receding sides of the disk, making it visually more balanced. The Interstellar team [19] similarly reduced the beaming in their renderings to keep the full disk visible.

12. Relativistic Aberration

A moving observer perceives incoming light from different apparent directions compared to a stationary observer. This relativistic aberration is implemented using the Lorentz velocity transformation of light directions:

n' = [(n + v) + n/γ] / (1 + v · n)

where n is the original ray direction and v is the observer's velocity. This is the standard relativistic velocity addition formula applied to light [17].

The effect concentrates starlight toward the direction of motion (headlight effect) and spreads it away from the rear. The simulation applies this transformation to each ray before tracing.

Accuracy: The aberration formula is exact for special relativity. It correctly produces the relativistic "searchlight" concentration of background stars toward the observer's direction of motion.

13. Observer Kinematics & Time Dilation

Circular orbit

When orbital motion is enabled, the observer follows a circular Schwarzschild orbit model at radius r. The public motion controls clamp this mode to r ≥ 3 rs so it stays in the stable massive-particle regime. The analytic relations below extend formally into the unstable band 1.5 rs < r < 3 rs, with r = 1.5 rs corresponding to the photon sphere.

v = 1 / √(2(r − 1))

and the coordinate angular velocity:

Ω = v · √(1 − 1/r) / r

Time dilation

The relevant Schwarzschild proper-time relations are:

Implementation note: These formulae are exact Schwarzschild relations. In the code, the orbit and hover modes advance observer.time using the inverse of these factors so the distant scene evolves at the appropriate relative rate as seen by the local observer. The dedicated free-fall dive mode handles its own time update separately, and the Kerr-inspired disk-velocity mode does not promote the observer kinematics to a full Kerr treatment.

14. Gravitational Blueshift & Hovering Observer

One of the most vivid consequences of General Relativity is the gravitational blueshift of light falling into a gravitational potential well. When a photon travels from a weaker gravitational field (far from the black hole) to a stronger one (near the horizon), it gains energy. Since light always travels at c, this energy gain manifests as an increase in frequency — a blueshift toward the violet and beyond.

The strength of the effect depends critically on how the observer moves: a hovering (stationary) observer sees the full gravitational blueshift, while a free-falling observer's kinematic Doppler redshift cancels and overpowers the gravitational contribution.

14.1 Static (Hovering) Observer

A static observer at Schwarzschild radius r fires thrusters to remain at rest in the gravitational field. For a photon emitted at infinity and received at r, the frequency ratio is given by the Schwarzschild metric time component:

fobs / femit = 1 / √(1 − rs/r)

In the simulation's units (rs = 1):

fobs / femit = 1 / √(1 − 1/r)

This diverges as rrs: a hovering observer infinitesimally close to the event horizon would see all incoming radiation infinitely blueshifted — visible starlight would be boosted past ultraviolet into X-rays and gamma rays. In practice, hovering at the horizon requires infinite proper acceleration:

a = M / (r² √(1 − rs/r))

so the simulation limits the minimum hover radius to r = 1.005 rs.

Temperature and intensity shift

For black-body sources (stars in the background sky), the observed colour temperature is:

Tobs = Temit / √(1 − 1/r)

The specific intensity transforms according to Liouville's theorem (Iν / ν³ = const along a ray), giving an intensity boost of D³ where D = fobs/femit = 1/√(1 − 1/r).

In principle, for a true Planck spectrum D³ × Bν(T) = Bν(D × T), so a temperature shift alone would capture both hue and brightness. However, as discussed in the beaming section, the simulation's spectrum texture stores chromaticity (normalized colour), not absolute Planck radiance. The temperature lookup therefore only shifts the hue; the D³ intensity factor must be applied explicitly — just as it is for the accretion disk emission.

Numerical examples

Radius rFrequency boost DIntensity boost D³Visual effect
11 rs (default orbit)1.05×1.15×Barely perceptible
3.0 rs1.22×1.83×Noticeable bluing; stars brighter
1.5 rs (photon sphere)1.73×5.20×Strong blue tint; sky significantly brighter
1.1 rs3.32×36.5×White-blue sky; extreme brightness
1.02 rs7.14×364×Deep UV shift; sky blindingly bright
1.005 rs (min hover)14.2×2850×Extreme blue/UV; visible sky in tight escape cone

14.2 Free-Falling Observer

A free-falling observer who has turned off their engines and plunges radially from rest at infinity experiences a very different view. Their infall velocity at radius r is vlocal = √(rs/r) relative to a static frame. For overhead light (the same direction as their motion), the relativistic Doppler effect of this recession redshifts the incoming light:

ffall = femit / (1 + 1/√r)

This can be derived from the covariant frequency formula ν = −kμ uμ, where kμ is the photon four-momentum and uμ is the observer four-velocity for radial free-fall from infinity in Schwarzschild coordinates. The full calculation yields:

ffall / femit = 1 / (1 + √(1/r))

This is always < 1 for r > 0 — the kinematic Doppler redshift overpowers the gravitational blueshift. The free-falling observer sees overhead stars grow dimmer and redder as they descend, not brighter and bluer.

Key insight: The gravitational blueshift is a property of where you are in the potential well, while the Doppler shift depends on how you are moving. For a free-falling observer, the two effects act in opposite directions, with the kinematic redshift winning. Only a hovering observer — one who has zero velocity relative to the static Schwarzschild frame — experiences the pure gravitational blueshift.

14.3 Implementation

The simulation computes a gravitational blueshift factor grav_blueshift_factor = √(1 − 1/robs) which is passed to the shader as a uniform. In the background-sky section of the ray tracer, the effective Doppler factor for incoming starlight and galaxy light is:

bg_doppler = ray_doppler_factor × grav_blueshift_factor

where ray_doppler_factor = γ(1 + ray · (−vobs)) captures the kinematic Doppler from the observer's orbital or infall velocity. This combined factor is used to shift the effective blackbody temperature of background stars and the Milky Way. Because the spectrum texture stores chromaticity (see section 11), not absolute Planck radiance, the temperature shift only corrects the hue — the D³ intensity boost (D = 1/bg_doppler) is applied explicitly via bg_boost, clamped to a maximum of 10 000 to avoid numerical overflow in extreme cases.

For the accretion disk, the gravitational shift between emission and observer positions is already handled by the dedicated redshift helper. The shader uses the static Schwarzschild factor first and then applies the separate SR transfer factor for the emitter motion, which keeps gravitational and kinematic pieces separated in the implementation.

Inside the event horizon (r < rs), the concept of a static observer breaks down — the metric component gtt changes sign — so the simulation sets grav_blueshift_factor = 1.0 and defers to the existing interior rendering pipeline.

Accuracy: The gravitational blueshift formula 1/√(1 − rs/r) is exact for Schwarzschild spacetime. The combined frequency formula for overhead light seen by a free-falling observer, 1/(1 + 1/√r) is also exact, derivable from the covariant inner product of the photon and observer four-velocities [1] [29]. The rendered background colours remain approximate because the Milky Way texture is remapped through a blackbody proxy rather than a full per-pixel spectrum, and the explicit D3 background boost is capped in extreme cases for numerical stability.

15. Relativistic Jets

The simulation offers bipolar relativistic jets along the black hole spin axis, with two models:

Simple jet

A smooth parabolic jet with:

Detailed / GRMHD-inspired jet

A more detailed analytic jet model incorporating qualitative trends from GRMHD simulations and jet-imaging literature:

Its emissivity and beaming are synchrotron-motivated, but the displayed RGB colour is still produced through an effective-temperature proxy and the same black-body lookup texture used elsewhere in the renderer. The geometry and brightness trends are therefore inspired by synchrotron jet models, but the simulation is not evaluating a literal frequency-resolved jet spectrum.

Spine/sheath structure

GRMHD simulations show jets have a fast, magnetically-dominated spine surrounded by a slower, denser sheath (disk wind). The simulation models this with separate velocity and emissivity profiles for each component [22].

Magnetization parameter σ

The ratio of magnetic to kinetic energy density:

σ = B² / (4πρc²)

In GRMHD jets, σ >> 1 at the base (Poynting-flux dominated) and decreases with distance as magnetic energy converts to kinetic energy. The simulation parameterizes this as σ(z) = σ0 / (1 + 0.15z) + 0.5 [23].

Reconfinement knots

When the jet's internal pressure drops below the ambient pressure, standing oblique shocks form, creating periodic bright knots. These are observed in real jets (e.g., M87's HST-1 knot, 3C 273). The simulation models these as a sinusoidal standing-wave brightness pattern with configurable spacing [24].

Jet-corona connection

At the jet base, the magnetically-dominated funnel meets the hot corona above the accretion disk. The simulation includes bright emission from this region, with emissivity scaling as r−3 (magnetic energy density, softened from r−4 to avoid excessive central concentration) [22]. Two configurable parameters control this region:

Synchrotron beaming

Jet emission follows the synchrotron beaming law:

Iobs = δ2+α Iemit

where δ is the Doppler factor and α ≈ 0.7 is the synchrotron spectral index. This jet law is separate from the black-body D3/cinematic toggle in Section 11. The simulation uses the exponent 2.7 (= 2 + 0.7) [20].

Counter-jet disk occultation

The receding (counter) jet is partially blocked by the optically thick accretion disk near the equatorial plane. The simulation models this as exponential absorption through the disk midplane, as an extra visualization term. In real AGN, one-sided jet appearance is often dominated by relativistic Doppler boosting and external absorption; disk occultation is only one possible contributor and should not be treated here as an observationally established primary cause.

16. GRMHD-Inspired Mode

When the GRMHD-inspired toggle is enabled, the simulation augments the baseline analytic accretion and jet models with semi-analytic prescriptions inspired by General Relativistic Magnetohydrodynamic (GRMHD) simulations. The goal is to borrow qualitative morphology and parameter trends from the GRMHD literature, not to replace full GRRT through simulation snapshots.

What is GRMHD? In black-hole accretion work, GRMHD simulations usually evolve the relativistic magnetofluid equations on a curved spacetime background (most often a fixed Kerr metric), tracking the plasma density, velocity, pressure, and magnetic field near the hole. They are the gold standard for modeling accretion-flow morphology and jet launching. This simulation uses semi-analytic fitting functions inspired by GRMHD results — not the full numerical evolution — to achieve real-time performance while retaining the essential qualitative trends.

16.1 Two-Temperature Plasma (Rhigh Prescription)

In GRMHD simulations, the ion temperature Ti and electron temperature Te are generally different. Since radiation is produced primarily by electrons, the electron temperature determines the observed emission. The simulation uses the Rhigh parameterization introduced by Mościbrodzka, Falcke & Shiokawa (2016) [36]:

Ti / Te = R(β) = Rhigh β² / (1 + β²) + Rlow / (1 + β²)

where β = Pgas / Pmag is the plasma beta parameter and Rlow = 1. This creates:

In the current renderer, this full suppression is used most directly in the GRMHD thick-torus branch, where increasing Rhigh dims the high-β disk body relative to the low-β corona / funnel wall. The thin- and slim-disk branches keep the Rhigh influence deliberately milder so the visible-light RGB disk does not collapse into an almost invisible corona-only image. As a result, Rhigh is still physically motivated everywhere, but its strongest morphology effect appears in the torus-like GRMHD mode most closely associated with EHT-style imagery [37].

16.2 Thermal Synchrotron Emission

In low-luminosity systems such as M87* and Sgr A*, the observed radio / millimeter emission is often modeled as thermal synchrotron emission from hot, magnetized, optically thin plasma:

jνne νs F(ν/νc)

where the spectral shape function is the relativistic thermal fit from Mahadevan, Narayan & Yi (1996) [38]:

F(x) = x−1/6 exp(−1.8899 x1/3)

Implementation as Spectral Correction

Because this renderer produces visible-light blackbody images (not monochromatic radio maps), evaluating the full synchrotron kernel at a specific observing frequency is not meaningful. Instead, the synchrotron physics is captured as a spectral correction factor that modulates emissivity based on the local magnetic field strength B and electron density ρ:

Csync = 0.3 + 2.7 · B · (0.2 + 0.8 ρ) / (1 + B · (0.2 + 0.8 ρ))

This yields a factor in the range ~[0.3, 3.0], ensuring that regions with strong magnetic fields and high electron density emit more brightly (as expected from jνne B²), while maintaining well-behaved values across the full parameter space. The B-field strength parameter and density scale slider both directly modulate this correction, providing responsive control.

A simplified opacity term loosely inspired by synchrotron self-absorption is included for the thick torus (ADAF/RIAF), where the opacity scales with turbulence-modulated density: αabsjtorus · turbulence0.5 · (0.5 + 0.5 · density_scale). For the optically thick thin disk and slim disk, synchrotron absorption is less important since these models are already emission-dominated.

16.3 MRI Turbulence & MAD State

The magnetorotational instability (MRI; Balbus & Hawley 1991 [39]) drives turbulence in accretion disks and is the primary mechanism for angular momentum transport. In the GRMHD-inspired mode, MRI turbulence is modeled with log-normal density fluctuations:

ρ = ρ0 exp(σln ξ)

where σln ≈ 0.5 – 1.0 is the log-normal width (controlled by the MRI turbulence parameter) and ξ is a procedural noise field in co-rotating coordinates. The density fluctuations are clamped to a dynamic range of 20× (0.2 – 4.0) to prevent extreme outliers from overwhelming the torus geometry, consistent with the 1–2 σ range observed in actual GRMHD density histograms.

Additional MRI-driven features include azimuthal scale-height variations (±15% at default turbulence, calibrated to Liska et al. 2022 [45]) representing Parker instability buoyant loops and MRI-induced warps.

Furthermore, near the Innermost Stable Circular Orbit (ISCO), the shear and relativistic velocities reach their maximum, resulting in high-frequency micro-scale turbulence (rapid turbulent shredding). This is modeled by mixing in an additional, faster moving layer of continuous fractional Brownian motion heavily weighted by an exponential decay factor approaching the ISCO. This ensures chaotic and non-uniform plasma fluctuations close to the event horizon, breaking the appearance of uniform macroscopic banding near the center.

The Magnetically Arrested Disk (MAD) state occurs when magnetic flux accumulates on the black hole until pressure balance arrests further accretion. MAD disks exhibit:

The MAD flux parameter interpolates between SANE (Standard and Normal Evolution, MAD = 0) and full MAD state (MAD = 1), following Tchekhovskoy, Narayan & McKinney (2011) [40].

16.4 Fishbone-Moncrief-Inspired Helper

The codebase contains a pseudo-Newtonian helper inspired by Fishbone & Moncrief (1976) [41], the classic equilibrium-torus construction used as an initial condition in GRMHD simulations:

WW0 = −ln(h)

where W is the effective potential (gravitational + centrifugal) and h is the specific enthalpy. In this repository the helper is implemented with a pseudo-Newtonian (Paczyński-Wiita) potential for experimentation, but the current public thick-torus mode does not directly render the exact Fishbone-Moncrief solution; it still uses the simpler analytic torus emissivity profile described in Section 7.2.

16.5 High-Frequency Chaos & Dynamic Thermal Bands

Near the Innermost Stable Circular Orbit (ISCO), extreme relativistic shear drives high-frequency, complex turbulent shredding. This is modeled by injecting rapid, micro-scale fractional Brownian motion (fBm) heavily weighted by a spatially decaying factor near the event horizon. This breaks the predictable visual uniformity of macroscopic banding into chaotic, fluctuating plasma filaments.

Coupled with structural MRI fluctuations, the application of dynamic temperature variations further prevents the "painted stripes" artifact seen in simpler procedural disks. Small variations (up to ~5%) in local electron temperature are generated dynamically along orbital phase shifts and fractal noise manifolds. Since blackbody thermal radiation scales proportionally with T4 (Stefan-Boltzmann), even minor dynamic temperature shifts create deeply organic and visually striking brightness waves sweeping continuously through the accretion disk.

16.6 Non-Thermal Electrons (κ-distribution)

Magnetic reconnection in current sheets produces non-thermal electrons with a power-law energy tail. The simulation models this using a κ-distribution:

f(E) ∝ (1 + EkT)−(κ+1)

The κ parameter controls the thermal/non-thermal balance:

Non-thermal electrons enhance synchrotron emission at high frequencies and modify the spectral energy distribution, particularly in the jet funnel and corona regions where reconnection is most vigorous.

16.7 Non-Zero ISCO Stress

The classical Novikov-Thorne model assumes zero torque at the ISCO (innermost stable circular orbit), meaning accreting matter plunges freely inside the ISCO with no emission. GRMHD simulations show this is incorrect: magnetic stress at the ISCO is significant, and the plunging region contributes ~10–30% of the total disk luminosity (Noble et al. 2010 [43], Penna et al. 2010 [47]).

In this renderer, enabling the GRMHD-inspired controls allows thin-disk emission to extend inside the ISCO with a gradual decay (rather than a hard cutoff), and MAD-like settings increase that contribution further.

16.8 Blandford-Znajek Jet Power

The jet luminosity in the GRMHD-inspired mode is modulated by the Blandford & Znajek (1977) mechanism [25]:

PBZ = (κ/4πc) ΦBH² ΩH² fH)

where ΦBH is the magnetic flux threading the event horizon and ΩH = a/(2r+) is the angular velocity of the horizon. In the MAD state, ΦBH saturates, so PBZa² Ṁ. The simulation also includes:

EHT comparison: The M87* preset with the GRMHD-inspired mode enabled at Rhigh = 80, MAD flux = 0.8 gives a qualitative crescent/ring morphology reminiscent of the EHT 2019 image. The Sgr A* preset with Rhigh = 20 and lower MAD flux gives a more symmetric ring-like morphology reminiscent of EHT 2022 model families. These should be understood as visual presets, not observational fits.

17. Volumetric Radiative Transfer

The thick torus, slim disk, and jet models all use volumetric ray marching with the radiative transfer equation:

dI/ds = j − αI

where j is the emission coefficient, α is the absorption coefficient, and s is the path length. Each integration step contributes:

ΔI = Tvol · j · Δs
Tvol ×= exp(−α · Δs)   (Beer-Lambert law)

This uses front-to-back compositing: the accumulated transmittance Tvol starts at 1.0 and decreases as light is absorbed. The code skips computation when Tvol < 0.005 (negligible remaining transparency).

For the slim disk (optically thick), the contribution uses the source function formulation:

ΔI = (1 − exp(−τ)) · (j/α)

This correctly transitions between optically thin (τ ≪ 1, ΔIjΔs) and optically thick (τ ≫ 1, ΔIj/α) regimes [20].

18. Tone Mapping & Color Science

The simulation runs in linear HDR color space and applies a tonemapper to map to display range. Three modes are available:

ACES Filmic

The Academy Color Encoding System (ACES) filmic curve, standard in film and VFX. Provides pleasing highlight rolloff but can desaturate extreme colors.

AgX (default)

Troy Sobotka's AgX formulation, designed for superior handling of high-saturation, high-luminance colors without the hue shifts of ACES. Includes a "punchy" look transform with contrast around middle-gray (0.18) and saturation boost to preserve Doppler hue shifts.

Scientific (logarithmic false-color)

Mimics how scientific publications (e.g., EHT papers [14]) display accretion disk data: log-scale intensity mapped through the inferno colormap (matplotlib standard). This mode uses:

t = log2(1 + L · k) / log2(1 + 0.15 k)

where L is scene luminance and k = 80 · exposure. The result is mapped through a polynomial approximation to the inferno palette (purple → red → orange → yellow → white).

19. Planet Model

A spherical test body orbits the black hole on a Keplerian circular orbit, demonstrating:

Orbital kinematics

The planet uses the same circular-orbit local speed as the observer model, v = 1 / √(2(r − 1)), converted to coordinate angular velocity by

Ωplanet = −v · √(1 − 1/r) / r

so the orbital phase evolution is consistent with Schwarzschild coordinate time. As with the observer-motion control, the public planet-distance control clamps the orbit to r ≥ 3 rs so the reference body remains in the stable timelike-orbit regime.

Planet irradiation and beaming

The illumination temperature used for the planet is derived from accretion-flow temperature profiles and includes gravitational redshift at the emission radii. This is a black-hole-centered effective-source proxy rather than a resolved disk-patch illumination calculation. Planet brightness is also transformed with the same transfer-factor beaming model used for the disk:

20. Interior Black Hole & Analytical Escape Classification

Once the observer crosses the event horizon (r < rs), the standard exterior ray-tracing logic — march until the ray escapes to infinity or hits the horizon — breaks down. Inside the horizon all future-directed timelike and null worldlines must decrease in r (the radial coordinate becomes timelike), yet some past-directed photon geodesics through an interior observer can still originate in the exterior universe before the observer hits the singularity. The simulation uses an analytical pre-classification based on the Binet conserved energy to decide each ray's fate before entering the integration loop.

20.1. Binet Conserved Energy

The first-order Binet equation for photons in Schwarzschild spacetime is [1] [28]:

(du/dφ)² = u³ − u² + 1/b²

where u = 1/r and b = L/E is the impact parameter (in units where rs = 1). Rearranging, define the Binet conserved energy:

EBinet = (du/dφ)² + u² − u³

This quantity is conserved along the geodesic (it equals 1/b² = const). The term u² − u³ defines an effective potential barrier for photon orbits. This potential has a maximum at u = 2/3 (i.e., r = 1.5 rs, the photon sphere):

Vmax = (2/3)² − (2/3)³ = 4/9 − 8/27 = 4/27 ≈ 0.1481

This critical value Ecrit = 4/27 determines whether a photon can surmount the barrier and escape, or whether it is reflected back and captured [1] [28].

20.2. Escape vs. Capture Classification

For each ray traced backward from the interior observer (at uobs > 1, i.e., robs < rs), the shader computes the initial du/dφ from the ray's tangent vector and classifies it analytically before any integration:

Condition Outcome Physical meaning
du/dφ ≥ 0 Captured Ray is moving inward (increasing u = 1/r); it will hit the singularity.
du/dφ < 0 and EBinet ≤ 4/27 Captured Ray is moving outward but has insufficient energy to surmount the potential barrier at the photon sphere; it is reflected back and captured.
du/dφ < 0 and EBinet > 4/27 Originates outside The backward-traced ray has enough energy to clear the photon-sphere barrier and connect to the external universe. This ray therefore shows the distorted image of the outside sky.

This classification is exact for Schwarzschild null geodesics — it follows directly from the effective potential analysis of the orbit equation. It produces the characteristic shrinking sky window effect: as the observer falls deeper (larger uobs), more of the effective energy goes into the u³ term, leaving fewer rays with EBinet > 4/27. The cone of directions that show the outside universe narrows continuously until, at the singularity, it vanishes entirely [29].

Implementation detail: Because the vast majority of interior rays are captured (especially deep inside the horizon), the analytical pre-classification allows the shader to skip the expensive integration loop for those rays entirely, rendering them as black. Only the small fraction of escaping rays enter the geodesic integration, dramatically improving performance inside the black hole.

20.3. Analytical Exit Direction

For rays that escape, the simulation needs to determine where they hit the background sky. Rather than marching the ray all the way out (expensive and numerically fragile from the interior), the shader uses the Binet tangent formula to compute the analytical exit direction.

At any point along the geodesic, the 3D direction vector in the orbital plane is:

d = φ̂ / u · (du/dφ) / u²

where φ̂ and are the azimuthal and radial unit vectors. As u → 0 (ray reaching infinity), this vector gives the asymptotic propagation direction directly. The shader integrates only to the point where the ray exits the horizon (or to a safe outer radius), then uses this formula to reconstruct the exit direction on the sky sphere.

For escaping rays viewed from the interior, the simulation also applies a heuristic interior brightness boost to the background sky luminance:

fblue = 1 + 0.5 · √|1/r − 1|,   capped at 4.0

This is a presentation-oriented approximation meant to keep the interior view readable while suggesting the growing blueshift of escaping rays. It is not presented as an exact GR intensity law.

Accuracy: The escape classification is exact for Schwarzschild. The shrinking-window effect — a circular porthole showing the outside universe that progressively narrows as the observer approaches the singularity — matches the analytical predictions in Hamilton & Lisle (2008) [29] and the pedagogical visualizations by Hamilton "Inside a black hole" [30]. The NASA Goddard visualization by Schnittman (2024) shows the same effect using a full numerical ray-tracer [31].

21. Free-Fall Dive & Observer Frame

The simulation offers a "Dive" mode that drops the observer on a radial free-fall trajectory from rest at infinity into and through the event horizon. This is the simplest physically realizable infall: a test mass released from infinity with zero initial velocity.

21.1. Radial Free-Fall Trajectory

For a massive test particle falling radially from rest at infinity in Schwarzschild spacetime, the equation of motion in terms of proper time τ is [1] [29]:

dr/dτ = −√(rs/r)

In the simulation's units (rs = 1, c = 1):

dr/dτ = −√(1/r) = −r−1/2

This is integrated numerically using the RK2 midpoint method for stability:

k1   = -sqrt(1/r) * dt
rMid = max(r + k1*0.5,  0.01)
k2   = -sqrt(1/rMid) * dt
newR = max(r + k2,  r_min)

The renderer uses the locally measured radial speed of the falling observer relative to a static Schwarzschild frame:

v(r) = √(rs/r) = √(1/r)

This local speed approaches c as rrs. The simulation caps v at 0.998c to avoid numerical singularities.

Proper time to singularity: Integrating the equation of motion gives the finite proper time from the horizon to the singularity for the specific infall model used here (radial free-fall from rest at infinity) [1]:
Δτ = ∫0rs √(r/rs) dr = (2/3) rs = (2/3) · 1 ≈ 0.667
This is experienced as a very short time — about 66 microseconds for a 10 M black hole, or about 12 hours for M87* (6.5 × 109 M).

21.2. Locally Inertial Dive Frame

A real free-falling observer carries a locally inertial reference frame (a tetrad). In this simulation, the camera uses a simpler orthonormal spatial basis aligned with the infall direction, built with Three.js's makeBasis() from three orthogonal vectors:

This basis is passed to the ray-tracing shader as the observer's orientation matrix. The shader then launches rays in the camera sky, using this basis to convert pixel coordinates to 3D ray directions. Combined with the observer velocity used for aberration and Doppler calculations, this gives a coherent dive presentation frame, but it is not a full GR tetrad construction or transport law.

21.3. Interior Rendering Pipeline

When the observer is inside the horizon (r < rs), the shader activates the interior mode, which changes several aspects of the rendering:

  1. Analytical pre-classification (Section 20.2) eliminates the numerical integration loop for most rays, which would otherwise waste the step budget on captured trajectories.
  2. Adaptive stepping is relaxed: the maximum allowed relative u-change is multiplied by a combined depth-dependent factor 3 + 2 · max(u − 1, 0). At the horizon (u = 1) this gives a 3× relaxation; deeper inside, the allowance grows linearly with u to handle the rapidly changing curvature. Additionally, an extra horizon-proximity step reduction is applied: step ×= 1 − 0.6 · exp(−8 (u − 1)²), reducing the step by up to 60% near the horizon to improve accuracy in this critical transition region. A minimum step floor of 0.5π/NSTEPS prevents the step from collapsing to zero.
  3. Frame-drag clamping: The u³ frame-drag term (Section 5) uses min(u, 1.2) instead of raw u to prevent the spin correction from diverging at small r.
  4. Gravitational shift: The accretion disk redshift formula uses abs(1 − 1/r) to avoid taking the square root of a negative number inside the horizon.
  5. Shadow capture condition: In the exterior, capture is u ≥ 1; in the interior, two conditions apply: u < 0 (non-physical reversal — a numerical safety net) and u ≥ 20 (corresponding to r ≤ 0.05 rs, effectively the singularity cutoff where further integration is pointless).
Accuracy: The interior rendering faithfully solves the same Binet equation that governs photon trajectories in the exterior — the equation is valid everywhere outside the singularity. The technique of following photon geodesics backward from an interior observer is described in Hamilton & Lisle (2008) [29] and in the pedagogical visualizations by Andrew Hamilton at the University of Colorado [30]. The qualitative appearance — a narrowing window of the external universe surrounded by darkness — matches the NASA Goddard visualization [31] and the analytical expectations from Chandrasekhar's Mathematical Theory of Black Holes [28].

22. Cinematic Auto-Speed Envelope

In a real free-fall, the observer accelerates continuously and crosses the most visually interesting regions (the photon sphere and the event horizon) in a tiny fraction of the total infall time. To give users time to appreciate these regions, the simulation offers an auto-speed ("cinematic") mode that varies the playback rate as a function of the observer's radial position.

Speed envelope function

The effective playback speed is multiplied by a position-dependent factor:

f(r) = (1 + ffar) / (1 + fphoton + fhorizon)

where:

ffar = 2 · max(r − 3, 0) / 7    (speed-up far from hole)
fphoton = 3 · exp(−[(r − 1.5)/0.30]²)    (slow near photon sphere)
fhorizon = 5 · exp(−[(r − 1.0)/0.22]²)    (slow near horizon)
Regionr / rsApproximate fEffect
Far approach> 5~1.6Fast-forward through uneventful space
Near field3 – 2~1.0Normal playback
Photon sphere∼1.5~0.254× slow-motion at peak lensing
Between photon sphere & horizon1.2~0.6Moderate slow-down
Event horizon∼1.0~0.176× slow-motion at horizon crossing
Deep interior< 0.5~1.0Returns to normal speed

The Gaussian shape of the slow-down factors is chosen so that the transitions are smooth and continuous, with no abrupt speed changes. The photon sphere slow-down (width σ = 0.30) is broader than the horizon slow-down (σ = 0.22) because the photon sphere's lensing effects are visible over a wider range of radii.

Physics rationale: The photon sphere (r = 1.5 rs) is where light can orbit the black hole, producing the most dramatic lensing — higher-order Einstein rings and extreme magnification of the background sky. The event horizon (r = rs) is where the transition to the interior regime occurs, with the sky window beginning its collapse. Both are brief events in proper time but visually rich, motivating the slow-down.

23. Comparison with Reality

What the simulation gets right

Feature Simulation Reality / State of the art Match
Photon geodesics (Schwarzschild) Exact Binet equation, numerically integrated in the shader Exact analytical solution[1] Exact equation; rendered accuracy depends on the integrator and step budget
Shadow size & shape (Schwarzschild) Emerges from geodesic tracing rshadow = 3√3/2 · rs ≈ 2.598 rs Exact in the Schwarzschild limit; rendered edge sharpness is resolution-limited
Einstein ring(s) Naturally produced by ray tracing Well-established prediction[1] Correct Schwarzschild lensing structure; higher-order rings are step-limited
Photon sphere r = 1.5 rs r = 1.5 rs (Schwarzschild) Exact
Gravitational redshift Exact Schwarzschild transfer law for static sources; moving emitters use a static-plus-SR local approximation Confirmed experimentally (Pound-Rebka, GPS) Exact for static Schwarzschild sources; approximate once source motion, plunging flow, or spin-inspired modes are introduced
Gravitational blueshift (background sky) 1/√(1 − rs/r) for hovering observer; combined with kinematic Doppler for free-fall Exact GR prediction; time-reverse of gravitational redshift Exact transfer law; rendered sky colours remain spectrum-approximate and the explicit sky D3 boost is capped in extreme cases
Relativistic Doppler effect Full formula with transverse component Standard result in SR/GR Exact law; renderer uses safety clamps in extreme regimes, and visible colours are exact only for blackbody-based sources
Relativistic beaming (D³) Liouville invariant Standard result[20] Exact transfer law; thermal/background paths use safety clamps at extreme boosts, and explicit intensity scaling is still paired with approximate source spectra
Relativistic aberration Lorentz velocity addition Standard SR result Exact
ISCO formula Bardeen-Press-Teukolsky Exact for Kerr[8] Exact
Thin disk temperature profile T ∝ r−3/4(1−√(rin/r))1/4 Shakura-Sunyaev / Novikov-Thorne[10] Correct zero-torque thin-disk proxy; not the full spin-dependent Novikov-Thorne correction
Disk left-right asymmetry From Doppler + beaming Predicted by Luminet (1979)[18], confirmed by EHT Qualitatively correct
Circular-orbit time-dilation factor dτ/dt = √(1 − 3/(2r)) Exact for Schwarzschild[1] Exact Schwarzschild relation; implementation uses its inverse to advance scene time
Interior escape classification Binet conserved energy vs. Ecrit = 4/27 Effective potential analysis[28] Exact
Shrinking sky window (interior) Emerges from escape classification Hamilton & Lisle (2008)[29], NASA visualization[31] Exact Schwarzschild escape-cone geometry; brightness outside the cone includes a heuristic boost
Radial free-fall trajectory dr/dτ = −√(1/r), RK2 integration Exact Schwarzschild result[1] Exact equation, numerically integrated with a near-horizon velocity cap for stability

Where the simulation departs from reality

Feature Simulation Reality Impact
Kerr geodesics (exterior) Schwarzschild Binet equation with perturbative frame-drag correction and a small spin-dependent capture-threshold heuristic; Kerr equatorial angular velocity used for disk matter in "Kerr-inspired disk velocities" mode Full Carter-constant geodesics in Boyer-Lindquist coords[6] The photon shadow shape is approximately circular rather than the correct D-shaped silhouette. A full Mino-time Kerr geodesic integrator exists in the codebase but is WIP and not yet exposed in the UI. Disk matter motion in the disk-velocity mode is still simplified for SR Doppler/beaming.
Disk turbulence Procedural fBm noise MRI-driven MHD turbulence[12] Visual appearance is plausible but not physical. Real turbulence has different correlation structures and evolves according to MHD equations.
ADAF/RIAF model Hybrid power-law + Gaussian profile with configurable falloff (default β=2.5), opacity, and outer extent Full GRMHD simulations[14] Qualitatively captures the correct morphology (geometrically thick, optically thin torus). The configurable radial falloff and opacity allow tuning to match different GRMHD heating prescriptions. Lacks the detailed spiral structures, magnetic field topology, and time-dependent behavior seen in state-of-the-art GRMHD simulations.
Slim disk model Configurable H/R, opacity, and ISCO puff factor with plunging-region emission Full radiation-MHD simulations Correctly models the key qualitative features: geometrically thicker than thin disk, emission inside ISCO, radiation-pressure puffing near ISCO. The configurable parameters allow matching different super-Eddington accretion rates.
Jet model Parameterized analytic profiles with configurable base width and corona concentration GRMHD + radiative transfer[22] The more detailed jet mode captures the qualitative spine/sheath structure, parabolic collimation, and knot features. Corona emission uses r−3 scaling with configurable extent. The emission profiles are analytic fits rather than self-consistent solutions.
Milky Way Doppler colors Approximate spectral model Would need full spectral data per pixel Background galaxy colors under Doppler shift are approximate. The simulation estimates stellar temperatures from color ratios and re-applies the Planck spectrum, which is reasonable for stellar light but ignores nebular emission line spectra.
Self-illumination / reflection Analytical returning radiation flux enhancement Disk photons returning to disk after lensing True ray-traced reflections are omitted for performance. Replaced with a heuristic, Cunningham-inspired inner-disk flux enhancement that mimics the qualitative brightening without attempting a quantitative returning-radiation calculation.

Comparison with EHT observations

The Event Horizon Telescope (EHT) has imaged two black holes: M87* (2019) [14] and Sgr A* (2022) [26]. Both images show:

The EHT results are best matched by GRMHD simulations with the thick torus (ADAF/RIAF) accretion mode, which this simulation provides as an option. However, the EHT's full pipeline uses general-relativistic radiative transfer (GRRT) codes like RAPTOR [27] and BHOSS, which solve the full Kerr geodesic equations and couple them to GRMHD fluid data — a level of fidelity beyond the scope of a real-time WebGL simulation.

Comparison with Interstellar (2014)

The black hole "Gargantua" rendered for the movie Interstellar by James et al. (2015) [19] used similar techniques to this simulation:

24. Known Limitations & Approximations

25. References

  1. Misner, C. W., Thorne, K. S., & Wheeler, J. A. (1973). Gravitation. W. H. Freeman. ISBN: 0-7167-0344-0. — The standard graduate GR textbook. Chapters 25 and 33 cover Schwarzschild geodesics and black hole physics.
  2. Schwarzschild, K. (1916). "Über das Gravitationsfeld eines Massenpunktes nach der Einsteinschen Theorie." Sitzungsberichte der Königlich Preussischen Akademie der Wissenschaften, 1, 189–196. ADS. — The original paper deriving the Schwarzschild metric.
  3. Wald, R. M. (1984). General Relativity. University of Chicago Press, pp. 136–146. ISBN: 0-226-87033-2. — Thorough derivation of geodesics and black hole properties.
  4. Supplementary online summary: "Schwarzschild geodesics — Bending of light by gravity." Wikipedia. — Handy overview of the Binet equation and common numerical-integration approaches.
  5. Kerr, R. P. (1963). "Gravitational Field of a Spinning Mass as an Example of Algebraically Special Metrics." Physical Review Letters, 11(5), 237–238. doi:10.1103/PhysRevLett.11.237.
  6. Carter, B. (1968). "Global structure of the Kerr family of gravitational fields." Physical Review, 174(5), 1559–1571. doi:10.1103/PhysRev.174.1559. — Introduces the Carter constant, the fourth integral of motion for Kerr geodesics.
  7. Supplementary online summary: "Kerr metric — Frame dragging." Wikipedia. — Frame-dragging angular velocity Ω = −g/gφφ.
  8. Bardeen, J. M., Press, W. H., & Teukolsky, S. A. (1972). "Rotating Black Holes: Locally Nonrotating Frames, Energy Extraction, and Scalar Synchrotron Radiation." The Astrophysical Journal, 178, 347–370. doi:10.1086/151796. — Source of the ISCO formula for Kerr black holes.
  9. Supplementary online summary: "Innermost stable circular orbit." Wikipedia.
  10. Shakura, N. I. & Sunyaev, R. A. (1973). "Black holes in binary systems. Observational appearance." Astronomy & Astrophysics, 24, 337–355. ADS. Bibcode: 1973A&A....24..337S. — The foundational paper on geometrically thin, optically thick accretion disks.
  11. Novikov, I. D. & Thorne, K. S. (1973). "Astrophysics of Black Holes." In Black Holes (eds. C. DeWitt & B. DeWitt), Gordon and Breach, pp. 343–450. ADS. — General-relativistic thin disk model.
  12. Balbus, S. A. & Hawley, J. F. (1991). "A powerful local shear instability in weakly magnetized disks." The Astrophysical Journal, 376, 214–222. doi:10.1086/170270. — Discovery of the magnetorotational instability (MRI) driving accretion disk turbulence.
  13. Narayan, R. & Yi, I. (1994). "Advection-dominated Accretion: A Self-similar Solution." The Astrophysical Journal, 428, L13. doi:10.1086/187381. — Self-similar ADAF solution: n ∝ r−3/2, T ∝ r−1.
  14. Event Horizon Telescope Collaboration (2019). "First M87 Event Horizon Telescope Results. I. The Shadow of the Supermassive Black Hole." The Astrophysical Journal Letters, 875(1), L1. doi:10.3847/2041-8213/ab0ec7.
  15. Narayan, R. & Yi, I. (1995). "Advection-dominated Accretion: Underfed Black Holes and Neutron Stars." The Astrophysical Journal, 452, 710. doi:10.1086/176546. — Two-temperature ADAF with Te ∝ r−0.5.
  16. Esin, A. A., McClintock, J. E., & Narayan, R. (1997). "Advection-Dominated Accretion and the Spectral States of Black Hole X-Ray Binaries." The Astrophysical Journal, 489(2), 865. doi:10.1086/304822.
  17. Rindler, W. (1977). Essential Relativity: Special, General, and Cosmological (2nd ed.). Springer. pp. 143–149. ISBN: 0-387-90230-6. — Covers relativistic Doppler effect and aberration.
  18. Luminet, J.-P. (1979). "Image of a Spherical Black Hole with Thin Accretion Disk." Astronomy & Astrophysics, 75, 228–235. ADS. Bibcode: 1979A&A....75..228L. — The first computed image of a black hole with an accretion disk, showing the characteristic left-right asymmetry.
  19. James, O., von Tunzelmann, E., Franklin, P., & Thorne, K. S. (2015). "Gravitational lensing by spinning black holes in astrophysics, and in the movie Interstellar." Classical and Quantum Gravity, 32(6), 065001. doi:10.1088/0264-9381/32/6/065001.
  20. Rybicki, G. B. & Lightman, A. P. (1979). Radiative Processes in Astrophysics. Wiley-Interscience. ISBN: 0-471-82759-2. — Standard reference for radiative transfer, synchrotron radiation, and Liouville's theorem.
  21. Asada, K. & Nakamura, M. (2012). "The Structure of the M87 Jet: A Transition from Parabolic to Conical Streamlines." The Astrophysical Journal Letters, 745(2), L28. doi:10.1088/2041-8205/745/2/L28. — Observational evidence for parabolic jet collimation (z0.58).
  22. Mościbrodzka, M. et al. (2016). "General relativistic models of the jet in M87." Astronomy & Astrophysics, 586, A38. doi:10.1051/0004-6361/201527721. — GRMHD+radiative transfer models of M87's jet, calibrating spine/sheath structure.
  23. Tchekhovskoy, A., Narayan, R., & McKinney, J. C. (2011). "Efficient generation of jets from magnetically arrested accretion on rapidly spinning black holes." Monthly Notices of the Royal Astronomical Society, 418(1), L79–L83. doi:10.1111/j.1745-3933.2011.01147.x. — Magnetically arrested disk (MAD) jets with σ parameterization.
  24. Fromm, C. M. et al. (2022). "Impact of non-thermal particles on the spectral and structural properties of M87." Astronomy & Astrophysics, 660, A107. doi:10.1051/0004-6361/202142625. — Jet+disk modeling for EHT, reconfinement shock features.
  25. Blandford, R. D. & Znajek, R. L. (1977). "Electromagnetic extraction of energy from Kerr black holes." Monthly Notices of the Royal Astronomical Society, 179(3), 433–456. doi:10.1093/mnras/179.3.433. — The Blandford-Znajek mechanism for jet power extraction from spinning black holes.
  26. Event Horizon Telescope Collaboration (2022). "First Sagittarius A* Event Horizon Telescope Results. I. The Shadow of the Supermassive Black Hole at the Center of the Milky Way." The Astrophysical Journal Letters, 930(2), L12. doi:10.3847/2041-8213/ac6674.
  27. Davelaar, J. et al. (2019). "Modeling the polarization of the jet in M87 at 230 GHz." Astronomy & Astrophysics, 632, A2. doi:10.1051/0004-6361/201936498. arXiv:1905.02600. — RAPTOR ray-tracing code for GRMHD jet models.
  28. Chandrasekhar, S. (1983). The Mathematical Theory of Black Holes. Oxford University Press. ISBN: 0-19-850370-9. — Comprehensive treatment of geodesics in Schwarzschild and Kerr spacetimes, including the effective potential for photon orbits and the critical impact parameter.
  29. Hamilton, A. J. S. & Lisle, J. P. (2008). "The river model of black holes." American Journal of Physics, 76(6), 519–532. doi:10.1119/1.2830526. arXiv:gr-qc/0411060. — Describes the "river model" for visualizing black hole interiors; discusses what a free-falling observer sees including the shrinking sky window.
  30. Hamilton, A. J. S. "Falling into a black hole." JILA, University of Colorado. https://jila.colorado.edu/~ajsh/insidebh/. — Pedagogical visualization showing the visual appearance from inside a Schwarzschild black hole, including the collapsing sky window, blueshift, and appearance of the singularity.
  31. Schnittman, J. D. & NASA Goddard Space Flight Center (2024). "NASA's Black Hole Visualization Takes Viewers Beyond the Brink." https://svs.gsfc.nasa.gov/14681/. YouTube. — Full numerical ray-tracing visualization of a plunge into a supermassive black hole, showing the shrinking sky porthole, blueshift of the external universe, and multiple Einstein ring images from inside the horizon.
  32. Supplementary online summary: "Schwarzschild geodesics — Radial free fall." Wikipedia. — Derivation of dr/dτ = −√(rs/r) for a test mass falling from rest at infinity.
  33. Mościbrodzka, M., Falcke, H., & Shiokawa, H. (2016). "General relativistic magnetohydrodynamical simulations of the jet in M 87." Astronomy & Astrophysics, 586, A38. doi:10.1051/0004-6361/201526630. arXiv:1510.07243. — Introduces the Rhigh two-temperature prescription for electron heating in GRMHD simulations, used by the EHT collaboration.
  34. Event Horizon Telescope Collaboration (2019). "First M87 Event Horizon Telescope Results. V. Physical Origin of the Asymmetric Ring." The Astrophysical Journal Letters, 875(1), L5. doi:10.3847/2041-8213/ab0f43. — EHT Paper V: comparison of GRMHD models with observations, constraining Rhigh, spin, and MAD/SANE state for M87*.
  35. Mahadevan, R., Narayan, R., & Yi, I. (1996). "Harmony in Electrons: Cyclotron and Synchrotron Emission by Thermal Electrons in a Magnetic Field." The Astrophysical Journal, 465, 327. doi:10.1086/177422. — Analytic fitting functions for thermal synchrotron emissivity and absorptivity.
  36. Balbus, S. A. & Hawley, J. F. (1991). "A powerful local shear instability in weakly magnetized disks. I. Linear analysis." The Astrophysical Journal, 376, 214–222. doi:10.1086/170270. — Discovery of the magnetorotational instability (MRI) as the mechanism for angular momentum transport in accretion disks.
  37. Tchekhovskoy, A., Narayan, R., & McKinney, J. C. (2011). "Efficient generation of jets from magnetically arrested accretion on rapidly spinning black holes." Monthly Notices of the Royal Astronomical Society: Letters, 418(1), L79–L83. doi:10.1111/j.1745-3933.2011.01147.x. arXiv:1108.0412. — Magnetically arrested disk (MAD) simulations showing jet efficiencies exceeding 100%.
  38. Fishbone, L. G. & Moncrief, V. (1976). "Relativistic fluid disks in orbit around Kerr black holes." The Astrophysical Journal, 207, 962–976. doi:10.1086/154565. — Equilibrium torus solution used as standard initial conditions for GRMHD simulations.
  39. Ball, D. et al. (2018). "Electron and Proton Acceleration in Trans-relativistic Magnetic Reconnection." The Astrophysical Journal, 862(1), 80. doi:10.3847/1538-4357/aac820. — PIC simulations of electron acceleration in reconnection layers, motivating the κ-distribution model for non-thermal electrons.
  40. Noble, S. C. et al. (2010). "Direct Calculation of the Torque at the Inner Edge of an Accretion Disk around a Black Hole." The Astrophysical Journal, 711(2), 959–973. doi:10.1088/0004-637X/711/2/959. — GRMHD demonstration that magnetic stress at the ISCO is non-zero, contradicting the Novikov-Thorne no-torque boundary condition.
  41. Pandya, A. et al. (2016). "Polarized Synchrotron Emissivities and Absorptivities for Relativistic Thermal, Power-law, and Kappa Distribution Functions." The Astrophysical Journal, 822(1), 34. doi:10.3847/0004-637X/822/1/34. — Comprehensive synchrotron emission/absorption coefficients for thermal and non-thermal distributions.
  42. Cunningham, C. T. (1976). "The effects of redshifts and focusing on the spectrum of an accretion disk around a Kerr black hole." The Astrophysical Journal, 208, 534–549. ADS. — Classic returning-radiation treatment for black-hole accretion disks.
  43. Liska, M. et al. (2022). "Formation of precessing jets by tilted black hole discs in 3D global GRMHD simulations." Monthly Notices of the Royal Astronomical Society, 512(1), 995–1017. doi:10.1093/mnras/stac062. — Example GRMHD study used here only as qualitative motivation for disk-thickness variability and warps.
  44. Werner, G. R. et al. (2018). "Non-thermal particle acceleration in 3D relativistic magnetic reconnection in pair plasmas." Monthly Notices of the Royal Astronomical Society, 473(4), 4840–4861. doi:10.1093/mnras/stx2530. — Supports the use of non-thermal particle tails as qualitative motivation for the κ-distribution control.
  45. Penna, R. F. et al. (2010). "Simulations of magnetized discs around black holes: effects of black hole spin, disc thickness and magnetic field geometry." Monthly Notices of the Royal Astronomical Society, 408(2), 752–782. doi:10.1111/j.1365-2966.2010.17170.x. — GRMHD study showing continued stress and emission inside the ISCO.
  46. Bromberg, O. & Tchekhovskoy, A. (2016). "Relativistic MHD simulations of core-collapse GRB jets: 3D instabilities and magnetic dissipation." Monthly Notices of the Royal Astronomical Society, 456(2), 1739–1760. doi:10.1093/mnras/stv2592. — Cited here only as qualitative motivation for current-driven kink structure in the jet.

Document generated for the black-hole simulation project.
Last updated: March 2026.