Skip to content

Simple n-body simulation implemented in Python using Pygame

Notifications You must be signed in to change notification settings

Alvaroia/N-Body-Simulation

Repository files navigation

N-Body-Simulation

Simple n-body simulation implemented in Python using Pygame. Features:

  • Bodies can be added by clicking and dragging in the screen.
  • New body mass can be modified using the slider in the top right corner.
  • New body initial velocity depends on how much the cursor is dragged from the initial position before releasing the key.
  • The simulation has two modes: pause mode and real-time mode.
  • In pause mode the future trajectory of the bodies is displayed when added new one.

Alt Text

  • In real time mode all bodies movement is simulated (new bodies can be also added)

Alt Text

Requirements: pygame, numpy. The entry point is in Simulation.py

About

Simple n-body simulation implemented in Python using Pygame

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages