Gravity Fabric Lab

The classic rubber-sheet picture of gravity, made interactive. Drop pebbles, moons, planets, stars and black holes onto the fabric, watch heavier objects dig deeper wells, and see every body pulled toward every other one.

Screenshot of the Gravity Fabric Lab: a tilted purple grid dented into a deep well under a glowing yellow star, with a teal planet and small moon orbiting along curved trails, orange net-force arrows and teal force-pair arrows, and a control panel with mass choices, sliders and preset scenarios.
Planet Pat and its moon circle Sunny the star. The teal arrows are a Newton’s third law pair. Click the image to open the lab.

What you can do

  • Drop or throw masses. Pick a pebble (mass 1), moon (5), planet (20), star (100) or black hole (400). Click the fabric to drop it into orbit around the heaviest body, or drag before letting go to throw it.
  • Watch the fabric bend. The dent at each point comes from the gravitational potential there, so the deepest wells are where the pull is strongest.
  • Inspect the forces. Click any body to see its mass, speed and net force, plus F = Gm1m2/r2 worked out for each partner. The teal arrows always come in equal and opposite pairs, and the lighter partner accelerates more.
  • Run a scenario. A star with a planet and moon, binary stars with a circling moon, a black hole snacking on pebbles, and the stable figure-eight three-body orbit.
  • Change the view. Sliders for time speed, dent depth and viewing angle (all the way to top-down), with switches for force arrows and orbit trails. Bodies that touch merge and keep their combined momentum.

For teachers

Motion follows Newton’s law of universal gravitation in simulation units (G = 1), so the lab works for universal gravitation, orbits and Newton’s third law. The rubber sheet is an analogy, and the lab says so: a real sheet only sags because Earth’s gravity pulls it down, and general relativity curves time as well as space. That makes a good discussion question. The figure-eight preset uses the starting conditions published by Chenciner and Montgomery (Annals of Mathematics, 2000). It runs entirely in the browser, with no accounts and no data collection, and works on phones.

Direct link: brandoncomella-afk.github.io/physics-sims/gravity-fabric-lab.html