Toolyard

Orbit Simulator

How to use the orbit simulator

  1. The planet starts at the chosen distance with a sideways speed. At 1 × the circular speed it goes round in a circle.
  2. Slow it down for an ellipse that dips in close to the star, or speed it up past √2 (about 1.41) to make it escape.
  3. Watch the planet rush through the near point and crawl at the far point, which is Kepler's second law.

Frequently asked questions

What are Kepler's laws?

Orbits are ellipses with the star at one focus; a line from the star to the planet sweeps out equal areas in equal times, so the planet moves faster when closer; and the square of the period is proportional to the cube of the semi-major axis, T² ∝ a³.

What is escape velocity?

The speed at which the planet's kinetic energy equals the gravitational energy holding it, √(2GM ÷ r), which is √2 times the circular orbit speed at that distance. At or above it the path is a parabola or hyperbola and the planet never comes back.

How is the orbit computed?

With a leapfrog integrator, which alternates half-steps of velocity and full steps of position. It conserves energy well, so the orbit stays closed instead of spiralling in or out as a simple Euler method would.

It says WebGL is turned off.

The 3D view needs WebGL, which every current browser has. It can be switched off by hardware acceleration being disabled in the browser settings, or by a very old graphics driver. Turn hardware acceleration on, or try another browser.

Is anything uploaded?

No. The simulation is drawn by your own browser with WebGL; nothing is sent anywhere, and it keeps working offline once the page has loaded.

Embed this tool on your site

More science simulations