Watch the little bois flock around, and play with the sliders. See what sort of patterns emerge! Press space to show/hide the controls. >turn speed: How fast they turn. Higher values make them seem kinda hyper, don't you think? >speed: They can make sharper turns if they're slower. ># of birbs: Things start to slow down above 20, just so you know. >flock radius: How far a birb has to be from its nearest neighbor before it starts thinking about changing its direction to match. >spacing: How far away the birbs try to keep from each other, as a fraction of the flock radius. >trail length: Turn it up to 100 to watch them paint the whole stage. This actually took very little code - because of how the birbs render to begin with, I get the trail effect basically for free!
Birbs are simulated creatures, obeying very simple rules, and yet showing complex flocking behavior, like boids or fish. The rules are: Separation: Birbs try to avoid running into each other. Alignment: Birbs try to fly in the same direction as nearby Birbs. Cohesion: Birbs try to fly close to each other. My algorithm is a bit simplified from the "official" version, but they still flock beautifully. A fun side effect of how I've coded them is, if you look closely, they seem to wiggle like fish! Music: Vincent Rubinetti - Fractals, from The Music of 3blue1brown #Simulation #Simulations #Animation #Animations #Birbs (should it be 'animation' or 'animationS'? i've never really used tags before lol. If you're all the way down here... love and favorite pls?)