block by mbostock 97f1cdb9e0a695cd8df4

Randomized Depth-First II

Full Screen

This maze is generated using randomized depth-first traversal 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 randomized depth-first traversal to random traversal, Prim’s algorithm, and Wilson’s algorithm.

See this color flood applied directly to the pixel grid.