Toolyard

Special Relativity Simulator

Equations in this simulation

γ = 1 ÷ √(1 − v² ÷ c²)
vSpeed of the ship v (fraction of the speed of light c)c = 299,792 km/s
γLorentz factor1 at rest, 1.25 at 0.6 c, 2.29 at 0.9 c, 7.09 at 0.99 c

With the current values:

(c Δt ÷ 2)² = (v Δt ÷ 2)² + h² ⇒ Δt = (2h ÷ c) × γ
hheight of the light clocklight bounces between two mirrors h apart; one tick is one round trip
Δtone tick of the moving clock, timed from the groundseen 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:

Δt = γ Δτ, L = L₀ ÷ γ
Δτproper time: what the ship's own clock showsit ticks γ times slower than the clocks it passes
L₀proper length of the ship100 m, measured on board
Lits length measured from the groundshorter along the direction of motion only

With the current values:

t_trip = d ÷ v, τ_trip = t_trip ÷ γ
dDistance to a star for the trip (light-years)Proxima Centauri is 4.2 light-years away
τ_triptime the travelers age on the waythe 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

  1. 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.
  2. 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.
  3. 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.

More science simulations

Related calculators and tools

Related simulations