Type javac planets.java to compile frank's java planet simulator.
Type java planetsapp to run frank's java planet simulator.
You should now see a window that saids frank's java planet simulator.
Pan around using the arrow keys.
Zoom in and out using the plus and minus keys.
You can also resize the windows if you like.
Find the 2 planets.
The bigger one is the sun.
The smaller one is a planet.
Press the n key to make a new moon.
On the edit planet form enter this info.
x position | 50.0 |
y position | -300.0 |
z position | 0.0 |
x vector | -0.04 |
y vector | 0.1 |
z vector | 0.0 |
mass | 0.01 |
size | 3.0 |
Then press the update button.
You should see the moon move to the right place.
Press the x key to save the state.
Press and hold down the space bar to watch the sun, planet and moon orbit each other.
Press z to go back to the original state.
Go to file->save to save it.
That's it for now.