This is another example of the Boid class for objective-c/iphone
Here they are all chasing the edge of the screen (until i start my mouse), but are avoiding the red circles as much at the same time. All the while, they are being affected by their close neighbors, and wandering slightly to give it more variation.
More information & download here:
Loading more stuff…
Hmm…it looks like things are taking a while to load. Try again?