Skip to content

Instantly share code, notes, and snippets.

@RGamberini
RGamberini / README.md
Last active August 29, 2015 14:14 — forked from mbostock/.block

This maze is generated using Wilson’s algorithm and then flooded with color. Hue encodes Manhattan distance from the starting cell. (This is not an optimal visual encoding, but it suffices and is pretty.)

Color is useful to visually compare the structure of mazes; without color, the black and white alternating cells are too noisy to offer any pre-attentive comparisons. Compare a maze generated by Wilson’s algorithm to Prim’s algorithm, random traversal and randomized depth-first traversal.

See this color flood applied directly to the pixel grid.