Processing Sketch: Colorful Boids
Here’s a little sketch I made using Processing. It’s based on a standard flocking program that Benjamin and Mary F. were playing around with; I added a second flock, some randomness in their coloring, and the concept of “weight.” Heavier boids move slower, turn slower, beat their wings slower and are more pudgy in shape. I also gave them all trails, using a simple transparent rectangle placed between frames (a very computationally cheap way to do this.)
Below is a screenshot of the Processing sketch. Click to load the applet in your browser window and see it in motion. That link also has the source code for the sketch.
Note: Apologies for those who got spam in their RSS readers from this entry. After some Wordpress upgrades and removal of some suspicious files and users, I’m hoping that I have the spam kicked.
Related Posts:
- MoviePainter (February, 2009)
- Test (August, 2009)
- Building the Facebook Platform (November, 2007)
- Optimizing the Frontend (April, 2007)
- Fast-Forward Clouds (April, 2009)


July 26th, 2009 at 12:08 pm
Have you seen the description field in the RSS entry for this?
July 26th, 2009 at 12:32 pm
Dammit! Hacked again. I’ve cleaned up the theme using the excellent Theme Authenticity Checker plugin, but I can’t figure out how the code in getting injected in the first place…
July 26th, 2009 at 3:30 pm
You might want to check for this exploit, especially if you were lazy in the past about installing updates: http://jasoncosper.com/archives/wordpress-remvphp-and-you/
Also, you should call smooth() before you draw the obstacles so they’re antialiased.
July 26th, 2009 at 8:09 pm
Luckily, it looks like I had not remv.php. I did find some suspicious users that I hadn’t created. Sneaky. They’ve been deleted and my theme patched up. We’ll see if the script kiddies make it back in in the future…