Orrery : Solar System Simulator

A Java Applet that simulates gravitating masses.
Solar system models and demos of Lagrange points, solar system stability, etc.

Solar System Models

This model has 70 planets and moons .
Getting Started: Click on "TO SCALE" to see the actual size of the planets. Of course it's mostly just empty space (what did you expect?).
Center on Earth and zoom in by clicking on the center of the display. Click on "PLAY" and notice how long it takes for Luna to revolve around the Earth (a month).
Now center on Jupiter and notice how much faster its moons move due to its greater gravity.
Turn "PLAY" off to see the names of the moons.

The larger bodies have been coloured. The smaller ones are shown as white except that some moons of Saturn have been colour coded (red, green and purple) to indicate resonances and Lagrangian relationships (see below).

This is a model of the Solar system and beyond. Center on a planet and zoom in to see the moons. To get a sense of astronomical scales, zoom out until you see Andromeda.

The model can be speeded up if the moons are left out (This is necessary due to limitations of the numerical method). Don't miss your chance to save the world.

Here is an even faster model including only the outer planets and some asteroids. Notice how the orbits of the asteroids are affected.

The orbits in these models are shown as circular in the plane. The orbits of Pluto and some moons are actually elliptical and inclined at various angles to the plane. For information on the Solar System see Bill Arnett's The Nine Planets .

Simple Orbits

These asteroids have just the right velocity to have circular orbits. Bodies with enough velocity to escape the sun's gravity have hyperbolic orbits, those with less velocity have elliptical orbits. Bodies having exactly "escape velocity" have parabolic orbits.

Lagrange Points

A small body orbiting 60 degrees ahead or behind a larger one will maintain that position. These points are called the L4 and L5 Lagrange points or Trojan points .
Here some asteroids orbit near a "Trojan point" of Jupiter.

For comparison here are the same asteroids without the planets.

These asteroids start out near the unstable Lagrange point L1 between a Jupiter and the Sun.

What if the planets were heavier?

If the planets were all very small they would follow elliptical orbits around the Sun. Actually they are massive enough that the forces between them cause ovservable deviations from these simple orbits.

The Sun is about 1000 times heavier than Jupiter. Here we keep the mass of the Sun constant while increasing the mass of the outer planets by a factor of 6 . If the factor is increased to 45 the system becomes very unstable. Watch Saturn for a few orbits.

Gaps in the asteroid belt

How well does this 2-dimensional model represent the physics of the solar system? Here is a test: The asteroid belt has bands where many asteroids are found, separated by gaps with few asteroids. Here the red and blue asteroids are in the bands at 3.04 and 3.40 AU while the white asteroids are in the gap at 3.27 AU

Unlikely Situations

Here is an asteroid belt orbiting binary stars.

The asteroids which start out at a certain angle have interesting orbits. (Not much happens for the first five orbits.)

And the fabled figure-8 orbit - almost.

Under construction. Asteroids in a retrograde orbit around the Sun graze the surface of Jupiter. This is the same model at three speeds:

Asteroids that fall near the Sun fly off at high speed. This is due to numerical error.

Frame(Menu option)

Should not be necessary since the models are now sized to fill 100% of the browser window (except for the example which is 400 X 500). Let me know if your browser doesn't understand 100%. The frame can be resized to give the maximum viewing area.

Destroying and Creating

Note : Try this feature on the " speeded up " Solar System. It is not working properly on other models. The problem is that the menus list only the moons of the centered planet ( otherwise there would be too many to fit on your screen).

Hint : Turn "PLAY" off before creating. Then you can always destroy and try again.

To re-CREATE a planet :
Click on its menu item under "CREATE", then click to set the position and drag to set the velocity.

While creating you may find the display confusing. Here's what's happening :
If you drag and then hold the mouse stationary with the button still pressed you will see a "preview". If you drag the mouse to a different location, the simulation will "rewind" and begin a preview for a different velocity. When you like the preview, release the button to finish creating.

Possible Future Enhancements

3D: The program has been written to allow for this.

A better numerical algorithm. The program just uses:

x --> x + v dt

v --> v + F/m dt

with a time step of unity. The time step limits how fast things can go ( or how close they can get ).

Can anyone supply better RGB values for the planets?.

Creating Models

The models are specified by parameters in the HTML files. (Specifications subject to change without notice.)

The parameter "howmany" is the total number of objects in the model. If the parameter "interacting" is less than "howmany" then objects numbered from interacting + 1 to howmany do not interact with each other. This speeds up the computation and can be used to study the behavior of "test particles".

Each numbered parameter has nine fields. When specifying absolute position and velocity the first field is zero:

To include satellites with circular orbits it is only necessary to specify the primary in the first field. The velocity will be calculated from the mass of the primary and the orbital radius.

If the radius is less than 1 it is a distance on the same scale as the orbital radii, otherwise it is a number of pixels (no scaling).

There is very little error checking or reporting when reading the parameters from the HTML page.

The gravitational constant is unity and the unit of distance (before zooming) is the pixel. Using

MG / r = v2

a small satellite r = 100 units from a mass M = 100 would need a speed v = 1 for a circular orbit

To make your own models start with this simple example .

Here, the STAR has mass 100, the PLANET starts at distance 100, angle 10, speed 1, direction north, and the MOON has a retrograde circular orbit of radius 10 from the PLANET.

Viewing offline

You can download the Applet (filename "Orrery.jar") by right-clicking on this link and selecting "Save link as" (in Netscape - other browsers may do it differently). You will also need to save the models you are interested in by right-clicking on the links above - for example, the "70 planets and moons" model is the file "scale.html". For convenience, also save this page, "index.html". All the files should be in the same directory, you may want to create a new one.

Then use "Open page" in your browser to open "index.html" in the directory where you have saved it.

Back to

Calgary Unix Users Group