Digital Physics Laboratory

PHYSICS LAB / 05

Gravity Slingshot

See how a moving planet redirects a spacecraft and exchanges orbital energy.

Interactive simulation
A gravity assist does not create energy. In an ideal flyby, incoming and outgoing spacecraft speeds relative to the planet are equal far from the encounter, while direction changes. A moving planet can transfer a tiny amount of its orbital energy to or from a spacecraft, changing spacecraft speed in the inertial frame. The planet's energy change is usually negligible because its mass is much larger.

Flyby workspace

Simulation time 0.000 s
PlanetSpacecraftv velocity · a acceleration · vrel planet-relative
Drag to pan · wheel/trackpad to zoom
Status ReadyModel Two-body isolatedCurrent range —Steps 0

Velocity vectors use camera world scale and are capped at 64 px; acceleration arrows are normalized to current acceleration magnitude. Planet and spacecraft graphics are not to physical scale; collision uses the physical radii below. Impact is recorded and stopped, without rebound.

Trajectory · selected display frame

Inertial coordinates · x (m), y (m)

Separation vs time · m

Speed vs time · m/s

Spacecraft inertial · Spacecraft planet-relative

Energy vs time · J

K spacecraft · K planet · U gravity · E total (isolated model)

Gravity-assist physics

Newton's law gives mutual acceleration between the bodies. A stationary planet can bend a hyperbolic path, but an ideal conservative encounter does not create a permanent far-field speed increase. With a moving planet, equal incoming/outgoing planet-frame relative speeds can correspond to different inertial spacecraft speeds. The energy exchange is balanced by the planet’s motion. The analytical angle below uses the asymptotic impact parameter approximation; this simulation instead integrates from finite-range initial conditions.

r = rₛ − rₚ · aₛ = −GMₚr/r³ · aₚ = +GMₛr/r³ · U = −GMₚMₛ/|r| · δ ≈ 2 atan(G(Mₚ+Mₛ)/(b v∞²))

Analytical hyperbolic angle: Not yet available.