![]()
ASSIGNMENT 6: STEERING BEHAVIORS
11/6/06
This simple program is adapted from Dan Shiffman's flocking example.
The boids are divided into two classes: predators and prey. The predators do not flock; they simply avoid each other and hunt the prey. The prey not only flock, but also avoid the predators. The predators are larger and faster than the prey.
To repopulate prey, press (and hold, if desired) the "p" key. Holding the mouse button while pressing "p" will add prey at the current mouse location. To add predators, use "h" instead of "p".
source code: flocking
built with processing
