This sketch is about Fields and Agents. The flowField class in the sketch linked below is a modification of the field class from Shiffman's Nature of code book. I just added some functions for visualization and some agents behaviors. Each agent in the sketch reads data ( direction vectors) from the correspondent field's cell and overrides the previous cell with its current direction. The field becomes a substrate for agents communication (for a sort of pathfinding) and proximity calculation is completely avoided
References : -Field class from Daniel Shiffman.
more at : http://radical-reaction-ad.blogspot.it/2015/11/field-pathfinding.html
Libraries needed:
Toxiclibs ConstrolP5
Code written for Processing 2.0