In my program, an ant is a given color. There are two phases of this color (lights and dark). So, for example, an ant could be light red or dark red. The program initializes each ant (there is a random number of ants to start out with) with a color, a location, a vector a size, and shape. Additionally, each ant is given two angles, which can be multiples of 45 degrees. At each tick of the clock, the ant moves the distance and direction determined by its initial vector. It then looks at the color of the pixel it landed on and changes it from light to dark or from dark to light. If the color is dark, the new vector is adjusted by angle one. if the color is light, the new vector is adjusted by angle two. That is basically all there is to the program.
The following are links to some sample images obtained from this screen saver arranged into rough categories.
Go back to Victor's Home Page.
This Page Copyright © 1995 Victor S. Engel
This page and any of its contents may be reproduced only under specific conditions.