Physics GCSE • A-Level • IB • AP • University ●●○ Intermediate ★ Free

Orbital Gravity

Click and drag to launch planets. Observe how gravity shapes their paths.

G Constant:
New Body Mass: 10
Preset:
Bodies: 2
Simulation running

Newton's Law of Universal Gravitation

Every mass attracts every other mass with a force described by Newton's 1687 equation: F = Gm1m2 / r². The gravitational constant G = 6.674 × 10−11 m³ kg−1 s−2 is one of the fundamental constants of physics.

This single equation governs everything from a falling apple to the orbits of galaxies. In this N-body simulator, the positions of all bodies are updated each frame by computing all N(N−1)/2 pairwise gravitational forces — the same approach used in modern astrophysical simulations.

Kepler's Laws of Planetary Motion

Kepler's three laws (1609–1619) describe planetary orbits — all of which emerge naturally from Newton's inverse-square law:

  • 1st Law (Ellipses): Orbits are ellipses with the central mass at one focus.
  • 2nd Law (Equal Areas): A line from planet to star sweeps equal areas in equal times — planets speed up near perihelion, slow down near aphelion.
  • 3rd Law (Harmonies): T² ∝ a³ — the square of orbital period is proportional to the cube of the semi-major axis.

In the simulator, create a heavy central body and orbit a smaller one around it. Enable trails and observe the elliptical path, and watch the body speed up as it nears the centre.

Types of Orbits

An orbit's shape depends on the body's speed relative to the local escape velocity:

  • Circular: Velocity exactly perpendicular to radius — the rarest natural orbit.
  • Elliptical: v < ve — the most common; Earth, Moon, and most planets.
  • Parabolic: v = ve exactly — escapes with zero residual speed at infinity.
  • Hyperbolic: v > ve — escapes the system; e.g., interstellar object 'Oumuamua.

The N-Body Problem & Chaos

The two-body problem has an exact analytical solution (ellipses). Henri Poincaré proved in 1887 that the three-body problem and beyond has no general closed-form solution — the first discovery of deterministic chaos in classical physics.

Try adding 3 or more bodies of similar mass and observe the chaotic trajectories. Identical-looking initial conditions can lead to wildly different long-term outcomes — a visual demonstration of sensitive dependence on initial conditions, the hallmark of chaotic systems.

Key Equations

ConceptFormulaNotes
Newton's law of gravitationF = Gm1m2 / r²G = 6.674 × 10−11 m³ kg−1 s−2
Circular orbital velocityv = √(GM/r)Minimum speed for a circular orbit at radius r
Escape velocityve = √(2GM/r)Minimum speed to leave a gravitational field
Kepler’s third lawT² = (4π² / GM) a³Period T, semi-major axis a; verified in this simulation
Gravitational potentialU = −GMm / rPotential energy; negative, zero at infinity
N-body force stepsN(N−1)/2 per frameComputational cost grows quadratically with body count

Curriculum Links

LevelTopics
GCSE PhysicsGravity and orbits, Newton’s laws of motion, weight vs. mass
A-Level PhysicsGravitational fields, orbital mechanics, escape velocity, Kepler’s laws
A-Level Further MathsConic sections (elliptical orbits), differential equations of motion
University (Physics)Classical mechanics, Lagrangian/Hamiltonian formulation, central force problems
University (Astrophysics)N-body simulation, numerical integration (Runge–Kutta, Verlet)
PostgraduateCelestial mechanics, chaos in planetary systems, gravitational wave sources

🔒 Unlock All 32 Simulations

Get unlimited access to all 32 interactive simulations including Orbital Gravity, Double Pendulum, Fluid Dynamics, Quantum Mechanics, and more with MySimulator Premium.

View Premium Plans

Share this simulation

Send this page to students or colleagues.

Related simulations

Continue with similar experiments.