Skip to content

A particle simulator written in C++ and SFML, using Verlet integration.

Notifications You must be signed in to change notification settings

Orbital-Web/ParticleSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Particle Simulator

A Particle Simulator written in C++ and SFML, and Thread Pools. The simulator has been greatly inspired by this video.

Features

  • Simulation using verlet integration method.
  • Customizable radius, mass, coef of restitutiton, starting position, velocity, and acceleration of particles.
  • Customizable display size, sub step count, and fps (physics behavior is dependent of fps).
  • Space partitioning
  • Multi-threading

The space partitioning and threading is still incomplete as it is still pretty inefficient and lags with a large number of particles.

Getting Started (Windows)

  1. Clone the repository
  2. Install g++
  3. Download SFML-2.6.0 (GCC MinGW) from https://www.sfml-dev.org/download/sfml/2.6.0/ and add it to the root directory
  4. Compile and run main.exe with the following commands
    g++ -c main.cpp -ISFML-2.6.0/include -DSFML_STATIC
    g++ -o main main.o -LSFML-2.6.0/lib -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
    del main.o
    main.exe
    

About

A particle simulator written in C++ and SFML, using Verlet integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages