Gravity and Space: From Newton's Cannon to Black Holes
Explore orbital mechanics, the inverse square law, Kepler's third law, and the extreme physics of black holes through five free interactive simulations on SciFunLab.
Gravity is deceptively simple. One equation — F = Gm₁m₂/r² — governs falling apples, orbiting moons, binary stars, and the curvature of spacetime near a black hole. The same formula, taken to its extremes, produces phenomena so strange they require general relativity to describe properly.
These five simulations walk the full range: from Newton's thought experiment about cannonballs to Hawking radiation evaporating a black hole.
Newton's Cannon: The Insight That Unified Falling and Orbiting
Newton asked a question in the 1680s: what if you fired a cannonball from a very tall mountain, fast enough that as it fell toward Earth, Earth curved away beneath it at the same rate? It would never land. It would orbit.
The Newton's Cannon simulation makes this visual. Fire the cannon at low speed and the ball follows a parabolic arc to the ground. Increase the speed gradually and the arc flattens. At a critical velocity — the circular orbital velocity v_c = √(GM/r) — the ball enters a circular orbit. Earth curves away at exactly the rate the ball falls toward it.
Push beyond that and the orbit becomes elliptical, with the launch point as the periapsis (closest point). Keep increasing speed until you reach escape velocity: v_escape = √(2GM/r). At this speed, the ball never returns — it has enough kinetic energy to climb out of Earth's gravitational well entirely.
Notice that escape velocity is exactly √2 times the circular orbital velocity at the same altitude. That factor of √2 appears because kinetic energy scales as v², and escape requires twice the energy of a circular orbit.
Gravity Force Lab: The Inverse Square Law Made Tangible
Newton's law says gravity weakens with the square of distance. Double the distance, quarter the force. Triple the distance, one-ninth the force. This is easy to write but surprisingly hard to feel intuitively.
The Gravity Force Lab gives you two masses on a ruler with a live force readout. G = 6.674 × 10⁻¹¹ N·m²/kg² is the gravitational constant — tiny, which is why gravity is the weakest of the four fundamental forces despite being the one that shapes the universe at large scales.
Drag one mass away from the other and watch the force arrow shrink. Then try doubling both masses simultaneously — force quadruples. The inverse square law and the linear mass dependence are two separate facts about gravity, and the lab lets you test each independently.
One exercise worth trying: set both masses to 1 kg, place them 1 meter apart, and read the force. You get about 66.7 piconewtons — less than the weight of a mosquito's wing. Then set them to the mass of Earth (5.97 × 10²⁴ kg) and the Moon (7.34 × 10²² kg) at their actual separation (3.84 × 10⁸ m), and the force jumps to nearly 2 × 10²⁰ newtons. That's the force holding the Moon in orbit.
Orbit Simulator: Kepler's Laws from Scratch
The Orbit Simulator integrates Newton's gravity law numerically using fourth-order Runge-Kutta (RK4) — a method that takes several small evaluation steps per frame to track curved trajectories accurately without accumulating errors.
Launch a planet around a star and you get an ellipse. This is Kepler's first law — not imposed as a constraint, but an emergent result of integrating F = Gm₁m₂/r² over time. The simulation draws the orbit in real time so you can watch the ellipse form.
Kepler's second law is also visible: the planet moves faster near periapsis (closest approach) and slower near apoapsis (farthest point). Click "show area sweep" and the simulation shades the area swept in equal time intervals — they're identical regardless of where the planet is in its orbit. This is angular momentum conservation made geometric.
Kepler's third law is T² ∝ a³, where T is orbital period and a is semi-major axis. Set up two planets with different orbital radii and measure their periods. The ratio T₁²/T₂² will equal (a₁/a₂)³ within the simulation's numerical precision. Adjust eccentricity using the launch controls and watch how the orbit's shape changes while the period depends only on the semi-major axis.
Planetary System: N-Body Gravity and the Figure-8 Orbit
Real solar systems have multiple bodies all pulling on each other simultaneously. The Planetary System simulation handles this with N-body integration — every body exerts gravitational force on every other body at each timestep, and positions are updated using Velocity Verlet integration, a method that conserves energy better than standard Euler over long simulation runs.
The default preset shows a star with several planets, including moons that orbit the planets rather than the star. But the most striking preset is the Figure-8 orbit — a configuration discovered mathematically by Alain Chenciner and Richard Montgomery in 2000. Three equal masses chase each other around a figure-8 curve indefinitely, a choreographic solution to the otherwise chaotic three-body problem.
Load it in the simulation and you'll see something that looks almost too tidy to be real gravitational physics. It's not just a visual curiosity: it demonstrates that gravity, despite producing chaos in the general three-body case, admits an infinite family of periodic solutions if you find the right initial conditions.
Black Hole Explorer: When Gravity Gets Extreme
The Black Hole Explorer covers the endpoint of gravitational collapse.
When enough mass concentrates in a small enough volume, the Schwarzschild radius — r_s = 2GM/c² — defines a point of no return: the event horizon. Inside it, the escape velocity exceeds the speed of light. Nothing, including light, can escape.
For the Sun, the Schwarzschild radius is about 3 km. For a stellar-mass black hole of 10 solar masses, it's 30 km. For the supermassive black hole at the center of M87 (6.5 billion solar masses, imaged by the Event Horizon Telescope in 2019), it's about 19 billion km — larger than our solar system.
The simulation shows what happens to objects falling in. Close to the event horizon, gravitational time dilation becomes extreme: clocks run slower in stronger gravitational fields (a consequence of general relativity). An infalling astronaut, from their own perspective, crosses the event horizon in finite time. An outside observer watching them fall sees them asymptotically slow down and never quite reach the horizon — redshifted into invisibility.
Spaghettification occurs when tidal forces — the difference in gravitational pull across an extended object — exceed the tensile strength of that object. For stellar-mass black holes, this happens well outside the event horizon. For supermassive black holes, an astronaut would cross the horizon before tidal forces become destructive.
Finally, there is Hawking radiation: the prediction (not yet observed directly) that black holes emit thermal radiation with temperature T ∝ 1/M. Smaller black holes are hotter. A stellar-mass black hole has a Hawking temperature of about 60 nanokelvin — far colder than the cosmic microwave background, so it absorbs more than it emits. But a small enough primordial black hole would radiate away entirely, ending in a burst of particles. The simulation models this evaporation for hypothetical small-mass black holes.
The Thread Running Through All Five
Each simulation uses the same equation — or its relativistic extension — applied at different scales and velocities. Newton's cannon and the gravity force lab are classical. The orbit simulator shows how simple numerical integration reproduces Kepler's laws exactly. The N-body simulation reveals the chaos that emerges when you add a third body. And the black hole explorer shows where Newtonian gravity gives way to general relativity entirely.
That progression — from a thought experiment about cannonballs to the evaporation of a black hole — is what makes gravity one of the most productive concepts in all of physics.
Try them:
All free, no account needed.