The spacecraft's path around the planet is a real hyperbolic two-body orbit — the exact closed-form solution of Kepler's problem for unbound trajectories, not a fitted curve:
a = −μ / v∞² (semi-major axis)
e = 1 + rp·v∞² / μ (eccentricity)
p = rp·(1 + e) (semi-latus rectum)
r(ν) = p / (1 + e·cos ν) (orbit equation)
δ = 2·arcsin(1/e) (turning angle)
μ is the planet's real gravitational parameter, rp is the periapsis distance you set with the altitude slider, and ν is the true anomaly. The point moves along r(ν) using Kepler's second law (dν/dt ∝ 1/r², equal areas in equal times), so it visibly speeds up near periapsis exactly as a real flyby does — animation time is compressed for a real flyby lasts hours, the shape and speed ratios are not.
The heliocentric (Sun-frame) speed change is the classic patched-conic gravity-assist result: the planet's own orbital-velocity vector is added to the spacecraft's inbound and outbound v∞ vectors (same magnitude, rotated by δ). Passing on the planet's trailing side accelerates the spacecraft in the Sun's frame; the leading side decelerates it — the approach-angle slider lets you flip between the two.
- Distances on screen use a compressed radial scale for legibility — the physics numbers in the readouts are the real, uncompressed values.
- Speed (conserved) confirms energy conservation: in the planet's own frame, outbound speed always equals the inbound v∞.