🐦Flocking simulations are based on three rules: separation, alignment, and cohesion.
⚙️The p5 library provides useful functions for creating interactive graphics and animations.
📝The 'desired' velocity is calculated as the average velocity of nearby boids.
🔢The perception radius determines which boids are considered 'nearby' for alignment and cohesion.
🔄The steering force is calculated as the difference between the desired and current velocity.