mouse:
When an "ant" enters a square, the track in that square changes direction.

Controls

Use your mouse to move the control dots. There is not a lot of scope to move these and still get something that works. Another version of this program is here. These ants would work better if they were made with three parts, but currently they are only made of two parts.
The are
The colour of a square depends on the length of one of the paths through it, and the length it used to be. Each time an ant moves through a square the paths change, so usually total path length changes, so the colour changes. In some of the other shaders I wrote, this is used to decide how many beads to make move along the path, but here it was just arose from debugging, but I thought it was interesting to leave it in to indicate some information in the picture that is there, but you might not be following.

PREVIOUS
NEXT