Special Relativity Simulator
Equations in this simulation
| v | Speed of the ship v (fraction of the speed of light c) | c = 299,792 km/s | |
|---|---|---|---|
| γ | Lorentz factor | 1 at rest, 1.25 at 0.6 c, 2.29 at 0.9 c, 7.09 at 0.99 c |
With the current values:
| h | height of the light clock | light bounces between two mirrors h apart; one tick is one round trip | |
|---|---|---|---|
| Δt | one tick of the moving clock, timed from the ground | seen from the ground, the light has to run along a slanted path to catch the moving mirror, at the same speed c, so the tick takes longer |
With the current values:
| Δτ | proper time: what the ship's own clock shows | it ticks γ times slower than the clocks it passes | |
|---|---|---|---|
| L₀ | proper length of the ship | 100 m, measured on board | |
| L | its length measured from the ground | shorter along the direction of motion only |
With the current values:
| d | Distance to a star for the trip (light-years) | Proxima Centauri is 4.2 light-years away | |
|---|---|---|---|
| τ_trip | time the travelers age on the way | the round trip ages them twice this, while everyone at home ages 2 t_trip: the twin paradox |
With the current values:
How to use the special relativity simulator
- Set the speed of the ship as a fraction of the speed of light. It flies past a clock at rest on the ground; the ship is drawn shortened by the Lorentz factor γ, and its own ruler shrinks with it, against the ground's ruler.
- Watch the two light clocks. On the ground, light bounces straight up and down between two mirrors. On the ship, seen from the ground, the light has to run along a slanted zigzag to keep up with the moving mirrors; it travels at the same speed c, so every tick takes longer and the ship's dial falls behind the ground's. The charts show the two clocks drifting apart.
- Set the distance to a star and read how long the trip takes on Earth and on board, and how much younger the travelers are after the round trip. The equations derive γ from the light clock with Pythagoras.
Frequently asked questions
What is time dilation?
A clock moving past you runs slow by the Lorentz factor γ = 1 ÷ √(1 − v²/c²). At 80% of the speed of light γ = 1.67, so the ship's clock ticks once for every 1.67 ticks of the clocks it passes. It is not a fault of the clock: everything on board, including the crew's heartbeats and aging, runs slow in the same way.
How does the light clock prove it?
Light always travels at c for every observer. In the ship's own frame, light goes straight between mirrors h apart, taking 2h ÷ c. Seen from the ground, the mirrors move while the light is on its way, so it travels the hypotenuse of a triangle: (c Δt ÷ 2)² = (v Δt ÷ 2)² + h². Solving gives Δt = (2h ÷ c) ÷ √(1 − v²/c²), longer by exactly γ.
What is length contraction?
A moving object is shorter along its direction of motion by the same factor: L = L₀ ÷ γ. A 100 m ship at 0.8 c measures 60 m from the ground. On board nothing looks different; it is the ground and the distance to the star that are contracted, which is how the crew explains reaching the star in less of their own time.
What is the twin paradox?
One twin flies to a star and back at high speed while the other stays home. The traveler comes back younger, by 2(t − τ). It is not a contradiction, because the two situations are not symmetrical: only the traveler turns around and changes frame. The effect is real and measured: muons from cosmic rays survive to reach the ground only because their clocks run slow, and GPS satellites correct for it every day.
It says WebGL is turned off.
The 3D view needs WebGL, which every current browser has. It can be switched off by hardware acceleration being disabled in the browser settings, or by a very old graphics driver. Turn hardware acceleration on, or try another browser.
Is anything uploaded?
No. The simulation is drawn by your own browser with WebGL; nothing is sent anywhere, and it keeps working offline once the page has loaded.