A Simple Orbital Model
This model takes up to 100 bodies with their mass, X,Y location and X,Y velocities initialized in a plain text datafile, and calculates and displays their subsequent motion. The model also has body impact detection: when two bodies collide, the less massive body is subsumed into the more massive body, and momentum is conserved. Bodies are held in an array, and after a collision, the subsumed body is squashed out of the array. This reduction in array size speeds up the simulation.
The system of bodies shown in this applet are all of equal mass, arranged in a circle, and given initial random X,Y velocities. A large number of collisions occur, and near-misses which result in some bodies acquiring high velocities.
The Java class files, source code, html, and data file can be found in Orbit.zip along with notes about renaming them after MSDOS has mangled their names.