Langton's ant is a 2D cellular automaton. Classic rules: when the "ant" is on white (unfilled) pixel, it paints it to black and rotates 90° left. When its on black (filled) pixel, it paints it white and rotates 90° right.
I made three versions: LR (classic), LRL (3-state) and LRRL (4-state, symmetrical)
You can change their speed (generations per frame) by changing its dcolour. Default to 20.
Unfortunately, i didnt found any better way: the ant's particles stored in the [5,5] pixel so the ants are "remote"...
Download links:
But i used the same way... The ant's X stored in life, Y in tmp2, direction in tmp and the particle itslef in [5,5] pixel...