Event Horizon
Sagittarius A*·4.3 million suns
Drag to orbit · Scroll to move closer · Right-drag to look around
A real-time general-relativistic ray tracer
Every pixel on this screen follows a ray of light backwards through curved spacetime, around a black hole four million times the mass of the Sun.
Compiling spacetime…
How it works
A camera normally gathers light that travels in straight lines. Near a black hole light falls, so this renderer runs the photon's journey in reverse: for each pixel it launches a ray from your eye and follows it back through the Schwarzschild geometry of a non-rotating black hole until it lands on the glowing disk, escapes to the stars, or crosses the event horizon.
In Schwarzschild coordinates, with u = 1/r, a light ray obeys the Binet equation
d²u/dφ² + u = 3⁄2 rs u²
which is exactly the orbit of a particle pushed by the fictitious force a = −(3/2) h² x / r⁵, where h = |x × v| stays constant. The fragment shader integrates this with velocity Verlet, with each step bounded by the integrator's local error: up to 480 steps for every pixel, every frame. The camera's local frame is converted to coordinates exactly, so the shadow edge lands within half a percent of the analytic critical impact parameter, 3√3⁄2 rs.
The disk follows the Novikov–Thorne temperature profile, T ∝ r−3/4(1 − √(rin/r))1/4, with its inner edge at the innermost stable circular orbit, 3 rs. Colours come from integrating Planck's law against the CIE 1931 colour-matching functions. Because Iν/ν³ is conserved along a ray, a blackbody at temperature T seen with frequency shift g is exactly a blackbody at g·T, so the Doppler shift, the beaming and the gravitational redshift all come from one lookup:
g = √(1 − rs/r) · √(1 − v²) ⁄ (1 − Ω bz)
Here v is the orbital speed of the gas, Ω its angular velocity and bz the photon's angular momentum about the disk axis. The same shift is applied to every star.
What you see depends on how you move. A hovering observer fights gravity with rockets and sees the universe shrink into a blueshifted window overhead. An orbiting observer sees the sky aberrated by their orbital speed. A falling observer moves with the light and sees a calmer sky. Each view applies relativistic aberration and Doppler shift for the observer's velocity before tracing begins.
The black hole does not spin, so there is no frame dragging. The disk is geometrically thin, and its turbulence is a texture rather than a fluid simulation. Light travel time across the scene is ignored.
Event Horizon
It needs WebGL2. A recent version of Chrome, Edge, Firefox or Safari on a computer or phone with a GPU will work.