Projects
Simulation
Flocking Birds
A boids sketch that shows how convincing group motion can come from small local steering rules.
JavaScript
p5.js
Simulation

Why It Is Useful
The project is useful as a visual model for decentralized systems. Instead of scripting every bird, the simulation lets each agent react to nearby neighbors, which makes the larger flock feel organic and adaptable.
Problem It Solves
Flocking behavior is hard to fake with fixed paths because every agent needs to respond to nearby movement without slowing the browser down.
Real-World Applications
- Drone swarm coordination where each unit only has local information.
- Crowd and traffic simulations for games, planning, and visualization.
- Spatial indexing in real-time systems that need fast nearby-object queries.
Concepts Used
- Alignment, cohesion, and separation steering forces
- Emergent behavior from local rules
- Quadtree-style spatial partitioning
- Real-time canvas rendering
Solution Used
- Each boid computes steering from nearby agents instead of from the whole flock.
- Neighbor lookup is accelerated with spatial partitioning so the sketch can scale to more moving objects.
- The visual layer keeps the rules inspectable, making cause and effect easier to see than in a static explanation.