Representing Four Dimensions

You’ve now seen how the pattern comes together. Zero-dimensional cells make one-dimensional rows (or columns), which come together to make two-dimensional levels, which stack to make three-dimensional worlds.

So what happens when you take those three-dimensional worlds and stack them along another axis, perpendicular to the three we already have? (Ignore for the moment that it’s rather difficult to imagine a direction that is simultaneously perpendicular to the three axes we’ve already got.) You can probably guess that we’re going to wind up with a four-dimensional grid, and you’ll be exactly right.

To illustrate stacking in the fourth dimension, we can take those three-dimensional grids and line them up vertically ...

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.