Here is something I’ve been playing with lately. It has been done before and it’s nothing fancy, – I enjoyed tinkering with it nonetheless :) Everything was written in C++ using openFrameworks.
I implemented some basic flocking with simple obstacle-avoiding and use it to create images from the boids’ movements. The forces that control the boids are the three classic ones from the system invented by Craig Reynolds. Namely, the forces are separation, alignment and cohesion. If you want to know more, read up on how it works here: http://www.red3d.com/cwr/boids/
Here is a video of the movement. You can watch it in HD on vimeo.
The resulting image looks like this. For this, I start with a black background and add colors to the pixels that the boids visit, – if a pixel is hit multiple times, it gets brighter.
Here is an alternative. I use colorpalettes and when a boid visits a pixel, that pixel gets colored by the boid’s color. Click to enlarge:
I really like watching these little buggers. If you are like me, you can have a look at the following video. These are the processes that have resulted in the images shown above.