Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aaronmcleancs/particlebox

Multithreaded particle dynamics engine using spatial hashing and quad tree collision detection to simulate forces among particles.
https://github.com/aaronmcleancs/particlebox

data-structures multithreading physics-simulation sdl2

Last synced: about 12 hours ago
JSON representation

Multithreaded particle dynamics engine using spatial hashing and quad tree collision detection to simulate forces among particles.

Awesome Lists containing this project

README

        

Particle Simulation

Multithreaded particle simulation written in C++ using SDL2. Simulates basic physics interactions between thousands of particles.

Features

Spatial Partitioning
Replaced brute-force O(N²) collision checks with a partitioned grid.

Multithreading
Divided the particle set into chunks processed in parallel using threads.

Memory Management & Random Generation
Pre-allocated particle storage and replaced rand() with modern, thread-local rngs.

Installation

Prerequisites
- Homebrew (for macOS users)
- C++ compiler supporting C++11 or later
- SDL2 and SDL2_ttf libraries

Steps
1. Install SDL2 and SDL2_ttf
brew install sdl2 sdl2_ttf

2. Build the Project
make

3. Run the Simulator
./ParticleSimulator