1 .TH XScreenSaver 1 "7-mar-93" "X Version 11"
3 maze \- an automated X11 demo repeatedly creating and solving a random maze
6 [\-\-display \fIhost:display.screen\fP] [\-\-foreground \fIcolor\fP]
7 [\-\-background \fIcolor\fP] [\-\-window] [\-\-root]
8 [\-\-window\-id \fInumber\fP][\-\-install] [\-\-visual \fIvisual\fP] [\-\-grid\-size \fIpixels\fP] [\-\-live\-color \fIcolor\fP] [\-\-dead\-color \fIcolor\fP] [\-\-solve\-delay \fIusecs\fP] [\-\-pre\-delay \fIusecs\fP] [\-\-post\-delay \fIusecs\fP] [\-\-generator \fIinteger\fP] [\-\-max\-length \fIinteger\fP]
11 The \fImaze\fP program creates a "random" maze and then solves it with
15 accepts the following options:
18 Draw on a newly-created window. This is the default.
21 Draw on the root window.
23 .B \-\-window\-id \fInumber\fP
24 Draw on the specified window.
27 Install a private colormap for the window.
29 .B \-\-visual \fIvisual\fP
30 Specify which visual to use. Legal values are the name of a visual class,
31 or the id number (decimal or hex) of a specific visual.
33 .B \-\-grid\-size \fIpixels\fP
34 The size of each block of the maze, in pixels; default is 0, meaning
35 pick a random grid size. Minimum meaningful value is 2.
37 .B \-\-live\-color \fIcolor\fP
38 The color of the path.
40 .B \-\-dead\-color \fIcolor\fP
41 The color of the failed path (it is also stippled with a 50% pattern.)
43 .B \-\-skip\-color \fIcolor\fP
44 The maze solver will choose to not go down a path if it can "see" (in a
45 straight line) that it is a dead end. This is the color to use for paths
46 that are skipped for this reason.
48 .B \-\-surround\-color \fIcolor\fP
49 If the maze solver ever completely encloses an area within the maze, then
50 it knows that the exit is not in there (and in fact the interior of that
51 area might not even be reachable.) It will mark out those cells using this
54 .B \-\-solve\-delay \fIinteger\fP
55 Delay (in microseconds) between each step of the solution path.
56 Default 5000, or about 1/200th second.
58 .B \-\-pre\-delay \fIinteger\fP
59 Delay (in microseconds) between generating a maze and starting to solve it.
60 Default 2000000 (2 seconds.)
62 .B \-\-post\-delay \fIinteger\fP
63 Delay (in microseconds) after solving a maze and before generating a new one.
64 Default 4000000 (4 seconds.)
66 .B \-\-generator \fInum\fP
67 Sets the algorithm that will be used to generate the mazes. The
68 default is \-1, which randomly selects an algorithm for each maze that
69 is generated. Generator 0 is the original one, and works by walking
70 around randomly until we hit a place we've been before, then
71 backtracking and trying a new direction somewhere. Generator 1 picks a
72 random spot in the maze, then draws a straight wall from that spot in
73 a random direction until it hits another wall (and continues until the
74 maze is complete). Generator 2 is based on sets. Initially all cells
75 are in different sets. Then two neighboring cells are chosen and if
76 they are in different sets, their sets are joined. If they were in the
77 same set, a wall is built between them. This continues until the maze is
80 All generators generate mazes with a certain 'characteristic'. See if you
83 The three algorithms are essentially Kruskal, Prim, and a depth-first
84 recursive backtracker.
86 .B \-\-max\-length \fInum\fP
87 Controls the maximum length of walls drawn in one go by generator 1.
89 Clicking the mouse in the maze window controls it.
92 Clears the window and restarts maze.
95 Pause or unpause the program.
101 Display the current frame rate and CPU load.
103 Expose events force a restart of maze.
105 Mouse actions are based on "raw" values (Button1, Button2 and Button3)
106 instead of using the pointer map.
111 to get the default host and display number.
114 to get the name of a resource file that overrides the global resources
115 stored in the RESOURCE_MANAGER property.
117 .B XSCREENSAVER_WINDOW
118 The window ID to use with \fI\-\-root\fP.
124 Copyright \(co 1988 by Sun Microsystems, Inc. Mountain View, CA.
128 Permission to use, copy, modify, and distribute this software and its
129 documentation for any purpose and without fee is hereby granted, provided that
130 the above copyright notice appear in all copies and that both that copyright
131 notice and this permission notice appear in supporting documentation, and that
132 the names of Sun or MIT not be used in advertising or publicity pertaining to
133 distribution of the software without specific prior written permission. Sun
134 and M.I.T. make no representations about the suitability of this software for
135 any purpose. It is provided "as is" without any express or implied warranty.
137 SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
138 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN
139 NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
140 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
141 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
142 OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
145 Zack Weinberg [ Smarter maze-solver ] zack@rabi.phys.columbia.edu
146 Johannes Keukelaar [ Generators 1 and 2 ] johannes@nada.kth.se
147 Royal Institute of Technology, Stockholm, Sweden
148 Jim Randell [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
150 Richard Hess [ X11 extensions ] {...}!uunet!cimshop!rhess
151 Consilium, Mountain View, CA
152 Dave Lemke [ X11 version ] lemke@sun.COM
153 Sun MicroSystems, Mountain View, CA
154 Martin Weiss [ SunView version ]
155 Sun MicroSystems, Mountain View, CA