nickgs.com Learning. Living. Loving.



Boid Flow - 2D Boids with Processing

Posted by nick

In 1986 Craig Reynolds developed a technique to simulate the flocking of birds. I stumbled across various interesting examples of this technique. Well, I wanted to understand Boids and started playing around with this in Processing.

Basically, this results in a leaderless flocking visual. This post is a basic 2D representation that follows the boids pseudocode found here.

I would like to extend what I learned here to some cooler looking visuals. I think this is a good example of the vanilla algorithm without any fancy tricks (ex. flow fields, Perlin noise, 3D, etc). Take a look at the code, I have the three core rules to "Boiding" clearly outlined. The drawBoids() function is where all the magic happens.

We see this technique employed in alot of media (ads, video games, etc) today. I always love seeing this combined with a "hip hop" / graffiti style. This would also look cool projected on a huge wall!

If anyone has any input or suggestions for improvement don't hesitate to comment.

Launch the experiment



Recent Activity


Recent Work


Recent Experiments