Gravity Assist Simulator
Fly a probe past a moving planet and watch it steal orbital speed. Two live readouts show the trick: in the planet's frame the speed never changes, in the star's frame it jumps.
Scenario
The classic Voyager manoeuvre. The probe crosses behind the planet, gets dragged along by its orbital motion and leaves the encounter measurably faster around the star.
Drag from the launch point to aim. Velocity-Verlet, dt = 0.008, softening ε = 5.
How a gravity assist actually works
A gravity assist looks like free energy, and almost every casual explanation gets it wrong. The planet does not "pull the probe along" on the way in and then politely let go. Gravity is symmetric: the pull that speeds you up on approach slows you down by exactly the same amount on the way out. If the planet were sitting still, you would leave with precisely the speed you arrived with, and nothing would be gained.
The entire effect comes from one fact — the planet is moving. The trick only makes sense once you look at the encounter in two different reference frames, which is exactly what the two coloured panels above are showing you at the same time.
The standard analogy is a tennis ball thrown at a moving train. In the train's frame the ball bounces off the front of the locomotive at the same speed it came in with — a perfectly elastic bounce, no energy gained. But in the ground frame the train was already moving toward the ball, so the ball comes off far faster than it went in. A gravity assist is that same bounce, except gravity does the bouncing smoothly over millions of kilometres instead of in one hard impact.
The two frames, with the numbers
This is the heart of it. Watch both panels as the probe crosses the dashed sphere-of-influence circle:
- In the planet's frame the flyby is a hyperbola. The probe falls in, whips around, and climbs back out. Its speed at the same distance in and out is identical — only the direction of the velocity vector is rotated, by a turn angle δ. Energy relative to the planet is exactly conserved.
- In the star's frame that rotated vector gets added back to the planet's own orbital velocity. Rotating a vector and then adding a second vector to it does not preserve length — and that change in length is the delta-v the mission actually banks.
In the default Slingshot boost scenario the simulator measures roughly this, in its internal units:
| Quantity | Entering | Leaving | Change |
|---|---|---|---|
| Speed vs. the star | 3.05 | 3.84 | +0.80 (+26%) |
| Speed vs. the planet | 2.07 | 1.93 | −0.14 (essentially unchanged) |
The small residual drift in the planet-frame number is not physics — it is because the two samples are taken at slightly different distances from the star, where the star's own gravity has already changed the probe's speed. In an idealised two-body flyby that row would read exactly zero.
The theoretical ceiling is worth knowing: in the best possible case — a 180° turn in the planet's frame — the probe gains up to twice the planet's orbital velocity. That is an unreachable limit in practice (it would require an infinitely close pass at infinitesimal approach speed), but it sets the scale: at Jupiter, orbiting the Sun at about 13.1 km/s, the absolute theoretical cap is roughly 26 km/s.
Front or behind: the one control that flips the sign
The Flyby timing slider is the most instructive control on the page, because it changes nothing about the launch — same speed, same angle, same planet — and yet reverses the outcome:
- Passing behind the planet (trailing edge, negative timing): the probe crosses the space the planet is vacating and is pulled forward along the direction of orbital motion. It gains heliocentric speed and its orbit grows. This is the boost every outer-planet mission uses.
- Passing in front of the planet (leading edge, positive timing): the probe is pulled backward against the orbital motion. It loses speed and drops toward the star.
Try this: load Slingshot boost and note the Δv, then load Retrograde brake. The approach is nearly identical; only which side of the planet the probe crosses has changed, and the sign of the energy transfer flips with it. Then try Distant pass, where the probe stays far outside the planet's grip: the Δv collapses to almost nothing. Gravity assists are a close-range trick — the deflection angle, and therefore the gain, falls off fast with miss distance.
Where the energy comes from
Nothing is created. The probe's gain is paid for out of the planet's orbital energy, and the books balance exactly. Momentum conservation says the planet must recoil, slowing in its orbit by Δv_planet = −(m_probe / M_planet) × Δv_probe.
That mass ratio is what makes the trade so lopsided. A 700 kg spacecraft taking roughly 10 km/s from Jupiter, which masses about 1.9 × 1027 kg, slows Jupiter by around 4 × 10−24 m/s. At that rate Jupiter would need vastly longer than the age of the universe to move a single atomic diameter out of position. The planet is, for every practical purpose, an infinite energy reservoir — but it is a reservoir, not a loophole.
The simulator reports the probe's specific orbital energy, ε = v²/2 − GM/r, measured against the central star. The sign is the whole story: ε < 0 is a bound ellipse that will come back around, and ε ≥ 0 is a hyperbolic escape trajectory that never returns. Watch that number cross zero during a successful assist — that is the moment the probe stops being a captive of the star.
Missions that could not have flown without it
- Voyager 2 (1977): the Grand Tour. A geometry that places Jupiter, Saturn, Uranus and Neptune for a single chained sequence of assists recurs only about every 176 years. Voyager 2 caught that window, reaching Neptune in 1989 — a trip that would have taken roughly 30 years on a direct transfer, done in 12. It remains the only spacecraft ever to visit Uranus or Neptune.
- Cassini (1997): the VVEJGA route — Venus, Venus, Earth, Jupiter Gravity Assist. Four flybys over nearly seven years, because no launch vehicle then existing could throw a fully fuelled 5,600 kg orbiter straight at Saturn.
- Parker Solar Probe (2018): assists used in reverse. Seven Venus flybys deliberately shed orbital energy to drop the perihelion ever closer to the Sun, reaching about 6.1 million km in December 2024 at roughly 690,000 km/h — the fastest human-made object ever. Falling toward the Sun is expensive; you have to cancel Earth's 30 km/s of orbital motion, and Venus does that cancelling for free.
- Juno (2011): launched to a stretched orbit, then swung past Earth in October 2013 at about 560 km altitude, gaining roughly 3.9 km/s in one pass — enough to reach Jupiter.
- MESSENGER (2004): the opposite problem again. One Earth, two Venus and three Mercury flybys over six and a half years to brake enough to be captured by Mercury rather than fly straight past it.
The Oberth effect — related, but a different trick
These two are constantly confused. A gravity assist needs no propellant at all; it harvests momentum from a moving body. The Oberth effect requires you to burn an engine, and it says: burn it as deep in a gravity well as possible, where you are moving fastest.
The reason is that a rocket's useful output is a change in kinetic energy, and kinetic energy goes as v². A fixed Δv from the engine adds energy proportional to v·Δv, so the same burn buys far more energy when v is already large. Burning at periapsis of a deep well is therefore dramatically more efficient than the identical burn out in empty space.
Combining them gives a powered flyby: fall deep into a planet's well, fire the engine at closest approach, and collect both the free assist and the Oberth bonus in a single pass. It is the standard trick for missions that need every last metre per second.
What the simulator computes
The probe is integrated under full Newtonian gravity from the star and every planet, a = Σ GM(r_body − r)/|d|³, using velocity Verlet at a fixed step with many substeps per frame. Verlet is symplectic, so orbital energy stays stable over long runs instead of quietly drifting the way a naive Euler step would.
The planets are kinematic: they ride prescribed circular orbits and are not perturbed by each other or by the probe. That is a deliberate simplification. Real mutual perturbation would make the scenarios drift out of alignment and turn a teaching tool into an unrepeatable mess — and since the probe's back-reaction on a planet is around 10−24 m/s anyway, ignoring it costs nothing you could measure.
A softening term ε is added to each denominator so a direct hit produces a large but finite force rather than a division by zero. The before/after speeds are sampled where the probe crosses the dashed sphere-of-influence ring, which is the natural boundary of the encounter in patched-conic approximation — the same bookkeeping real mission designers use for a first-cut trajectory.