Kepler discovered his three laws of planetary motion after a titanic analysis of years of astronomical observations by Tycho Brahe.
where M is the combined mass of the Sun and the planet and G is the universal gravitational constant. The xy-coordinates for the massless test particle are the relative position of the planet with respect to the Sun in this two-body approximation of the solar system.
Click on the image to start the applet.
Applet Planetary Motion.
Download the self-executable JAR file or a ZIP file with the XML source code for this example. To inspect and run the example, you will need to have EJS installed in your computer (see Installation), uncompress the downloaded ZIP file anywhere in the source directory of your EJS workspace and load it with EJS.