https://github.com/dheerajshenoy/balls
Simulation of particles in C++
https://github.com/dheerajshenoy/balls
Last synced: 17 days ago
JSON representation
Simulation of particles in C++
- Host: GitHub
- URL: https://github.com/dheerajshenoy/balls
- Owner: dheerajshenoy
- Created: 2024-08-22T17:35:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-23T03:19:19.000Z (10 months ago)
- Last Synced: 2025-01-23T04:20:00.205Z (10 months ago)
- Language: Makefile
- Size: 238 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# balls
Simulation of balls in C++.
# Demo
https://github.com/user-attachments/assets/d3ccf691-7886-46bf-8925-25b8eb24d38c
# Dependencies
SDL2
# Building
```bash
cd balls && mkdir build
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
cd build && make -j$(nproc)
```
The binary will be produced in the `bin` directory. Enjoy playing with your balls.
# Features
Creates balls of random radius, position, velocity, mass and color, but also making sure that all the balls appears inside the simulation box a.k.a the window. Resizing the window effects the boundary collision.
# Todo
- [x] Boundary collision
- [x] Ellastic collision
- [ ] Effecient overlap detection
- [ ] Effecient vector operations