Event Horizon is a page where you fly a ship around a real black hole. Your clock and Earth's clock start together. They do not stay together.
Nothing you see is a video or a painting. For every pixel, every frame, a ray of light is traced backwards through curved spacetime on your graphics card, live, in the browser.
What is under the hood
- Light follows the null geodesic equation of the Schwarzschild metric, d²u/dφ² = −u + (3/2)u², integrated per pixel with fourth-order Runge–Kutta in at most 100 steps. Stepping in angle instead of distance is what makes it fast enough to run live. A ray is either captured (the black shadow), escapes (you see the sky, bent), or crosses the disk, two or three times near the photon sphere, which draws the thin photon ring.
- The disk glows by real physics: the Page & Thorne (1974) thin-disk formula, brightest at 4.78 Schwarzschild radii, each ring a blackbody, shifted by gravity and Doppler together. The side coming towards you is brighter and bluer, by g⁴.
- The ship flies a real timelike geodesic. Newton has r where general relativity has r − 3GM/c²; that one term makes orbits precess and turns circular orbits unstable below 3 radii.
- Two clocks, added up along the path you actually fly. At the station Earth runs 1.07× faster than you, at the innermost stable orbit √2×, and at the photon sphere without limit. Fall in, and from Earth you are never seen to cross.
- Three real black holes at their published masses: Sagittarius A* (4.3 million Suns), M87* (6.5 billion) and Cygnus X-1 (21 Suns). From mass and distance alone, the page computes Sagittarius A*'s shadow at 53.3 microarcseconds; the Event Horizon Telescope measured 51.8 ± 2.3.
- The sky is real too: NASA's Milky Way and 41,486 stars from the HYG catalogue, each at its catalogued position and colour.
- 45 tests against results known in advance. About 30 kB of code. 60 frames a second on a laptop. No account, no server, no tracking.
Everything in the film is real footage from the page, or drawn from the page's own equations.
Fly it: pratyushshivam.github.io/event-horizon/
Source: github.com/pratyushshivam/event-horizon
I'm Pratyush Shivam, CTO of Konfidio. More of what I build and write is at pratyushshivam.com.
Top comments (0)