All examples By author By category About




This example is an implementation of a simple flocking algorithm that uses the dynamics of repulsion, attraction, and orientation zones. This example is based off of the algorithm described by Couzin.

The basic principle is that each agent has three regions in a growing radius around it: a zone of repulsion, a zone of orientation, and a zone of attraction respectively. By editing the sizes of these zones you can expect to experience different behaviour.

Color Key:


Dragging/Zooming behavior forked from mbostock's block: Drag & Zoom II

forked from lwthatcher's block: Directional Forces