Gravity simulator
A gravity simulator shows how objects move under each other's gravitational pull. In our Orbit Simulator you launch up to six planets round a star and watch them follow Newton's law of gravitation: too slow and a planet falls in, at the right speed it circles, faster still it swings out on an ellipse, and beyond escape speed it leaves for good. It shows each body's speed, distance, period and eccentricity as it flies.
It opens on the four inner planets, Mercury, Venus, Earth and Mars, each launched at its real mean distance and speed from NASA's fact sheet, round a star of one solar mass.
Orbit Simulator
Launch planets and satellites and watch gravity shape their orbits
How to use the gravity simulator
- Under Scenes, pick a starting point: Inner planets, Outer planets, Bound or escape, Comet, or Planet and moon.
- Under Bodies, pick a body, or press Add a body (up to six). Set where it starts, in AU, and its speed along x and y, in km/s, or drag its launch arrow on the stage.
- Press Circular speed or Escape speed to set the exact speed for a circle or an escape from where the body is.
- Under Star and view, set the star's mass, from 0.1 to 20 Suns, and how far out to view. Turn on Bodies pull on each other to add their gravity on one another.
- Press play under Run. A dashed path shows where each body is heading, and the readouts give its speed, distance, the escape speed at that point, its orbit, period, eccentricity, and closest and farthest distances.
Distances are in astronomical units (1 AU is the Earth's mean distance from the Sun) and time in years. With bodies pulling on each other, each body's mass, in Earth masses, starts to matter, and the readout says the orbit is shaped by other bodies. Practice and help sets Kepler's third law, satellite speed and escape speed questions with worked solutions.
The physics behind the simulator
Every body is pulled towards the star by Newton's law of gravitation, F = GMm/r², so its acceleration is GM/r², whatever its own mass. From that one law come the speeds that decide an orbit:
| Speed | Formula | At 1 AU from the Sun |
|---|---|---|
| Circular orbit | v = √(GM/r) | 29.8 km/s |
| Escape | v = √(2GM/r) | 42.1 km/s |
Escape speed is always √2, about 1.41, times the circular speed at the same distance. For a bound orbit, Kepler's third law links the period T to the semi-major axis a. In years and AU round a star of M solar masses, it becomes T² = a³/M. Our Kepler's third law guide and gravitational force calculator guide cover the formulas.
Worked examples you can check in the simulator
Example 1: the inner planets
In the opening scene, the readouts give periods close to the real ones:
| Planet | Distance | Launch speed | Period in the simulator |
|---|---|---|---|
| Mercury | 0.387 AU | 47.4 km/s | 0.234 years |
| Venus | 0.723 AU | 35.0 km/s | 0.614 years |
| Earth | 1.00 AU | 29.8 km/s | 0.999 years |
| Mars | 1.52 AU | 24.1 km/s | 1.87 years |
Check Mars with Kepler's third law: T = √(1.524³) = 1.88 years. Real orbits are slightly elliptical, but these launches start each planet at its mean distance and speed, so the orbits come out almost circular. The Outer planets scene does the same for Jupiter, Saturn, Uranus and Neptune, with periods of 11.9, 30.2, 84.2 and 164 years.
Example 2: bound or escape
The Bound or escape scene launches five bodies from 1 AU at different speeds, all sideways:
| Launch speed | Orbit | Eccentricity | Closest and farthest |
|---|---|---|---|
| 20 km/s | Ellipse, period 0.519 years | 0.549 | 0.291 AU and 1 AU |
| 29.8 km/s | Circle, period 1 year | About 0 | 1 AU |
| 38 km/s | Ellipse, period 4.40 years | 0.628 | 1 AU and 4.37 AU |
| 42.1 km/s | Just bound, period about 10,000 years | 0.998 | 1 AU and 927 AU |
| 50 km/s | Escapes on a hyperbola | 1.82 | 1 AU, then no limit |
The 42.1 km/s body is a hair under the escape speed of 42.12 km/s, so it is still bound, on an ellipse reaching 927 AU. A sideways launch slower than circular speed puts the launch point at the far end of the ellipse; faster puts it at the near end.
Check the escape speed rule:
Example 3: a heavier star
Set the star to 2 Suns, put a body at 1 AU and press Circular speed. It sets 42.1 km/s, √2 times faster than round the Sun, and the period is 0.707 years, because T² = a³/M = 1/2. A body at 4 AU round one Sun takes √(4³) = 8.00 years.
Example 4: a comet
The Comet scene launches a body from about 6 AU at 6.39 km/s. It falls in on a long ellipse with eccentricity 0.939, swings round the star at 0.214 AU, closer than Mercury, and goes back out to 6.86 AU every 6.65 years. It moves fastest at its closest point, as Kepler's second law says.
Solar system simulator: what it can and cannot show
Use the Inner planets and Outer planets scenes for a solar system simulator: each is set up from real distances and speeds. Because the simulator holds six bodies at most, the eight planets come in two scenes rather than one. Turn on Bodies pull on each other, and the Planet and moon scene shows a moon circling a heavy planet as both go round the star.
- Flat, not 3D. Every orbit is in one plane.
- The star stays still. It is fixed at the centre, so the star's own wobble is not shown.
- No collisions between bodies. Bodies pass through each other; only the star can be hit.
- No satellites round the Earth. The central body is a star of 0.1 to 20 solar masses, measured in AU and years. For a satellite's orbital speed, use v = √(GM/r) by hand, or the Circular Motion Calculator.
Common mistakes
- Thinking a faster planet goes round more quickly. Launch faster from the same point and the orbit gets bigger, so the period gets longer.
- Thinking mass changes the orbit. Round a fixed star, a planet's orbit does not depend on its own mass. Mass matters only when bodies pull on each other.
- Using escape speed as "speed to leave the surface". Escape speed depends on where you start: from 1 AU it is 42.1 km/s, from Jupiter's distance, 5.2 AU, only 18.5 km/s.
- Confusing the circle with an ellipse. Most real orbits are slightly elliptical, with eccentricity between 0 (a circle) and 1.
Practise gravity and orbits in a short timed paper
Orbits and gravity come up in High School Physics and College Physics (Calculus Based) practice, and in GCSE Physics Higher and A-level Physics: Year 2 in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. For escape speed from a planet's surface, use the Escape Velocity Calculator.
Common questions
What is a gravity simulator?
How fast does a planet need to go to orbit?
What is escape speed?
Why are orbits elliptical?
Can I simulate the whole solar system?
Does the planet's mass affect its orbit?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Orbit Simulator
Launch planets and satellites and watch gravity shape their orbits
Open the tool - Test it
High School Physics
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
College Physics (Calculus Based)
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper