# Random Walk

- Print Date

Another interesting investigation into a fun technique for generating patterns — a random walk is the process of drawing a path using a set of rules and randomisation for distance and direction.

## Early exploration

After a few attempts using truly randomised distances and rotations, I realised using something a little more structured was more to my taste.

The next few attempts used a set length for distance and multiples of 90 degrees for rotation and looked more organised. A problem I encountered was the tendency for the lines to layer up, which could result in over-saturated ink on the paper – I’ll eventually figure out how to de-duplicate stacked path segments.

This entire print is made using one continuous line per colour.

My next step was to come up with a simple system for drawing lines that don't intersect or overlap. It picks a point at random to start, checks for all empty adjacent spaces, then randomly picks one to move into. This is repeated until it ends up blocked in an area with nowhere to go. A new line is stared in a random spot and the process starts again. If the line starts with nowhere to go, I've decided to not print the single point.

In future I’d like to add functionality to either look further ahead or back-track, to avoid getting stuck as frequently.

Experimenting with clipping has also produced some interesting effects. In the following example, I've generated a full grid of lines, then removed any which intersect with the edge of a bounding circle.