Black Hole (3D)

Per-pixel ray tracing of light bending, the shadow, a Doppler-beamed disk, a precessing star and a probe falling in.

Presets

Playback

Black hole

Accretion disk and sky

Orbiting star

Infalling probe

Camera

Layers

Quality

Model check

The science

What the 3D scene does

Every pixel of the background is ray-traced through the Schwarzschild metric. For the camera at distance D and a pixel seen at angle θ from the hole, the impact parameter is b = D sinθ/√(1 - rs/D); the page integrates u'' + u = (3/2) rs u2 (RK4) for 768 rays and uploads u(φ) as a texture. The fragment shader looks the ray up, finds where it crosses the disk plane (the angles φ0 + kπ of the ray plane) and reads the radius there, so the near side of the disk, the image of the far side bent over the shadow, and the thinner higher-order images all come out of the same equations. The sky texture is sampled in the direction the ray started from, cosψ·a + sinψ·e.

Disk light: Doppler beaming and redshift

For gas on a circular orbit, Ω = √(GM/r3) and the observed-to-emitted frequency ratio is g = √(1 - 3rs/(2r)) / (1 - Ω ℓ), with ℓ the photon's angular momentum per energy about the disk axis. The disk colour uses a blackbody-like ramp at T ∝ r-3/4 times g and the brightness scales as g3, so the side moving towards you is bluer and brighter. The streak texture was rendered in Blender (Cycles) and rotates with the Keplerian shear.

The star and the probe

Both are meshes modelled in Blender and moved with the same geodesic integrator as the 2D page: the star on a precessing orbit (advance ≈ 3π rs/(a(1-e2)) per orbit, exact value from an elliptic-type integral) and the probe on a radial free fall from rest, whose proper time follows the cycloid r = (r0/2)(1 + cosη), τ = (1/2)√(r03/rs)(η + sinη) while the far-away clock t diverges at the horizon; the redshift of its light is 1 + z = 1/√(1 - rs/r).

Simplifications

Non-rotating hole, razor-thin disk with a made-up (but physically shaped) brightness profile and no self-occlusion beyond three plane crossings, no scattering or emission lines. The star and probe are drawn at their true positions as ordinary 3D meshes, so they are not themselves lensed and they are drawn in front of the ray-traced disk; the shadow hides objects behind it. The probe is drawn much larger than a real spacecraft so that you can see it. Ray tables are re-integrated when the camera distance changes, at 768 angular samples, so the thinnest photon-ring images are not resolved.

Units and the Schwarzschild solution

Distances are in units of the Schwarzschild radius rs = 2GM/c2 (2.95 km per solar mass), times in rs/c. The metric of a non-rotating, uncharged hole is ds2 = -(1 - rs/r) c2dt2 + dr2/(1 - rs/r) + r2dφ2 in the equatorial plane. A clock at rest at radius r runs at dτ/dt = √(1 - rs/r) and light from there is redshifted by 1 + z = 1/√(1 - rs/r) (third graph).

Light rays (experiment 1)

With u = 1/r and impact parameter b = L/E a light ray obeys (du/dφ)2 = 1/b2 - u2(1 - rsu), i.e. u'' + u = (3/2) rs u2. The page integrates this with RK4. Rays with b > bc = 3√3 rs/2 ≈ 2.598 rs escape with a deflection α(b) = 2∫0u0 du/√(1/b2 - u2 + u3) - π; far from the hole α ≈ 2rs/b + (15π/16)(rs/b)2 (the famous 1.75 arcsec at the Sun's limb is the first term). Rays with b < bc are captured; at b = bc light circles on the unstable photon sphere r = 1.5 rs. Pulses are drawn at a constant speed along the path; coordinate light speed near the hole (Shapiro delay) is not modelled.

Massive orbits (experiment 2)

A free particle with specific energy E and angular momentum L obeys (dr/dτ)2 = E2 - V(r), V = (1 - rs/r)(1 + L2/r2), dφ/dτ = L/r2, dt/dτ = E/(1 - rs/r). The extra -L2rs/r3 term (absent in Newton) shifts the periapsis every orbit by Δφ ≈ 3π rs/(a(1-e2)) (43 arcsec per century for Mercury) and removes stable circular orbits inside r = 3 rs (ISCO, where the circular-orbit L2 = 3 rs2c2). The page integrates the orbit in proper time with RK4 and compares the advance with the exact elliptic-type integral Δφ = 2∫-π/2π/2 dχ/√(u3 - u(χ)) - 2π, where u3 = 1 - ua - up is the third root of the orbit cubic.

Lensed sky (experiment 3)

An observer at radius D who sees a ray at angle θ from the hole has b = D sinθ / √(1 - rs/D). Tracing the ray back, it sweeps the angle ψ(θ) (sum of the inward and outward integrals) and so comes from the sky direction cosψ·a + sinψ·e. Pixels with b < bc (the shadow, angular radius asin(bc√(1-rs/D)/D)) are black. A source exactly behind the hole produces the Einstein ring where ψ = π. The split slider shows the same sky without gravity.

Physical numbers

Hawking temperature T = ℏc3/(8πGMkB) = 6.2×10-8 K (Msun/M) is far below the 2.7 K microwave background, so real holes grow rather than evaporate. The tidal acceleration across a body of length l is 2GMl/r3 = c2 rs l / r3; at the horizon of a 20 Msun hole it is a hundred billion g over 2 m, while for a supermassive hole it is tiny.

Simplifications

The hole does not rotate (a Kerr hole would be smaller, flattened and drag orbits), orbits are equatorial test particles (no emission of gravitational waves, no companion mass), the lensed sky treats the stars as a static distant background, and the observer is static. Everything is dimensionless apart from the physical-size readouts, which scale with the mass slider.

Loading model...
Loading Blender model...
Extra bending of light vs apparent angle
Disk Doppler factor and temperature
Star orbit effective potential
Probe fall: proper time vs far-away clock
Made with 🟠 Blender · Three.js