Kepler problem




This is a demonstration of planetary motion. The bodies are treated as point masses and the system is two-dimensional. With suitable combinations of masses, initial positions and velocities, it is possible to obtain various kinds of stable orbits (e.g., earth-moon-sun).

When the system is at rest the use can add, move, or remove a body by clicking and dragging (drag out of the display to remove). Initial velocities are set by dragging the heads of the arrows (all physical units shown here are arbitrary). Mass (shown on a logarithmic scale) can be set for the selected body. When the system is running, clicking on the display shifts the midpoint; this allows the view to follow the motion. Note that when bodies are allowed to get too close together the numerical trajectory becomes inaccurate resulting in unphysical behavior (such as an "explosion").

The controls available to the user are start/stop, restart and view reset buttons, a pair of buttons used to zoom the display, a button for selecting whether the trajectories are shown in addition to the bodies, a button for translating the view so that the center of mass is fixed, and sliders used to set the gravitational field strength, the mass of the selected body and the number of timesteps between display updates (a larger value produces a faster but less smooth trajectory).

(c)   D. Rapaport