Flocking Conversion Swarm Applet


Alex S.

[SwarmApplet.java] [BufferedApplet.java]

To restart, just click.

Alex.N's idea... circles are preachers converting everyone nearby. There are two competing `preachers'. If you're in a crowd of followers, you tend to become a follower as well. If you happen to be in a crowd where the average color is 40% (or more) different from you, you die.


These rules can be contradictory. Applet uses weighted sums to implement Alignment and Cohesion, and a hard number (six) to implement Separation. If there are six or more flock mates, the weighted sum is 0.3 for Alignment and -0.7 for Cohesion (in other words, try to move away from the center). If there are less than six flock mates, the weithed sum is 0.8 for Alignment and 0.2 for Cohesion. (with some random noise added for interesting effects...)