๐Ÿ”ง 3D Pipes

The other classic Windows screensaver. Each pipe is a self-avoiding random walk on a 3-D integer lattice: it grows one cell at a time, usually going straight, occasionally turning into a free neighbouring cell with a rounded elbow joint. When a pipe boxes itself in it dies and a new one sprouts in a fresh colour somewhere open. Fill the lattice and the whole scene resets โ€” exactly the screensaver. Drag to orbit, scroll to zoom.

โ€”
The rule. At each step a pipe keeps its heading with probability ~0.7, otherwise picks a random perpendicular turn. Any move into an occupied cell or out of the box is forbidden โ€” that's the "self-avoiding" constraint, the same idea behind polymer models in statistical physics. With no legal move the pipe terminates and a new seed appears. It's a 3-D cousin of the lattice walks in the rest of the lab.