An adaptation of Prim's MST algorithm to create a procedurally generated maze.

This project was done as a quick way to synthesize my interest in visualizations and my self-directed coursework learning CS algorithms and data structures via Professor Sedgewick's Coursera class.

Prim’s algorithm finds the minimum spanning tree (MST) from a weighted graph, starting at an abitrary node and placing all available edges (the frontier) into a minimum heap. The MST is formed by always picking the smallest edge without creating cycles. Further notes on Prim's here.

The maze generation algorithm preserves the frontier generation aspect, but does not require the heap, as it instead chooses edges at random.

YEAR: 2016

MADE WITH: p5.js

TAGS: code, algorithms, generative art

< Back to Projects