Archived 2007 page recovered from the Wayback Machine — the Java applet below no longer runs. Play the 2026 p5.js reconstruction →

Male Female

ecosystem
Class: Nature of Code

Professor: Daniel Shiffman

A simulations of male and female behavior using flocking and attraction rules.

The idea is to show an interesting behavior that fish demonstrate...
Females are attracted to large males.
But if a male has a female alongside it