A set of N-body simulations using Ruby 2D and Simple 2D
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.md
Makefile
README.md
nbody.c
nbody.rb
nbody_single.c
nbody_single.rb

README.md

N-body simulations

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.