Skip to content

xLPMG/2D-GravitySimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D-GravitySimulator

2D n-body problem simulator using C++ and SFML

Deployment

in root dir, execute commands:

  • make (to compile)
  • make run (to run)

or in one command:

  • make ra (to compile and run)

Makefile has been tested on MacOS & Debian Linux

Usage

  • use WASD or arrow keys to navigate
  • zoom out: J
  • zoom in: K
  • add plants at the top of the main function, eg.: Body b1(mass, radius, position, velocity, stationary?, Color); and add the planet to Body bodies[1] = {b1};

Demo

screen1

screen2

About

2D n-body problem simulator using C++ and SFML

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published