Skip to content

johanbaumann/agent_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

N-Body Simulation

This repository contains a small interactive n-body physics simulation built with Python and Pygame.

Requirements

  • Python 3.11+
  • pygame library

Install dependencies with:

pip install pygame

Running the Simulation

Execute the script using Python:

python nbody.py

A window will open where you can interact with the simulation:

  • Left click to add a body at the mouse position.
  • Right click to remove the nearest body.
  • Press c to clear all bodies.

======= Bodies attract each other using a simple gravitational model. The simulation updates at 60 frames per second.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages