An n-body simulation visualizer using C++ in OpenFrameworks.
Watch the YouTube video of it in action: https://youtu.be/PM9dYcsKkDI
How to install and run:
-
Download OpenFrameworks: https://openframeworks.cc
-
Download this repository within the
[openframeworks directory]/apps/myApps/
-
Download ofxBloom into
[openframeworks directory]/addons/
-
Using the Project Generator, navigate to the repository, and click on "Update"
All of the constants exist in the constants.h, which include scaling and the number of bodies in the simulation.
- kBodyCount: Number of bodies in the simulation
-
Pressing the left arrow will increase the speed by 2x
-
Pressing the right arrow will decrease the speed by 2x
-
Pressing 1 will reset the simulation with static bodies
-
Pressing 2 will reset the simulation with kinetic bodies
All code follows the Google C++ Style Guide.
MIT