🪐 Gravity & Orbits
🪐 Gravity & Orbits
Kepler's Laws
1st (Ellipses): Planets orbit in ellipses with the star at one focus.
2nd (Equal Areas): A planet sweeps equal areas in equal times — faster near the star.
3rd (Period): T² ∝ a³ — orbital period squared is proportional to semi-major axis cubed.
Gravity Orbit Simulator — Kepler's Laws Interactive
This orbital simulator uses velocity Verlet integration to accurately model gravitational orbits for five preset configurations: circular orbit, elliptical orbit, two planets, binary star, and moon system. Bodies leave glowing trail traces and optional velocity vectors on a zoomable starfield canvas. A Kepler's Laws reference panel is shown alongside the simulation, and per-planet radius and velocity overlays let you verify orbital mechanics quantitatively.
What you can do in this simulation
- Choose from 5 presets: Circular Orbit, Elliptical Orbit, Two Planets, Binary Star, Moon System
- Adjust simulation speed (1–10x) and zoom with +/−/RST buttons
- Toggle orbital trails, velocity vectors, and grid display
- View per-planet radius and velocity readouts on canvas
- Reference Kepler's Laws panel shown alongside the simulation
Concepts covered
Kepler's laws · gravitational orbits · velocity Verlet integration · binary star system · orbital period · centripetal acceleration
How gravity creates orbits
An orbit is a balance between two things: gravity pulling a body inward, and the body's own sideways motion carrying it forward. If an object simply fell, it would drop straight into the star; if it moved sideways with no gravity, it would fly off in a straight line. An orbit is the middle case — the body keeps falling toward the star but keeps missing, because its forward motion carries it past. Newton pictured firing a cannonball fast enough that it falls all the way around the Earth; that is exactly what a satellite does.
The shape of the orbit depends on the speed. Too slow and it is a tight ellipse; at just the right speed it is a circle; faster still and the ellipse stretches out. This simulator integrates the gravitational force with the velocity-Verlet method, which conserves energy well over long runs, so orbits stay stable instead of spiralling from numerical error.
Experiments to try in this simulation
1. Circular versus elliptical: load the circular preset, then the elliptical one. In the ellipse, watch the body speed up as it swings close to the star and coast as it climbs away — the same speed-distance trade the real planets make.
2. Build a binary star: load the binary-star preset and watch two massive bodies orbit their shared centre of mass, each pulling the other.
3. A moon system: run the moon preset to see a hierarchy — a moon orbiting a planet that is itself orbiting a star.
4. Read the numbers: use the per-body radius and velocity overlays to confirm that a body moves fastest at its closest approach, exactly as gravity demands.
The physics
Gravity provides the centripetal force that bends a body's path into an orbit. For a circular orbit that balance gives an orbital speed of v = √(GM/r): the closer you orbit (smaller r), the faster you must move. This is why a low satellite races around Earth in about 90 minutes while the distant Moon takes a month.
Energy and angular momentum are both conserved along an orbit, which is what forces the speed-distance trade you see in every ellipse. Newton's law of gravitation, F = G·m₁m₂/r², underlies all of it, and its inverse-square form is the reason bound orbits are closed ellipses rather than some other shape.
Real-world applications
These are the rules that put and keep satellites in space. Communications and GPS satellites sit in carefully chosen orbits; the geostationary orbit, about 36,000 km up, has exactly a 24-hour period, so a satellite there hovers over one spot on Earth. Binary-star dynamics let astronomers weigh stars, and the tiny wobble a planet induces on its star is one of the main ways we detect exoplanets. The same two-body physics, extended, describes everything from ocean tides to the way stars orbit within galaxies.
Related simulations
- Solar System Simulator — Orbital Mechanics & Kepler's Laws
- Gravity Lab — N-Body Orbital Mechanics Simulator
- Acoustics & Sound Waves — Interactive Simulator
- Angular Momentum Simulator: The Spinning Skater Effect
- Black Hole Simulator — Gravity & Spacetime
- Brachistochrone Curve Simulator - Fastest Ramp
Browse all Physics simulations →
Related reading
Free to use in your browser — no signup required. Found a bug or have an idea to make it better? Tell us.
Finished experimenting?
Save one completion to this browser's signed guest ledger, or directly to your account when signed in.