I’m experimenting a bit with flocking. Haven’t gotten as far a moving stuff in any interesting way yet, but it’s fun enough to fool around with maths I haven’t looked at for decades. In the sample below you can see how the vectors of attraction pull the birds (yeah right!) to the common center, while birdies that are close to each other get nasty long green repulsion vectors.
Click to make them start moving to the center, click again to stop the motion. Makes for a nice hedgehog at some point 😀
The source code is here. No fla file, code only.