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.

And thanks to Arie for his tip about the Kimili WordPress Flash plugin

26 Dec, 2007, 23:28 o'clock

Add your own comment or set a trackback

Currently 2 comments

  1. Comment by stephan

    It’s a feature 😀 Though not one I put in on purpose, these algorithms tend to have a life of their own. I’ll put up the next stage soon. It’s funny how it also detects the mouse when dragging in the blog text (at least on Safari), must be a new feature of Flash player 9…

  2. Comment by Arie

    You’re welcome.

    I don’t know if it’s a feature or a bug, but when playing around too long, the upper half of the movie is completely green.

Add your own comment

Follow comments according to this article through a RSS 2.0 feed



This is a Flickr badge showing public photos from AcidCats. Make your own badge here.