Gravity Sim
Fling planets and stars into space and watch gravity take over — orbits, slingshots, collisions and a three-body dance. Free · no download · works on phone & desktop
Drag on the space to launch a body like a slingshot — it flies opposite to your drag. A dashed line shows where it will go.
About Gravity Sim
Gravity Sim is a sandbox where every object pulls on every other object, just as Newton described. Drag anywhere in space to launch a body like a slingshot: it flies in the opposite direction of your drag, and a dashed line shows where gravity will take it. Launch a small planet sideways past a star and it falls into orbit; too slow and it spirals in, too fast and it escapes. When two bodies touch they merge into one, keeping their combined mass and momentum. Start from a mini solar system, a pair of binary stars, a lonely star, or the famous figure-eight solution of the three-body problem, where three equal stars chase each other along one looping path. The simulation uses a leapfrog integrator, so orbits stay stable for a long time. In the Orbit challenge you get one launch: put a planet into an orbit that circles the star three times.
How to play
- Drag on the space and let go to launch a body. It flies opposite to your drag — longer drags launch faster.
- The dashed line shows the predicted path. Choose what to launch: a small planet, a big planet or a star.
- Pick a starting scene under the board: mini solar system, binary stars, the figure-eight or a lonely star.
- Use Play / Pause, the speed menu and Trails; Clear removes everything except the central star.
- Orbit challenge: one launch only. Get your planet around the star three times without crashing or escaping.
Tips & strategy
- For a circular orbit, launch sideways (at right angles to the star), not toward or away from it.
- Closer orbits need more speed. Far out, a gentle push is enough.
- Launch a star near the solar system and watch the planets get pulled away.
- Pause, then drag to aim carefully with the prediction line before letting time run.
Frequently asked questions
How does the gravity simulator work?
Every body attracts every other body with a force proportional to their masses and inversely proportional to the square of the distance — Newton’s law of gravitation. The positions are updated many times per second with a leapfrog integrator.
What is the three-body problem?
It is the question of how three bodies move under their mutual gravity. In general there is no simple formula and the motion is chaotic, but a few special solutions exist, like the figure-eight orbit found in 1993 and proved in 2000.
What happens when bodies collide?
They merge into one body with the total mass. Their momentum is kept, so the new body moves at the combined, mass-weighted speed.
Why does my planet fall into the star?
It is moving too slowly sideways. Without enough sideways speed, gravity pulls it straight in. Launch it faster and more sideways.
Is the simulation realistic?
It follows real Newtonian gravity in game units, with a little smoothing at very short distances so close passes do not explode. Sizes and distances are not to scale.