Gravity Slingshot Orbital Simulator Back
Orbital Mechanics / Space Engineering

Gravity Slingshot (Gravity Assist) Orbital Simulator

Interactively simulate gravitational slingshot maneuvers. Adjust planet mass, velocity, and launch angle to see real-time velocity changes before and after flyby.

Parameters

3.0
+1.50 au/t
3.0 au/t
200°
Planet reference frame
Show velocity vectors
Show past trajectories (≤5)
Current Speed
— au/t
Speed Before Flyby
— au/t
Speed After Flyby
— au/t
Closest Approach
— au
Drag on canvas to set
spacecraft position & velocity

What Is a Gravitational Slingshot?

🧑‍🎓
Can a spacecraft really gain speed just by flying past a planet — without burning any fuel?
🎓
Absolutely. Think of a tennis ball bouncing off a moving wall — the ball picks up the wall's motion. When a spacecraft swings around a planet that is itself orbiting the Sun, the planet's orbital momentum gets transferred to the craft. Voyager 2 used four gravity assists — Jupiter, Saturn, Uranus, Neptune — to reach escape velocity and leave the solar system entirely.
🧑‍🎓
But I've read that in the planet's reference frame the spacecraft's speed doesn't change. So where does the energy come from?
🎓
Great point! In the planet's rest frame the spacecraft traces a hyperbolic arc and exits at exactly the same speed it entered — energy is locally conserved. The magic happens in the reference-frame transformation: because the planet is moving through the solar system, rotating the velocity vector in the planet frame corresponds to adding the planet's own velocity in the heliocentric frame. The planet loses an unmeasurably tiny amount of orbital energy — its mass is so enormous the slowdown is negligible.
🧑‍🎓
So approaching from the trailing side of the planet gives the biggest boost? What does that look like geometrically?
🎓
Exactly. The spacecraft approaches from behind the planet (relative to its orbital motion), gets slung around, and departs roughly in the same direction the planet is moving. Velocity vectors add constructively, giving a maximum theoretical gain of $2V_p$. Conversely, a leading-side flyby removes velocity — that's how the MESSENGER probe decelerated enough to enter Mercury orbit.

Physics Model

Newton's law of gravitation (force on spacecraft):

$$\vec{F}= -\frac{G M_p m}{r^2}\hat{r}$$

Equations of motion in 2D (relative position $\vec{r}= (x-x_p,\,y-y_p)$):

$$\ddot{x}= -\frac{G M_p (x-x_p)}{r^3}, \qquad \ddot{y}= -\frac{G M_p (y-y_p)}{r^3}$$

Numerical integration: 4th-order Runge–Kutta (RK4). Planet moves at constant velocity.

Maximum velocity gain from an ideal trailing-side flyby:

$$\Delta v_{\max}\approx 2\,V_p$$

$V_p$: planet orbital speed. Achieved when velocity vector is deflected 180° in the planet frame.

Real Mission Examples

Voyager 1 & 2 (1977): Multiple gravity assists at Jupiter and Saturn boosted both probes to solar escape velocity. Voyager 1 is now over 24 billion km from Earth — the most distant human-made object.

Cassini (1997): Four gravity assists (Venus ×2, Earth ×1, Jupiter ×1) delivered the Saturn probe with far less propellant than a direct trajectory would require.

MESSENGER (2004): Six gravity assists including three at Mercury progressively shed orbital energy for Mercury orbit insertion — the first spacecraft ever to achieve it.

Common Misconceptions and Points to Note

Here are some points where beginners often get tripped up when mastering this simulator. A major misconception is the idea that the closer you get to a planet, the more you can accelerate. While gravity does get stronger as you approach, real missions are limited by the "planet's atmosphere" and the "Roche limit" (the distance at which a satellite would be torn apart). For example, a Jupiter flyby at an altitude of 100,000 km is safe, but lowering it to 10,000 km risks the probe being destroyed by intense radiation belts. Even if it's possible in the simulation, a "safety margin" is essential for a real spacecraft.

Next, tips for setting initial conditions. The "approach velocity" and "approach angle" relative to the planet determine everything. Here, "approach angle" refers to the spacecraft's relative direction of approach against the planet's velocity vector. To maximize the effect in the simulator, the basic principle is to approach from almost directly behind the planet's direction of travel, in a nearly straight line. For instance, if you set the planet's velocity to $V_p=13\,\text{km/s}$ and the approach velocity to $V_\infty=10\,\text{km/s}$, passing at the optimal angle does not yield a theoretical maximum velocity increment of $\Delta v \approx 2V_\infty \approx 20\,\text{km/s}$. That's only in the planet's reference frame; note that the increment seen from the solar system is much smaller (on the order of a few km/s). Always be mindful of the reference frame when adjusting parameters.

Finally, regarding the simplification of the "three-body problem". This tool uses a simple two-body (planet-spacecraft) model, approximating the Sun's gravitational influence by having the planet move in a straight line at constant velocity. Therefore, it's not suitable for predicting long-term trajectories in the real solar system. In practice, you need "n-body simulations" that simultaneously consider the gravity of multiple celestial bodies. Think of this tool purely as a first step to understanding the physical essence of the flyby phenomenon.

Related Engineering Fields

The computational techniques behind this gravity slingshot simulator are widely applied in the world of CAE. The first example that comes to mind is automotive crash safety simulation. Just as a spacecraft bends its trajectory in a planet's gravitational field, a vehicle during a collision changes its trajectory (= deformation mode) while absorbing kinetic energy within the non-linear force field of "deformation." Both share the commonality of solving the equations of motion for a time-evolving system through numerical integration (RK4 in this tool).

Another is ion implantation simulation in semiconductor manufacturing. This is the process of accelerating and deflecting charged particles (ions) with electromagnetic fields to implant them into a silicon wafer. The Lorentz force acting on the particles is a central force, and its trajectory calculation is mathematically very similar to motion in a gravitational field. The approach of varying parameters to find the optimal implantation angle and energy is essentially the same as flyby optimization.

From a broader perspective, it also connects to the particle tracking method (Lagrangian method) in fluid dynamics. The behavior of microparticles in a fluid being captured, accelerated, or decelerated by a flow field (e.g., a vortex) overlaps with how a spacecraft is influenced by the "flow" of a planet's gravitational field. In this way, even seemingly specialized aerospace engineering techniques share a common foundational technology with many engineering fields: the concept of "particle trajectory calculation within a field."

For Further Learning

If this tool has sparked your interest in flybys, try taking the next step to dive deeper. The recommended learning path starts with understanding "conserved quantities". In a flyby, both energy and angular momentum are conserved in the planet's reference frame. Specifically, letting $r$ be the distance from the planet, $v$ the relative velocity, $G$ the gravitational constant, and $M$ the planet's mass, the specific energy $\varepsilon = \frac{v^2}{2} - \frac{GM}{r}$ and the specific angular momentum $h = |\vec{r} \times \vec{v}|$ remain unchanged before and after the flyby. From this fact, the relation $v_p^2 = \frac{2GM}{r_p} + 2\varepsilon$ between the periapsis distance $r_p$ and periapsis velocity $v_p$ is derived, which is the core determining the shape of the trajectory.

The next challenge is mastering the "patched conic approximation". This is an advanced approximation method that splits the flyby into a "hyperbolic trajectory near the planet" and "an elliptical trajectory with the Sun as a focus elsewhere" (patch), connecting the velocity vectors at the boundary (conic). Using this, you can roughly estimate the spacecraft's velocity within the solar system before and after the flyby with just paper and a calculator, without needing sequential integration like this simulator. It's an essential concept in practical orbital mechanics.

Finally, as a map for your future learning, keep in mind two major topics: "control optimization" and "probabilistic orbit determination". One is how to calculate the "optimal trajectory" that combines multiple flybys to reach a final destination (e.g., searching for an Earth-Jupiter-Saturn flyby trajectory using genetic algorithms). The other is "sensitivity analysis," which evaluates how unavoidable errors in orbit determination (e.g., a spacecraft position measurement error of a few kilometers) affect the accuracy of a flyby years later. These are the exciting next steps that bridge the gap from simulation to actual mission design.