nbody.rb represents celestial bodies with varying masses, all attracted to each other. Run using
ruby nbody.rb, respectively. Watch the video of it in action.
nbody_single.rb represents celestial bodies with equal masses and attraction to only a single point, the mouse cursor. Run using
make single and
ruby nbody_single.rb, respectively. Watch the video of it in action.