Orbits with Gravity Lab

How Gravity Lab works:

Written in the simple computer language of Q-Basic 4.5, the software is compilable on native systems.  At the core is code that generates six n-dimensional arrays.  The six arrays correspond to variable requirements in 2-d space, they are velocity vector (in polar coordinates), velocity magnitude, mass, radius, x-position, y-position.  "n" corresponds to the number of total objects in the system.  Once data is gathered, either entered by hand, loaded from a file, or generated randomly, the simulation can begin.  There are three major divisions of the simulation, corresponding to object selection, object position change, and object velocity change, where the actual physics takes place.  The simulation begins with object 1, with initial velocity vo, and calculates the next change in velocity of object 1 from the acceleration generated by all other objects.  From the gravitational acceleration of object 2, for example, a new velocity vector for object 1 can be determined, and refined until object n's effect on object 1 is considered.  The sim goes down the line to object n, correcting the current velocity magnitude and vector until all acceleration effects are accounted for for all objects, then the sim erases the current position of all objects, displaces the objects dependant on their current (freshly calculated) velocities, redraws them, and returns to calculating new accelerations.  The result is a fairly accurate model of gravitational motion, in which the orbital properties discussed in mechanics can be seen.  Inaccuracies result with high velocities or close interactions (no collision detection is made).
It is advisable to read the readme.txt file to get a good feeling for how to use the software.


Contents:

How Gravity Lab works.
Characteristic orbits.
The Reduced Mass Theorum.
Characteristic orbits around the Center of Mass.
Chaotic motion and the limits of closed orbits.
Bibliography.
Credits.