Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 993 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 993 Bytes

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