A small demo that simulates and visualizes collisions between balls using a quadtree data structure for efficient collision detection. The project leverages the Raylib library for rendering.
5000 balls performance test, on my machine:
- Naive double loop: 2 FPS
- Quadtree: 40 FPS
Quadtree data structure: A generic quadtree data structure that can be used for any 2D spatial partitioning problem
-
Clone the repo
-
Build the project
cargo build
-
Run the project
cargo run