Processing Forum
The Video TurtleBoids Demo Applet is a Processing applet that captures video, derives optical flow vectors from it, and then uses the vectors to change the velocity of a flock of “boids” that can also draw lines (i.e., behave like Logo turtles). You will need the IgnoCodeLib library (the .jar file is included in the download) and the ControlP5 library (not included, available for download at http://www.sojamo.de/libraries/controlP5/)
draw()
,
transform()
and
write()
methods. Drawing to display and writing to file can sometimes be accomplished with a single line of code. Geometric transforms are nearly as easy. IgnoCodeLib is distributed under the
Gnu Lesser General Public License.
All the images in this Flickr set were created with this software.
The code is far from perfect, as is the documentation, but there are several examples that I hope will help people to use the code. The Javadocs are good enough to help people who read Javadocs, or so I hope. I will write tutorials, but at this moment it's better to release the library so people can hammer on it. There comes a point when you have have to shove your children out the door to play because they have too much energy to stay indoors.