There’s a scene in Interstellar that has never left my head. The crew lands on a planet orbiting Gargantua, a huge black hole, and stays there a few hours. When they get back up, twenty-three years have passed for the man who stayed on the ship. Then come the messages from Earth: children who grew up, then grew old, talking to a father who for them never came back.
I always took it at face value, the way you take things in films: with a vague trust that there was real physics behind it. Kip Thorne was behind it, so yes. But I had never done the maths. How fast do you have to go before time really slows down? How close to a black hole? And which matters more, speed or gravity?
After Solar Drift, this time I wanted to use Claude for something more ambitious: a model of the relativistic effects of space travel, the ones I’ve always seen at the cinema, but with real numbers. The result is Time Drift, an app that runs in the browser.
The voyage
A rocket leaves Earth and accelerates at a constant 1 g, the same acceleration we feel standing up, so the crew travels in comfort. Halfway there it turns around and brakes. The destination is Sagittarius A*, the 4.3-million-solar-mass black hole at the centre of the Milky Way, 26,700 light-years from here.
Once there, the rocket spirals down until it skims the photon sphere, where even light orbits, and stays for a year. Then it climbs back out, crosses a group of three giant planets using the slingshot effect to change course, and heads home, again at 1 g.
On screen there are two clocks with calendars, one on Earth and one on the rocket. At departure they show the same instant. Then they drift apart, by a lot. The final result left me a little stunned: the crew ages just over 40 years, while 53,416 pass on Earth. Leave today and you land after the year 55,000.
What you see
- The view of the voyage: the rocket, Earth, the black hole with its accretion disk, the giant planets and the trajectory
- The two clocks with calendars, Earth and rocket, with the accumulated gap and the current rate (“1 s aboard = … on Earth”)
- At the bottom, the equations updating in real time: each term appears when it becomes relevant
- A small forward view showing how the sky distorts close to the speed of light
- A map of the whole route
Controls
- Play, pause, reverse playback and jumps between the 14 phases of the voyage
- Speed from ¼× to 4× and a draggable timeline
- Keyboard: space to pause, arrows to move, R to go backwards
- At the end the voyage restarts on its own
That much I can follow. But once we get to Schwarzschild metrics, rapidities and Kepler’s hyperbolas, my high-school physics waves the white flag. So for the details on formulas, calculations and how the model is built, I’ll hand over directly to Claude, who wrote all that and, apparently, even understood it.
Over to Claude
Thanks. Let me explain what’s behind the numbers. First, the view is schematic: distances ranging from 6,000 km to 26,700 light-years don’t fit on one screen. Directions and turning angles are true, distances are compressed. The numbers in the panels, on the other hand, are computed exactly.
Two ways to slow a clock
Relativity predicts two distinct effects. The first comes from special relativity: a moving clock runs slow compared with one at rest, by the Lorentz factor.
γ = 1 / √(1 − v²/c²)
The second comes from general relativity: a clock deep in a gravitational field runs slow compared with one far from any mass. For a spherical, non-rotating mass, the Schwarzschild metric applies.
dτ/dt = √(1 − rₛ/r) rₛ = 2GM/c²
rₛ is the Schwarzschild radius: 8.9 mm for Earth, 3 km for the Sun, 12.7 million km for Sagittarius A*. When both effects act, the factors multiply. The rate of the onboard clock relative to a distant observer is:
dτ/dt = √(1 − v²/c²) · ∏ √(1 − rₛ,ᵢ / rᵢ)
The model computes this product for every mass on the route (Earth, the Sun, Sagittarius A* and the three giants) and compares it with the same calculation for the clock on Earth. That one runs slow too, incidentally: it sits in the gravity wells of Earth and the Sun and loses about 1.06×10⁻⁸, one part in a hundred million.
Twenty years at 1 g
A rocket holding a constant acceleration g, the one the crew feels, never reaches the speed of light. The natural way to describe it is the rapidity φ, which grows linearly with onboard time τ:
φ = g·τ / c (rapidity) v = c · tanh φ t = (c/g) · sinh φ (time on Earth) x = (c²/g) · (cosh φ − 1) (distance travelled)
Here the Lorentz factor is γ = cosh φ, and it grows exponentially. Reaching the halfway point, 13,350 light-years out, takes just 9.9 years aboard. By then γ is 13,782, the speed is c minus 0.8 m/s, and one second aboard equals 3 hours 49 minutes on Earth. Braking is the same in reverse: the outbound leg takes 19.8 years for the crew and 26,702 for Earth.
With these formulas the onboard time of the 1 g phases is exact, not a numerical approximation. The gravitational correction, tiny on these legs, is added by numerical integration.
A year on the photon sphere
Around a non-rotating black hole there’s a special radius, 1.5 rₛ: the photon sphere, where even light can orbit. Below it there are no circular orbits. The rocket settles at 1.51 rₛ, just above, 19.2 million km from the centre.
At that distance a circular orbit needs 0.9901 c, as measured by an observer at rest at that point. Gravity and speed combine into a very clean form:
√(1 − rₛ/r) · √(1 − v²/c²) = √(1 − 3rₛ/2r) = 0.0814 (r = 1.51 rₛ)
One year aboard equals 12.3 years on Earth. One lap takes 11 minutes 37 seconds for a distant observer, so in that year the rocket completes about 555,600 of them. The orbit is unstable: in reality it would need constant corrections.
I owe Interstellar a clarification here. On Miller’s planet one hour is worth seven years, a factor of about 60,000. Around a non-rotating black hole, stable circular orbits end at 3 rₛ, where the factor is only 1.41. Closer in, orbits are unstable and the factor grows only as you approach the photon sphere, as the rocket in the model does. Gargantua, instead, spins almost as fast as physically possible (the Kerr metric), and it’s the spin that allows stable orbits so close to the horizon. Sagittarius A* spins too, but by how much isn’t well measured yet: the model treats it as non-rotating to keep the formulas readable.
The slingshot
To change course among the giant planets the rocket doesn’t use its engines: it uses gravity. Each pass is a hyperbolic orbit computed with the hyperbolic version of Kepler’s equation:
r = a · (e·cosh F − 1) t = (e·sinh F − F) / √(GM/a³) sin(δ/2) = 1/e (deflection angle)
One detail decided the speed of this phase. At 0.2 c even a planet of 13 Jupiter masses would deflect the rocket by a hundred-thousandth of a radian, which is nothing. A real slingshot needs a slow pass, so the rocket crosses the region at 150 km/s. The three giants then bend its path by 20°, 35° and 42.3°, passing 1.39, 1.61 and 1.86 planetary radii from their centres. The last angle is computed so that the rocket leaves already pointed at Earth.
Another clarification: relative to the planet, the speed after the pass equals the speed before. A slingshot changes speed only if the planet moves relative to the observer, as happens to probes that use Jupiter. The model’s planets, invented for the occasion, are at rest relative to each other, so they only steer.
It’s also the only stretch where the two effects are on a par: at 150 km/s the speed term is about 1.3×10⁻⁷, the gravity term of the largest planet 1.4×10⁻⁷. Over the whole voyage the three giants make the rocket fall behind by 4 milliseconds. Even an enormous planet barely touches time.
The final bill
The model keeps the contributions to the gap between the two clocks separate. When two effects act together, the gap is split in proportion to the logarithm of each factor, so the sum adds up exactly:
- Speed: 53,373 years
- Gravity of Sagittarius A*: 2.44 years
- Gravity of the giant planets: 4 milliseconds
- Gravity wells of Earth and the Sun: minus 4 hours 57 minutes. It’s negative because, far from the Solar System, the rocket’s clock runs slightly faster than the one left on Earth
In total: 40.7 years for the crew, 53,416 for Earth.
How it’s built
The whole voyage is computed once, when the page opens: about 15,000 points across 14 phases, each with its own formulas. For every point the model stores Earth time, onboard time, speed, the distance to each mass and the separate contributions to the gap. The animation interpolates between these points, which is why you can move forward, backward or stop at any moment without losing precision.
It also takes a few numerical tricks. At c minus 0.8 m/s, computing 1 − v²/c² directly would lose every significant digit, so the model starts from the rapidity. For gravity terms, which can be as small as 10⁻²⁰, it uses functions like log1p and expm1 that stay accurate close to 1.
The simplifications, in all honesty. The rocket is ideal and has unlimited energy. Earth and Sagittarius A* are treated as mutually at rest. The Sun’s motion through the galaxy, Earth’s rotation and orbit and the galaxy’s own potential are ignored, all below 10⁻⁶. The full list is in the app’s “Model and assumptions” panel.








