The image above was generated using a process known as Langton's ant. Inspired by this Reddit post, I created a few images myself (Here's the code.). The process works by tracing the path of an 'ant' as it interacts with its environment.
For the purposes of generating art, this algorithm has a few useful features.
- The ant acts as an imperfect and unpredictable line follower.
- One can prepare the environment with any sort of 2-color pattern (like circles, squares, human faces, spirals, or lines) that will affect the motion of the ant.
- An environment of only random noise causes the ant to trace out complex patterns that might look like foliage, flames, or other natural systems.
When trying to produce different effects, one may change:
- the background environment
- the starting position and direction of the ant
- how long to run the simulation
- image effects applied after running the simulation
I've included a few more variations below.