Shortcuts: Shift + 1…6 switches modes (outside the sandbox the digit alone is enough, since in the sandbox 1–5 picks the mass), O opens this drawer, Esc closes it and mutes the sound. Each mode has its own shortcuts — the hint is below its panel.
GOALChallenges
Each challenge checks itself. Completed ones are remembered in this browser.
1Newtonian gravity and the sandbox
Any two bodies attract each other with a force proportional to the product of their masses and inversely proportional to the square of the distance between them:
F = G·m₁·m₂r²
In the sandbox every body feels all the others (the N-body problem). We compute the motion with the Verlet method using a very small, fixed step — a “symplectic” method, which keeps the total energy of the system almost constant (you can see it in the “ΔE drift” field). Units are arbitrary, and the force is slightly “softened” at very small distances so that collisions don't blow up numerically.
2Kepler's laws, vis-viva and orbit shapes
- 1st law: planets move on ellipses, with the Sun at one focus.
- 2nd law: the line from the Sun to the planet sweeps out equal areas in equal times — because the angular momentum h = r·v⊥ is constant. Close to the Sun the planet races; far away it slows down.
- 3rd law: the square of the period is proportional to the cube of the semi-major axis:
T² = 4π²GM·a³
The speed at any point of the orbit is given by the vis-viva equation (μ = GM):
v² = μ·(2r − 1a) ⇔ ε = v²2 − μr = −μ2a
The sign of the energy ε determines the shape of the path: ε < 0 — an ellipse (including a circle), ε = 0 — a parabola, ε > 0 — a hyperbola. For Newton's cannon firing horizontally at distance r:
v₁ = √(μ/r) (circular orbit), v₂ = √(2μ/r) = √2·v₁ (escape)
At Earth's surface v₂ ≈ 11.19 km/s, and at an altitude of 400 km v₁ ≈ 7.67 km/s.
3Orbital maneuvers
A short burn (an impulse Δv) changes the orbit, but the spacecraft stays where it is — so the new orbit always passes through the burn point. A prograde burn raises the opposite side of the orbit, a retrograde one lowers it. Radial burns rotate the orbit.
The Oberth effect
The change in energy from a burn depends on how fast you're already going:
Δε = v·Δv + Δv²2
The same Δv at periapsis (where you're fastest) gives the most energy. That's why it pays to fire the engine low and fast.
Hohmann transfer
The cheapest (for r₂/r₁ < 11.94) transfer between circular orbits: half an ellipse tangent to both orbits, with semi-major axis at = (r₁ + r₂)/2.
Δv₁ = √(μ/r₁)·(√(2r₂/(r₁+r₂)) − 1), Δv₂ = √(μ/r₂)·(1 − √(2r₁/(r₁+r₂))), t = π·√(at³/μ)
From a low 200 km orbit to geostationary: 2.46 + 1.48 ≈ 3.93 km/s and about 5.3 h of flight. From Earth to Jupiter: v∞ ≈ 8.8 km/s and about 2.73 years.
Orbital rendezvous
A lower orbit has a shorter period (Kepler's 3rd law). To catch a station flying ahead of you, you brake: you drop lower, circle Earth faster and after a few orbits climb back up right next to the station. Speeding up “in pursuit” raises your orbit and… you fall behind.
4Gravity assist
In the planet's frame the probe flies along a symmetric hyperbola: it leaves as fast as it arrived (|v∞| doesn't change); only the direction changes — by the turn angle δ:
e = 1 + rp·v∞²μ, sin(δ/2) = 1e, b = rp·√(1 + 2μrpv∞²)
In the Sun's frame we add the planet's velocity V:
vbefore = V + v∞,before, vafter = V + v∞,after
Both v∞ vectors have the same length, so their tips lie on a circle centered at the tip of V. Rotating along that circle changes the length of the sum — and that's the whole trick. A flyby behind the planet turns v∞ “forward” (gain), one in front of it turns it “backward” (loss). That's how MESSENGER, BepiColombo and Parker Solar Probe braked at Venus. The largest change in the velocity vector, equal to the circular speed √(μ/rp), comes from a flyby just above the atmosphere at v∞ = √(μ/rp).
Where does the energy come from? Momentum is conserved: M·ΔV = −m·Δv. The planet slows down (or speeds up) by a fraction m/M — for Jupiter and a 722-kilogram probe that's about 10⁻²¹ m/s.
Patched conics
Between planets we compute a Keplerian orbit around the Sun, and near a planet — a hyperbola around it. The boundary is the sphere of influence:
rSOI ≈ a·(m/M)2/5
For Jupiter it's a whopping 48 million km, for Earth about 925 thousand km. On the scale of the Solar System a flyby takes just a moment, so in the mission simulator it happens at a single point (the path has a “kink”).
5Lagrange points
We look from a frame that rotates together with the two masses (1 − μ and μ, distance 1, rotating 1 radian per unit of time). A centrifugal force and a Coriolis force appear. The effective potential:
Ω = x² + y²2 + 1 − μr₁ + μr₂, C = 2Ω − v² = const
The Jacobi constant C is conserved, so a particle can never enter the region where 2Ω < C (the forbidden zone). At five points the forces balance. L1, L2 and L3 lie on the line joining the bodies and are unstable (saddles). L4 and L5 form equilateral triangles with the two masses. Counterintuitively, they are the tops of potential “hills” — and yet the Coriolis force keeps bodies there, as long as
μ < μR = (1 − √(23/27))/2 ≈ 0.03852 (Routh's criterion)
Around L4/L5 particles move on “tadpole” orbits, and larger deviations give “horseshoe” orbits that encircle L3 and both points. The distance of L1 and L2 from the smaller body is approximately a·(μ/3)1/3.
6Spheres of influence, the Hill sphere and precession
rH ≈ a·(m3M)1/3
The Hill sphere is the region where the planet's gravity wins over the Sun's tidal force — it reaches roughly to the L1 and L2 points. The sphere of influence (SOI) is somewhat smaller and is used to switch orbits in “patched conics” calculations.
Precession: only a force of exactly 1/r² gives closed ellipses. Mercury's perihelion rotates by about 574″ per century; about 531″ of that is due to the other planets, and the remaining 43″ was only explained by Einstein's general theory of relativity.
!Model simplifications
- Everything happens in 2D, in a single plane. Planetary orbits are circular, with real radii and periods; planet positions come from the mean ecliptic longitudes at the J2000 epoch.
- Assists are computed with patched conics and a point-like sphere of influence: a flyby changes the direction of v∞ at a single point of the path. We assume that small trajectory correction maneuvers (TCMs) set the chosen flyby altitude — their cost (on the order of m/s) is ignored.
- The missions are schematic: the launch hits the first planet on the historical date, and each later flyby aims at the next planet without using the engine, so the model's dates differ from the real ones by days or months. For Cassini we moved the launch by 12 days (October 3 instead of October 15, 1997) and the DSM maneuver by a month (which makes the second Venus flyby 10 days earlier) so that the chain of flybys works on circular orbits. Voyager 2's flyby over Neptune's pole is replaced by an in-plane flyby.
- Burns are instantaneous (impulsive). Earth is a perfect sphere with no atmosphere (apart from a nominal minimum flyby altitude).
- Lagrange points: the circular restricted three-body problem — particles have no mass and don't affect each other.
- The sandbox uses arbitrary units and softened gravity.
Did you know…?
- Mariner 10 was the first probe to use a gravity assist from another planet: on February 5, 1974 it flew past Venus, which let it reach Mercury.
- On August 25, 2012, Voyager 1 left the heliosphere and became the first human-made object to reach interstellar space.
- Parker Solar Probe is the fastest object ever built by humans: on December 24, 2024, 6.1 million km above the Sun's surface, it was moving at about 192 km/s (about 690,000 km/h). It got that fast thanks to seven Venus flybys — all of them braking!
- Hitting the Sun is harder than escaping it. From Earth's orbit, escaping the Solar System takes about 12.3 km/s on top of Earth's speed, while “falling” into the Sun means shedding about 26.9 km/s of its 29.8 km/s.