Chapter 7Going in Circles

At this point, if someone were to ask us for a “circle maze,” we could oblige them by making a template image of a circle, and then using it as a mask to generate the corresponding maze. We’d get something like the following:

images/circle-maze-rough.png

If we’re perfectly honest with ourselves, though, we have to admit that while this works, it’s not very attractive. The jagged, pixelated edges of the mask are merely approximating the circle we want, and are translated one-to-one onto our grid’s rigid, rectangular cells. This arrangement of perpendicular rows and columns is called a regular or orthogonal grid, and though it has a lot going for ...

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.