Two-body orbits

by Dominic Ford

Simulation speed

Current orbital elements

Semi-major axis: pixels Eccentricity:
Argument periapsis: ° Period: seconds
Speed: pixels/sec Distance from center: pixels

Further information

This demo simulates the orbit of a low-mass object around a much more massive point-like object at the center of the display. According to Kepler's laws, the orbit of such an object takes the form of an ellipse, which is marked by the grey line.

To simulate a new orbit, click anywhere on the canvas and drag the mouse while letting go to give the object some velocity. The demo will then simulate the future trajectory of the object as it moves under the gravitational influence of the central mass.

Alternatively, click on the buttons "Reduce speed" and "Increase speed" to instantaneously change the speed of the object without changing its direction.