A beautiful, real-time 3D simulation of flocking behavior using VPython. This project visually demonstrates how birds (boids) behave collectively by following simple local rules like alignment, cohesion, and separation โ resulting in natural, emergent movement.
- ๐ฆ Realistic 3D Boids simulation in a dynamic boundary box
- ๐จ Boids grouped by color with smoother bird-like motion
- ๐ง Natural flocking behavior: alignment, cohesion, and separation
- ๐ฅ Real-time camera controls and smooth trails
- ๐น๏ธ Interactive buttons to:
- Pause/Play
- Speed Up / Slow Down
- Spawn new colored groups randomly
Action | Key/Button |
---|---|
Pause/Play | UI Buttons |
Slow/Fast | UI Buttons |
Add New Group | Spawn Group button |
Rotate Camera | Drag Mouse |
Zoom | Scroll Mouse |
- Python 3.x
- VPython
Install dependencies:
pip install vpython