Introducing 3D Mazes

So, zero-dimensional cells combine to form one-dimensional rows, and one-dimensional rows stack to form two-dimensional grids. It should follow, then, that two-dimensional grids may be stacked to form three-dimensional grids…which is exactly the case, as the following figure shows.

images/3d-stack.png

When we think of each of these separate 2D grids as levels within the larger 3D grid, it becomes clear that each cell in such a grid must be addressed by three coordinates: row, column, and level.

Three coordinates. Three dimensions.

Displayed like that, though, it’s a bit hard to see each of the levels, so instead of rendering in perspective we ...

Get Mazes for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.