http://www.jwz.org/xscreensaver/xscreensaver-5.07.tar.gz
[xscreensaver] / hacks / maze.man
1 .TH XScreenSaver 1 "7-mar-93" "X Version 11"
2 .SH NAME
3 maze \- an automated X11 demo repeatedly creating and solving a random maze
4 .SH SYNOPSIS
5 .B maze 
6 [\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-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] [\-bridge] [\-no\-bridge]
7 [\-fps]
8 .SH DESCRIPTION
9 The \fImaze\fP program creates a "random" maze and then solves it with 
10 graphical feedback. 
11 .SH OPTIONS
12 .I maze
13 accepts the following options:
14 .TP 8
15 .B \-window
16 Draw on a newly-created window.  This is the default.
17 .TP 8
18 .B \-root
19 Draw on the root window.
20 .TP 8
21 .B \-install
22 Install a private colormap for the window.
23 .TP 8
24 .B \-visual \fIvisual\fP
25 Specify which visual to use.  Legal values are the name of a visual class,
26 or the id number (decimal or hex) of a specific visual.
27 .TP 8
28 .B \-grid\-size \fIpixels\fP
29 The size of each block of the maze, in pixels; default is 0, meaning
30 pick a random grid size.
31 .TP 8
32 .B \-live\-color \fIcolor\fP
33 The color of the path.
34 .TP 8
35 .B \-dead\-color \fIcolor\fP
36 The color of the failed path (it is also stippled with a 50% pattern.)
37 .TP 8
38 .B \-skip\-color \fIcolor\fP
39 The maze solver will choose to not go down a path if it can "see" (in a
40 straight line) that it is a dead end.  This is the color to use for paths
41 that are skipped for this reason.
42 .TP 8
43 .B \-surround\-color \fIcolor\fP
44 If the maze solver ever completely encloses an area within the maze, then
45 it knows that the exit is not in there (and in fact the interior of that
46 area might not even be reachable.)  It will mark out those cells using this
47 color.
48 .TP 8
49 .B \-solve\-delay \fIinteger\fP
50 Delay (in microseconds) between each step of the solution path.
51 Default 5000, or about 1/200th second.
52 .TP 8
53 .B \-pre\-delay \fIinteger\fP
54 Delay (in microseconds) between generating a maze and starting to solve it.
55 Default 2000000 (2 seconds.)
56 .TP 8
57 .B \-post\-delay \fIinteger\fP
58 Delay (in microseconds) after solving a maze and before generating a new one.
59 Default 4000000 (4 seconds.)
60 .TP 8
61 .B \-generator \fInum\fP
62 Sets the algorithm that will be used to generate the mazes. The
63 default is \-1, which randomly selects an algorithm for each maze that
64 is generated. Generator 0 is the original one, and works by walking
65 around randomly until we hit a place we've been before, then
66 backtracking and trying a new direction somewhere. Generator 1 picks a
67 random spot in the maze, then draws a straight wall from that spot in
68 a random direction until it hits another wall (and continues until the
69 maze is complete). Generator 2 is based on sets. Initially all cells
70 are in different sets. Then two neighboring cells are chosen and if
71 they are in different sets, their sets are joined. If they were in the
72 same set, a wall is built between them. This continues until the maze is
73 complete. 
74
75 All generators generate mazes with a certain 'characteristic'. See if you
76 can spot them!
77 .TP 8
78 .B \-max\-length \fInum\fP
79 Controls the maximum length of walls drawn in one go by generator 1.
80 .TP 8
81 .B \-bridge
82 .TP 8
83 .B \-no\-bridge
84 Controls whether or not a 'bridge' will appear over the logo.
85 .PP
86 Clicking the mouse in the maze window controls it.
87 .TP 16
88 .B "LeftButton
89 Clears the window and restarts maze.
90 .TP 16
91 .B MiddleButton
92 Pause or unpause the program.
93 .TP 16
94 .B RightButton
95 Exit.
96 .TP 8
97 .B \-fps
98 Display the current frame rate and CPU load.
99 .SH BUGS
100 Expose events force a restart of maze.
101
102 Mouse actions are based on "raw" values (Button1, Button2 and Button3)
103 instead of using the pointer map.
104 .SH ENVIRONMENT
105 .PP
106 .TP 8
107 .B DISPLAY
108 to get the default host and display number.
109 .TP 8
110 .B XENVIRONMENT
111 to get the name of a resource file that overrides the global resources
112 stored in the RESOURCE_MANAGER property.
113 .SH SEE ALSO
114 .BR X (1),
115 .BR xscreensaver (1)
116 .SH COPYRIGHT
117 .PP
118 Copyright \(co 1988 by Sun Microsystems, Inc. Mountain View, CA.
119 .PP  
120 All Rights Reserved
121 .PP
122 Permission to use, copy, modify, and distribute this software and its
123 documentation for any purpose and without fee is hereby granted, provided that
124 the above copyright notice appear in all copies and that both that copyright
125 notice and this permission notice appear in supporting documentation, and that
126 the names of Sun or MIT not be used in advertising or publicity pertaining to
127 distribution of the software without specific prior written permission. Sun
128 and M.I.T.  make no representations about the suitability of this software for
129 any purpose. It is provided "as is" without any express or implied warranty.
130 .PP
131 SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
132 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN
133 NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
134 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
135 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
136 OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
137 .SH AUTHOR(s)
138 .nf
139 Zack Weinberg [ Smarter maze-solver ] zack@rabi.phys.columbia.edu
140 Johannes Keukelaar [ Generators 1 and 2 ] johannes@nada.kth.se 
141   Royal Institute of Technology, Stockholm, Sweden
142 Jim Randell     [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
143   HPLabs, Bristol
144 Richard Hess    [ X11 extensions ]      {...}!uunet!cimshop!rhess
145   Consilium, Mountain View, CA
146 Dave Lemke      [ X11 version ]         lemke@sun.COM
147   Sun MicroSystems, Mountain View, CA
148 Martin Weiss    [ SunView version ]
149   Sun MicroSystems, Mountain View, CA
150 .fi