Playground · research instrument
Relativistic Starship Journey
Hold a constant proper acceleration — the steady push the crew feels — and special relativity does the rest. Watch ship time diverge from Earth time, the trip length Lorentz-contract, and the cosmic microwave background blaze into a hot forward spot, all traced on a live Minkowski spacetime diagram of the ship's hyperbolic worldline.
Independent research instrument — not claimed as MakerPortal shipped product code. Methods, equations, assumptions, and limitations are disclosed so you can inspect what the page does and does not establish.
Flight console
Flight plan
At this instant
0 c
1.00
0 ly
2.7 K
Minkowski diagram — Earth frame
space →, time ↑, light cone at 45°
Anatomy of the flight console
One acceleration knob, seven destinations, a Minkowski diagram, and three live readouts — all driven by four hyperbolic functions. Here is exactly what each piece computes.
The relativistic kinematics engine
- 01
Rapidity accumulator. The core of the computation is rapidity φ = aτ/c — it grows linearly with ship proper time τ. All other quantities derive from φ via hyperbolic trig: β = tanh φ (velocity / c), γ = cosh φ (Lorentz factor), ct = (c/a) · sinh φ (Earth time), x = (c²/a) · (cosh φ − 1) (distance traveled). No numerical integration — these are exact closed-form solutions for constant proper acceleration in flat spacetime.
- 02
Flip-and-burn trip. The ship accelerates at constant a for the first half of the coordinate distance, then flips 180° and decelerates for the second half, arriving at rest at the destination. The turnaround proper time τ_half is found by solving x(τ_half) = d/2 in closed form. The ship state function uses a mirrored time parameter for the deceleration phase: τ_effective = 2τ_half − τ.
- 03
CMB Doppler shift. The forward CMB temperature is T = T₀ × √((1+β)/(1−β)), the relativistic Doppler factor. At β = 0.99, the factor is ~14.1 → T ≈ 38 K ahead. Peak wavelength follows Wien's law: λ_peak = 2.898 × 10⁻³ / T K·m. The script reads CMB_TEMPERATURE = 2.725 K from the relativity.ts library constant.
The hyperbolic worldline — why ct vs x is a hyperbola
This is the invariant hyperbola: x = (c²/a)(cosh φ − 1), ct = (c/a) sinh φ. For any φ, (a·x/c² + 1)² − (a·t/c)² = cosh² φ − sinh² φ = 1. The light cone is the asymptote at 45°: x = ct where the hyperbola approaches but never reaches.
Minkowski diagram and live readouts
- 01
Minkowski diagram. Canvas-drawn with space (light-years) horizontal and time (years) vertical — ct axis goes up. The light cone from the origin is a dashed 45° line. The worldline is drawn by sampling shipState(τ) at 400 evenly spaced proper times from 0 to total τ. The diagram uses coordinate time vs coordinate distance — not proper time — because the worldline is what an Earth observer would measure.
- 04
Line of simultaneity. A dashed CTA-colored line with slope β intersects the worldline at the current ship position. Points on this line are simultaneous in the ship's instantaneous rest frame. At high β, the line tilts dramatically — the ship's "now" slices through Earth time at a steep angle, which is why the twin paradox works.
- 05
Trip summary readouts. Ship time, Earth time, peak velocity, peak Lorentz factor, contracted trip length, peak CMB temperature and wavelength, and turnaround time. All are computed once at recompute() via the flipAndBurn function in relativity.ts — the scrubbing playback just reads the already-computed state from the closed-form formulas.
Gear behind this build
Relativity stack · 5 picks
Relativity hardware5
$24.99KitEstes 1427 Alpha III Rocket-Building Kit, Beginner Flying-Rocket Model Kit for Ages 10+, Includes Launch Pad and Controller
Real rocket with 1g thrust-to-weight teaching proper acceleration — contrast with this page's constant 1g proper-acceleration hyperbolic motion where coordinate acceleration → 0 near c.
$399.98ModelLEGO 92176 Ideas NASA Apollo Saturn V Space Rocket and Vehicles, Spaceship Collectors Building Set with Display Stand [Amazon Exclusive], 14+ years
1:110 Saturn V with 1969 Apollo stages — build it while your virtual ship undergoes Lorentz contraction and relativistic Doppler shift of CMB to visible blue.
$6.23BookRelativity: The Special and General Theory (Dover Books on Physics)
Einstein's own derivation of Lorentz transformation and Minkowski spacetime — the same γ = 1/√(1-β²) this page computes to show ship time vs Earth time twin paradox.
$57.75BookSatellite Orbits: Models, Methods and Applications
SGP4 and TLE propagation — this globe computes ISS position client-side from real TLE elements using the same Kepler + J2 math Montenbruck derives.
$71.00BookSpacetime Physics
Defines hyperbolic worldline x = c²/a (cosh aτ/c -1), proper time, and Minkowski diagram — the exact equations this starship journey plots as you flip-and-burn to Proxima.
Prices shown were retrieved from the Amazon Product Advertising API on 19 July 2026 and are indicative only — the price and availability on Amazon at the time of purchase apply.
More gear across every app: the full Gear list →
Method & limitations
With rapidity φ = a·τ/c accumulated over ship proper time τ, the exact relations are β = tanh φ, γ = cosh φ, Earth time t = (c/a)·sinh φ, and distance x = (c²/a)·(cosh φ − 1). A flip-and-burn trip accelerates for the first half of the coordinate distance and decelerates for the second, arriving at rest. The forward CMB temperature is the 2.725 K monopole times the relativistic Doppler factor √((1+β)/(1−β)); its peak wavelength follows from Wien's law.
What is exact
The special-relativistic kinematics — hyperbolic worldline, time dilation, length contraction, and Doppler shift — are closed-form and exact for a point ship in flat spacetime under constant proper acceleration.
What it ignores
No general relativity (no gravity wells, no cosmological expansion — so the Gly-scale trip is a flat-spacetime idealization), no fuel or energy budget (the real thing is prohibitive), and no cosmic evolution of the background over the journey.
The kinematics live in src/lib/relativity.ts, unit-tested against the hyperbolic identity (a·t/c)² − (a·x/c² + 1)² = −1, the β→c asymptote, and the known 4.24 ly / 1g flip-and-burn result (~3.6 ship-years, ~5.9 Earth-years).
Two gotchas worth knowing
Float64 overflow at extreme rapidity
cosh(φ) and sinh(φ) overflow Float64 at φ ≈ 710. At 1g, this corresponds to τ ≈ 2.2 × 10¹⁰ seconds (~690 years) — well beyond any real mission but reachable with the "edge of observable universe" at 46.5 Gly. The trip to Andromeda (2.54 Mly) is well within range. When overflow occurs, the script displays an error banner and stops the diagram. The flipAndBurn function in relativity.ts checks Number.isFinite before returning.
Gly-scale trips ignore cosmological expansion
The special-relativistic formulas assume flat, static spacetime. At 46.5 Gly, the universe has expanded significantly since the light we see was emitted — special relativity alone cannot describe it. General relativity and the FLRW metric are required. The edge-of-universe destination is included for scale comparison only: "how long would it take if spacetime were flat?" — the answer (ship time) is surprisingly short (~24 years at 1g) due to time dilation, but the Earth time (~46.5 billion years) shows how meaningless this question is in a real expanding universe.
Copyable solver: constant proper acceleration in flat spacetime
The closed-form kinematics powering every number on this page. Port to any language — the math is just sinh, cosh, tanh.
JavaScript/TypeScript — flight kinematics
export const C = 299792458; // m/s
export const G = 9.80665; // standard gravity
export function gToMetric(g: number): number { return g * G; }
export function betaAtProperTime(a: number, tau: number): number {
return Math.tanh(a * tau / C);
}
export function gammaAtProperTime(a: number, tau: number): number {
return Math.cosh(a * tau / C);
}
export function coordinateTime(a: number, tau: number): number {
return (C / a) * Math.sinh(a * tau / C);
}
export function distanceTraveled(a: number, tau: number): number {
return (C * C / a) * (Math.cosh(a * tau / C) - 1);
}
export function cmbTemperatureAhead(beta: number): number {
const CMB_T0 = 2.725; // K
return CMB_T0 * Math.sqrt((1 + beta) / (1 - beta));
}
export function flipAndBurn(a: number, distance: number) {
const tauHalf = (C / a) * Math.acosh(1 + (a * distance) / (2 * C * C));
const totalTau = 2 * tauHalf;
const totalCoordT = 2 * coordinateTime(a, tauHalf);
const peakBeta = betaAtProperTime(a, tauHalf);
const peakGamma = gammaAtProperTime(a, tauHalf);
return { properTime: totalTau, coordinateTime: totalCoordT,
turnaroundProperTime: tauHalf, peakBeta, peakGamma };
}Constants and unit conversion
export const C = 299792458; // speed of light, m/s
export const LIGHT_YEAR = 9.4607304725808e15; // meters per light-year
export const JULIAN_YEAR = 31557600; // seconds per Julian year
export const CMB_TEMPERATURE = 2.725; // cosmic microwave background, K
export const WIEN_CONSTANT = 2.897771955e-3; // Wien's displacement law, m·K
// Peak wavelength from Wien's law
function wienPeak(temperatureK: number): number {
return WIEN_CONSTANT / temperatureK; // meters
}
// Example: Andromeda (2.54 Mly) at 1g
const a = 9.80665; // m/s²
const d = 2.54e6 * LIGHT_YEAR; // meters
const trip = flipAndBurn(a, d);
// → properTime: ~28.6 years ship, coordinateTime: ~2.54 Mly/c ≈ 2.54 Myr EarthFrequently asked questions
How long does it take to reach another star at 1g?
Because the ship accelerates the whole way (flipping to decelerate halfway), it approaches the speed of light and time dilation compresses the trip enormously for the crew. Proxima Centauri (4.24 light-years) takes about 3.6 years of ship time but roughly 5.9 years of Earth time. The galactic center, 26,000 light-years away, is about 20 ship-years — but ~26,000 Earth-years.
Why does the worldline curve toward the light cone?
On a Minkowski diagram (space horizontal, time vertical) a constant-proper-acceleration path is a hyperbola. As the ship gains speed its worldline tilts toward the 45° light cone but never crosses it — no amount of acceleration reaches c. The crew feels a steady 1g the entire time even as an outside observer sees them asymptotically approach light speed.
What happens to the cosmic microwave background at relativistic speed?
The isotropic 2.725 K background is beamed and Doppler-shifted. Directly ahead it blueshifts into a hot, bright spot (its temperature multiplied by the relativistic Doppler factor √((1+β)/(1−β))); directly behind it cools and reddens. At 0.99c the forward CMB peak shifts from the microwave band toward far-infrared and its apparent temperature climbs to tens of kelvin.
Is this simulation physically exact?
The special-relativistic kinematics are exact for a point ship under constant proper acceleration in flat spacetime: the hyperbolic worldline, time dilation, Lorentz contraction, and Doppler factor all come from closed-form equations. What it deliberately ignores is general relativity (no real gravity wells or cosmological expansion), the staggering fuel and energy such a flight would demand, and any redshift evolution of the background over cosmic timescales.
What is rapidity and why use it instead of velocity directly?
Rapidity φ = aτ/c is the natural velocity parameter in special relativity because it adds linearly: φ_total = φ₁ + φ₂. Velocity β = tanh(φ) saturates at 1, γ = cosh(φ), and the Lorentz transform becomes a hyperbolic rotation. At constant proper acceleration a, rapidity grows linearly with ship proper time τ — that simple relationship (φ = aτ/c) is why the hyperbolic worldline, time dilation, and distance formulas all simplify to clean sinh/cosh expressions. The script in src/lib/relativity.ts uses rapidity internally for all computations.
Shareable still
The instrument, captured—not illustrated.
This 16:9 frame is rendered from the real browser instrument above. It is the page's canonical preview for image search, link unfurls, and posts that need to show what the tool actually does.
Download 1280 × 720 JPEG