Started as a college assignment: build a perfect maze generator and solver in C++, self-taught for the project. Once it worked, I kept going — 3D, then 4D, then any number of dimensions.
The core idea: each extra dimension is just another axis where a node can move ±1. An N-dimensional grid is a graph. Kruskal's algorithm, generalized to work on any number of dimensions, produces its spanning tree — a perfect maze with exactly one path between any two nodes.
Higher dimensions (w, v, u…) are projected as offset vectors into 3D space, like casting a shadow of a higher-dimensional structure onto a lower-dimensional surface.
The project sat for years. Recently rebuilt the visualizer in JavaScript with real-time 3D rendering and an animated DFS solver.
n limits exist because rendering is expensive — 3D handles up to n=20 (8,000 nodes) comfortably; 9D tops out at n=3 (19,683 nodes).