The .f90 files in this directory make up a simple code for simulating the earth - moon system. The code is heavily annotated. Any questions at all then mailto:mijp1@york.ac.uk and I'll be happy to help. constants.f90 - simple module to store pi and a double precision type. gravity.f90 - a utility module for simulations of bodies - interacting under gravity. earthmoon.f90 - uses the above modules to integrate the equations - of motion for the earth moon system using Runge-Kutta. - (Hopefull you have all seen Runge-Kutta before in MAPLE) To compile on Linux .... gfortran -o earthmoon constants.f90 gravity.f90 earthmoon.f90 (the order matters) then you can execute the program ./earthmoon To plot the path of the moon, first filter the output to just contain the lines that contain "Moon" and then strip out the (x,z) coordinates: ./earthmoon | grep Moon | awk '{print $6,$8}' > Moon.dat You can then plot the output, e.g. xmgrace Moon.dat Try tweaking the initial conditions in earthmoon.f90 to change the orbit. You will need to re-compile each time you change the code. If you are feeling really brave, try adding in another planet!