A few simple N-body simulations built using Simple 2D and Ruby 2D.
nbody.c
and nbody.rb
represents celestial bodies with varying masses, all attracted to each other. Run using make
and ruby nbody.rb
, respectively. Watch the video of it in action.
nbody_single.c
and 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.