Gravity Wells
by ArcadeLabAn orbital-mechanics sandbox you can play with in the browser. Drag from empty space to launch a small planet — the drag vector sets its starting velocity — and watch it orbit, slingshot, or escape under real Newtonian gravity from every star on screen. It makes the difference between a bound orbit and an escape trajectory something you feel, not just read about.
Frequently asked
What does Gravity Wells teach?
It shows how gravity depends on mass and distance, and how a moving object's initial velocity decides whether it falls in, settles into a stable orbit, or flies off forever. Because you set the launch velocity yourself, you can discover orbital mechanics by experiment.
How is the gravity simulated?
Each planet feels the summed gravitational pull of every star using Newton's inverse-square law, with a small softening term to keep the math stable during close passes. Velocity-Verlet integration with several substeps per frame keeps orbits smooth and stable.
Can I build a physics simulation like this myself?
Yes — it is a single self-contained HTML file using the 2D canvas API, no frameworks or build step. You can prompt an AI assistant to generate one and publish it on ArcadeLab by pasting the HTML at arcadelab.ai/publish.