An exercise for a C/C++ module at ESPCI Paris. The goal is to simulate a system of N particles using event-driven programming. The simulation is done in two dimensions. We consider N disks in a box. These particles are "hard": the collisions between them and with the walls are elastic.
These instructions will get you a copy of the project up and running on your local machine.
SFML 2.4 is needed to build the project.
- Linux:
sudo apt-get install libsfml-dev
- macOS (if you're using Homebrew):
brew install sfml
Clone the project, then
cd molecular-dynamics/
mkdir bin
make
The program takes three arguments: the particles' radius, the empty space between the particles and the friction.
Run the simulation with:
./bin/mdsim radius spacing friction
- Samuel Diebolt - samuel.diebolt@espci.fr
This project is licensed under the MIT License - see the LICENSE.md file for details
- Done with help from Algortihms, 4th Edition.
- Jan Winkler - winkler@cs.uni-bremen.de - for the hsv2rgb function.