The Swarm
Recently I watched a video on Ted.com. In the video Steven Strogatz talks about sync, in one segment he speaks about flocking behavior and lists the three simple rules that govern flocking. Later I found that this type of artificial flocking behaviour can be referred to as ‘Boids‘.
So yeah… I decided to code it up in Flash ActionScript 3.0.
The image on the left doesn’t really do the app justice.
Click more to see the app in action.
If you're curious about the various particle states:
Blue = A lonely particle. It's trying to meet its neighbour.
Green = A happy particle. It will head towards the mouse cursor.
Red = A particle that is too close to its neighbour and is in the act of moving away.
January 7th, 2009 by Peter Organa
January 9th, 2009 at 4:09 am
this is pretty cool.
thanks for posting the source, I’ve been trying to understang boids and flocking for a little while now.
nice job.
January 9th, 2009 at 5:33 am
cool.. i want to play with this. thanks for the source.
January 17th, 2009 at 2:28 pm
Hi. Nice job, thanks for providing the source. I cited it here:
http://sourceforge.net/forum/message.php?msg_id=6158007
and that thread will “eventually” get folded in with the OpenSteer doc.
March 13th, 2009 at 3:50 am
Pretty cool. And thanks for posting the source.
July 30th, 2009 at 4:09 pm
The angle of the boids are messed up when you leave the browser for a long time.
(not that it matters though).
July 30th, 2009 at 4:15 pm
Huh,
Weird Martin.
Thanks for the heads up 😀