Vortex Maze Construction
Year: 2006 Authors: Jie Xu; Craig S. Kaplan
Core claim
Concentric offset-curve vortices can be assembled into maze networks that increase solver difficulty while giving designers high-level visual control.
Topics
maze generation, spirals and vortices, visual complexity
Domains
computational geometry, geometric algorithms, offset curves, maze design, decorative patterning, generative art
Methods
offset-curve construction, sample-point interpolation, grid-to-vortex mapping, cubic spline rendering
Media
Postscript output, C++ program, CGAL library
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Jie Xu
Craig S. Kaplan
David R. Cheriton School of Computer Science
University of Waterloo
{jiexu,csk} cgl.uwaterloo.ca
Abstract
Labyrinths and mazes have existed in our world for thousands of years. Spirals and vortices are important elements in maze generation. In this paper, we describe an algorithm for constructing spiral and vortex mazes using concentric offset curves. We join vortices into networks, leading to mazes that are difficult to solve. We also show some results generated with our techniques.
1. Introduction
Mazes have been a part of human society for thousands of years [5]. They can form the locus of a powerful legend, as in the journey of Theseus into the labyrinth of Crete. They can serve as a focus for meditation and prayer, most famously on the floor of the cathedral at Chartres. They are a compelling and occasionally frustrating source of entertainment for both children and adults. Countless books of mazes of all kinds are available (see, for example, the masterpiece by Christopher Berg [2]), and designers such as Adrian Fisher [4] are revitalizing the construction of corn and hedge mazes. A good maze is simultaneously a work of art and a complex puzzle.
We may approach the problem of maze design in many different ways, and indeed enthusiasts such as Walter Pullen have catalogued many possible construction algorithms and visual styles [7]. During the design process, one factor we would like to understand (or, ideally, control) is the difficulty of the maze. Although some work has been done on characterizing the difficulty of mazes [6], we feel that the problem is very subtle and far from solved.
As part of our larger goal of studying the difficulty of mazes, in this paper we give a construction technique that we feel produces mazes with a high degree of difficulty. Our construction makes use of two specific visual devices: the spiral and the vortex. These are identified by artist Christopher Berg as being crucial to the design of effective mazes [1]. A spiral is a single passageway that winds inward to a dead end. A vortex has a similar spiral structure, but
features multiple passageways meeting at a central junction. A vortex is a powerful obfuscation device in maze construction, as it obscures the relationships between the paths that meet there. Moreover, the
Figure 1: Simple circle spiral and vortex.
regularity of the concentric paths in spirals and vortices make them difficult to solve. Figure 1 shows an example of spiral and vortex.
The rest of the paper is organized as follows. Section 2 introduces our approach to create spiral and vortex mazes. Technique for constructing network of vortices is given in Section 3. Section 4 presents some visual effects. Some results appear in Section 5. Finally, we provide some future work in section 6.
2. Vortex Construction
In this section, we give an algorithm for constructing vortices within regions of the plane. The input to the algorithm is a region (for example, a convex polygon) and a set of labels on the boundary of the region. The output is a vortex inside the region that connects all labels at a central junction. We do not provide an explicit algorithm for constructing spirals. We believe that the dead end of a spiral path is relatively easy to detect by visual inspection, and can therefore be avoided while solving. And in any case, a spiral can simply be considered as a vortex with a single label on its boundary.
Given a region boundary, we construct a sequence of offset curves, closed paths each of which is offset by a constant parallel distance from its outer neighbor. We sample at regular intervals along these curves to obtain candidate vertices for the piecewise linear paths that will make up the walls of the vortex. In order to avoid “ridges” in the result (as in the top row of Figure 3), we select the closest corner as the start point instead of using the labeled location directly. Then, we find the closest sample point on the outermost offset curve and draw a wall connecting the two points. We then proceed around the offset curve clockwise or counter-clockwise (at the designer’s discretion), building a wall as we go. When the wall cannot be extended any further we drop into the next deeper offset curve and continue. The vortex is complete when no disconnected sample points remain. Figure 2 illustrates this process.
(a)
(b)
(c)
Figure 2: Process of creating vortex. The region and sample points shown in (a), labeled exits are in (b) and the final result in (c).
At this point, the vortex has a central junction that connects all labels on the boundary. We may, however, wish to construct a vortex where the labels are partitioned into subsets, and there is a path from one label to another precisely if they are in the same subset. We can implement this more sophisticated routing by selectively closing passageways connecting labels from different subsets.
We can now render the piecewise linear paths directly to get a polygonal maze. Alternatively, the sample points can be used as control points for a cubic spline, giving a smoother, more fluid appearance. Figure 3 shows some basic vortex mazes.
Figure 3: Sample circular vortices with three, four, and six arms are shown in the top row. Because there are no corners in circles, our algorithm produces ridges. The bottom row shows examples of vortices constructed in differently-shaped polygonal regions.
3. Networks of Vortices
Armed with the vortex as a primitive, we can now create very complex mazes by assembling networks of interconnected vortices. Berg mentions this technique as an especially fiendish maze style [1].
Figure 4: The construction of a networks-of-vortices maze from a grid. The original grid is shown in (a). the template maze in (b), and the final vortex maze in (c).
Two adjacent regions that have a label on their shared boundary can become interconnected by breaking the boundary at the label’s position. We can then construct a network-of-vortices maze in a simple two-level process. First, we use a simple maze construction algorithm such as that of Shivers [8] to build a
small maze on a square grid, which we call the template maze. We then render each cell of the grid as a vortex, where there is a label at each compass heading precisely if the cell’s wall in that direction has been erased. Figure 4 gives an example of this construction technique on a small square grid. Because of the obfuscating effect of the vortices, the final maze is much more difficult to solve than its template.
We can add to the complexity and appeal of this approach by further subdividing the grid cells in the template maze. There is no reason not to allow a diagonal line to cut a cell in half. The grid-based maze construction algorithm adapts naturally to this new grid. In fact, this division can create the interesting situation where a solver has to consume one path through a vortex, only to return later and consume another path on the way to the end. Figure 5 shows an example of this modified approach.
(a)
(b)
(c)
Figure 5: An example of a more complex vortex maze that can be constructed by splitting grid cells.
Rather than letting a random algorithm construct an arbitrary template maze, we can give the user some control over the connectivity of the template. We allow the user to sketch a solution path the topology of which will ultimately be reflected in the interconnections between vortices (see Figure 6).
Figure 6: The user-supplied solution paths and the corresponding maze. There is a winding path from the centre of the square to the centre of each hexagon.
4. Visual Effects
We have considered a number of other modifications to the algorithm that can make the resulting mazes more attractive. We mention two of them here. We can control the clockwise or counter-clockwise rotation of the vortex, and by choosing orientations carefully we can add some life and contrast to a maze with multiple vortices. We can also control the distance between adjacent offset curves. A smaller distance creates a denser, and hence darker vortex. By choosing offset distances appropriately, we can produce some variation in shading. Figure 7 gives an example of varying both vortex orientation and density.
Figure 7: An example of varying the aesthetic parameters of the vortices in a maze. We alternate the orientations and densities of adjacent vortices.
5. Results
Our algorithm is implemented as a program that produces Postscript output. We use the CGAL library [3] to store and manipulate the geometry of the maze. We have used the program to produce the finished results in this paper. Some examples are given below. In some cases, they are marked with suggested start and end positions.
Figure 8: Some results created using our system.
Figure 9: More results created using our system.
308
6. Future Work
In this paper, we describe a system that can generate attractive spiral and vortex mazes quickly. Our system greatly decreases the burden of maze designers by providing high-level design control. And our system can be easily incorporated into other maze generation algorithms.
There are still some artifacts in our mazes. Some turns are too steep, and some passages are too narrow. We believe that some extra work may be needed to adapt our vortex construction algorithm to nonconvex regions. We hope to add machinery to our algorithm to overcome these defects.
We are also interested in defining the complexity of mazes more precisely. Spirals and vortices might provide some clues on the way to that definition, because we believe they should be considered very difficult. In general, the problem is a very subtle and complex one, as it relies both on formal mathematical measures of the maze’s geometry and on ineffable properties of human perception.
It might also be interesting to apply spiral and vortex construction to other areas. For example, bronzework of the Shang dynasty in China and many Chinese jades exhibit characteristic spiral patterns [9]. We believe it would be possible to extend our construction technique to create decorative patterns in the style of these artifacts.
References
[1] Christopher Berg, Amazing Art, http://www.amazeingart.com, 2005. [2] Christopher Berg, Amazing Art: Wonders of the Ancient World, Harper Collins, 2001. [3] CGAL: Computational Geometry Algorithms Library, http://www.cgal.org, 2005. [4] Adrian Fisher, Adrian Fisher’s Maize Maze Website, http://www.maizemaze.com, 2005. [5] Hermann Kern, Through the Labyrinth: designs and meanings over 5000 years, Prestel, 2000. [6] Michael Scott McClendon, The Complexity and Difficulty of a Maze, Bridges: Mathematical Connections in Art, Music, and Science, July 27-29, 2001. [7] Walter D. Pullen, Think Labyrinth, http://www.astrolog.org/labyrinth/maze.htm, 2005. [8] Olin Shivers, Maze Generation, http://www.cc.gatech.edu/~shivers/mazes.html, 2005. [9] Jessica Rawson, John Williams, David Gowers, Chinese Jade from the Neolithic to the Qing, Published for the Trustees of the British Museum by British Museum Press, 1995.