Skip to content

An n-body visualization in C++ using OpenFrameworks 🌟πŸ’₯

License

Notifications You must be signed in to change notification settings

n3a9/nbody-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

nbody-simulation

An n-body simulation visualizer using C++ in OpenFrameworks.

Watch the YouTube video of it in action: https://youtu.be/PM9dYcsKkDI

nbody-sim-gif

Installation & Setup

How to install and run:

  1. Download OpenFrameworks: https://openframeworks.cc

  2. Download this repository within the [openframeworks directory]/apps/myApps/

  3. Download ofxBloom into [openframeworks directory]/addons/

  4. Using the Project Generator, navigate to the repository, and click on "Update"

Usage

Constant Settings

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

Simulation Settings

  1. Pressing the left arrow will increase the speed by 2x

  2. Pressing the right arrow will decrease the speed by 2x

  3. Pressing 1 will reset the simulation with static bodies

  4. Pressing 2 will reset the simulation with kinetic bodies

Development

Dependencies

ofxBloom

Code Style

All code follows the Google C++ Style Guide.

License

MIT

Releases

No releases published

Packages

No packages published