i About this experiment — click to learn the physics ▼
What you're looking at
A small satellite moves under the gravity of a single massive central body (a star or planet) fixed at the centre. You choose where the satellite starts, how fast it's moving, and in which direction; the simulation then computes its path. This is the classic two-body problem, and its solutions are the conic sections: circles, ellipses, parabolas and hyperbolas. Distances and speeds are in generic simulation units (the gravitational constant is set to 1).
Newton's law of gravitation
Every bit of the orbit is governed by a single force: gravity, pulling the satellite straight toward the central body, with a strength that falls off as the square of the distance:
a = −G·M · r̂ / r² acceleration on the satellite
The path is computed with a velocity-Verlet integrator, a symplectic method that conserves energy beautifully, so orbits stay closed instead of slowly spiralling from numerical error.
The shape depends on speed
At a given distance there's one special speed, the circular speed v_c = √(GM/r). The Speed control is set as a multiple of it, which determines the orbit's eccentricity e and therefore its shape:
- v = v_c → a perfect circle (e = 0).
- v < v_c → an ellipse; you start at apoapsis (farthest point) and fall inward.
- v_c < v < √2·v_c → a wider ellipse; you start at periapsis (closest point).
- v = √2·v_c → the escape speed: a parabola (e = 1), just barely unbound.
- v > √2·v_c → a hyperbola (e > 1): the satellite escapes forever.
Kepler's laws, visible on screen
- 1st law: bound orbits are ellipses with the central body at one focus — the dashed curve shows the predicted ellipse.
- 2nd law: the satellite sweeps equal areas in equal times, so it visibly speeds up near periapsis and slows down near apoapsis.
- 3rd law: the period depends only on the semi-major axis, T = 2π·√(a³/GM) — bigger orbits take dramatically longer.
Energy & the orbital elements
The specific orbital energy ε = v²/2 − GM/r decides everything: if it's negative the orbit is bound (closed), if zero or positive the satellite escapes. From the initial position and velocity the simulator derives the eccentricity, semi-major axis a = −GM/2ε, and the periapsis/apoapsis distances shown below the view.
Things to try
Set the speed to exactly 1.00 ×v_c for a clean circle, then nudge it to 0.7 and watch an ellipse form. Push toward 1.41 to see the orbit stretch open into an escape trajectory. Add a launch angle to tilt the ellipse, and increase the central mass to speed everything up.