1 | .de EX \"Begin example |
---|
2 | .ne 5 |
---|
3 | .if n .sp 1 |
---|
4 | .if t .sp .5 |
---|
5 | .nf |
---|
6 | .in +.5i |
---|
7 | .. |
---|
8 | .de EE |
---|
9 | .fi |
---|
10 | .in -.5i |
---|
11 | .if n .sp 1 |
---|
12 | .if t .sp .5 |
---|
13 | .. |
---|
14 | .TH XScreenSaver 1 "14-Jun-97" "X Version 11" |
---|
15 | .SH NAME |
---|
16 | attraction - interactions of opposing forces |
---|
17 | .SH SYNOPSIS |
---|
18 | .B attraction |
---|
19 | [\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] |
---|
20 | [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] |
---|
21 | [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-threshold \fIint\fP] |
---|
22 | [\-mode balls | lines | polygons | splines | filled-splines | tails ] |
---|
23 | [\-size \fIint\fP] [\-segments \fIint\fP] [\-delay \fIusecs\fP] |
---|
24 | [\-color-shift \fIint\fP] [\-radius \fIint\fP] |
---|
25 | [\-vx \fIint\fP] [\-vy \fIint\fP] [\-glow] [\-noglow] |
---|
26 | [\-orbit] [\-viscosity \fIfloat\fP] [\-mouse] [\-no-mouse] [\-mouse-size] |
---|
27 | [\-walls] [\-nowalls] [\-maxspeed] [\-nomaxspeed] |
---|
28 | [\-correct-bounce] [\-fast-bounce] |
---|
29 | .SH DESCRIPTION |
---|
30 | The \fIattraction\fP program has several visually different modes of |
---|
31 | operation, all of which are based on the interactions of a set of control |
---|
32 | points which attract each other up to a certain distance, and then begin |
---|
33 | to repel each other. The attraction/repulsion is proportional to the |
---|
34 | distance between any two particles. |
---|
35 | .SH OPTIONS |
---|
36 | .I attraction |
---|
37 | accepts the following options: |
---|
38 | .TP 8 |
---|
39 | .B \-window |
---|
40 | Draw on a newly-created window. This is the default. |
---|
41 | .TP 8 |
---|
42 | .B \-root |
---|
43 | Draw on the root window. |
---|
44 | .TP 8 |
---|
45 | .B \-mono |
---|
46 | If on a color display, pretend we're on a monochrome display. |
---|
47 | .TP 8 |
---|
48 | .B \-install |
---|
49 | Install a private colormap for the window. |
---|
50 | .TP 8 |
---|
51 | .B \-visual \fIvisual\fP |
---|
52 | Specify which visual to use. Legal values are the name of a visual class, |
---|
53 | or the id number (decimal or hex) of a specific visual. |
---|
54 | .TP 8 |
---|
55 | .B \-points integer |
---|
56 | How many control points should be used, or 0 to select the number randomly. |
---|
57 | Default 0. Between 3 and 15 works best. |
---|
58 | .TP 8 |
---|
59 | .B \-threshold integer |
---|
60 | The distance (in pixels) from each particle at which the attractive force |
---|
61 | becomes repulsive. Default 100. |
---|
62 | .TP 8 |
---|
63 | .B \-mode "balls | lines | polygons | tails | splines | filled-splines" |
---|
64 | In \fIballs\fP mode (the default) the control points are drawn as filled |
---|
65 | circles. The larger the circle, the more massive the particle. |
---|
66 | |
---|
67 | In \fIlines\fP mode, the control points are connected by straight lines; |
---|
68 | the effect is something like \fIqix\fP. |
---|
69 | |
---|
70 | In \fIpolygons\fP mode, the control points are connected by straight |
---|
71 | lines, and filled in. This is most interesting in color. |
---|
72 | |
---|
73 | In \fIsplines\fP mode, a closed spline is interpolated from the control |
---|
74 | points. |
---|
75 | |
---|
76 | In \fIfilled-splines\fP mode, the splines are filled in instead of being |
---|
77 | outlines. This is most interesting in color. |
---|
78 | |
---|
79 | In \fItails\fP mode, the path which each particle follows is indicated |
---|
80 | by a worm-like trail, whose length is controlled by the \fIsegments\fP |
---|
81 | parameter. |
---|
82 | .TP 8 |
---|
83 | .B \-size integer |
---|
84 | The size of the balls in pixels, or 0, meaning to select the sizes |
---|
85 | randomly (the default.) If this is specified, then all balls will be |
---|
86 | the same size. This option has an effect in all modes, since the ``size'' |
---|
87 | of the balls controls their mass. |
---|
88 | .TP 8 |
---|
89 | .B \-segments integer |
---|
90 | If in \fIlines\fP or \fIpolygons\fP mode, how many sets of line segments |
---|
91 | or polygons should be drawn. Default 100. This has no effect in \fIballs\fP |
---|
92 | mode. If \fIsegments\fP is 0, then no segments will ever be erased (this |
---|
93 | is only useful in color.) |
---|
94 | .TP 8 |
---|
95 | .B \-delay microseconds |
---|
96 | How much of a delay should be introduced between steps of the animation. |
---|
97 | Default 10000, or about 0.01 seconds. |
---|
98 | .TP 8 |
---|
99 | .B \-color-shift int |
---|
100 | If on a color display, the color of the line segments or polygons will |
---|
101 | cycle through the color map. This specifies how many lines will be drawn |
---|
102 | before a new color is chosen. (When a small number of colors are available, |
---|
103 | increasing this value will yield smoother transitions.) Default 3. |
---|
104 | This has no effect in \fIballs\fP mode. |
---|
105 | .TP 8 |
---|
106 | .B \-radius |
---|
107 | The size in pixels of the circle on which the points are initially positioned. |
---|
108 | The default is slightly smaller than the size of the window. |
---|
109 | .TP 8 |
---|
110 | .B \-glow |
---|
111 | This is consulted only in \fIballs\fP mode. If this is specified, then |
---|
112 | the saturation of the colors of the points will vary according to their |
---|
113 | current acceleration. This has the effect that the balls flare brighter |
---|
114 | when they are reacting to each other most strongly. |
---|
115 | |
---|
116 | In \fIglow\fP mode, all of the balls will be drawn the same (random) |
---|
117 | color, modulo the saturation shifts. In non-glow mode, the balls will |
---|
118 | each be drawn in a random color that doesn't change. |
---|
119 | .TP 8 |
---|
120 | .B \-noglow |
---|
121 | Don't do ``glowing.'' This is the default. |
---|
122 | .TP 8 |
---|
123 | .B \-vx pixels |
---|
124 | .TP 8 |
---|
125 | .B \-vy pixels |
---|
126 | Initial velocity of the balls. This has no effect in \fB\-orbit\fP mode. |
---|
127 | .TP 8 |
---|
128 | .B \-orbit |
---|
129 | Make the initial force on each ball be tangential to the circle on which |
---|
130 | they are initially placed, with the right velocity to hold them in orbit |
---|
131 | about each other. After a while, roundoff errors will cause the orbit |
---|
132 | to decay. |
---|
133 | .TP 8 |
---|
134 | .B \-vmult float |
---|
135 | In orbit mode, the initial velocity of the balls is multiplied by this; |
---|
136 | a number less than 1 will make the balls pull closer together, and a larger |
---|
137 | number will make them move apart. The default is 0.9, meaning a slight |
---|
138 | inward pull. |
---|
139 | .TP 8 |
---|
140 | .B \-viscosity float |
---|
141 | This sets the viscosity of the hypothetical fluid through which the control |
---|
142 | points move; the default is 1, meaning no resistance. Values higher than 1 |
---|
143 | aren't interesting; lower values cause less motion. |
---|
144 | |
---|
145 | One interesting thing to try is |
---|
146 | .EX |
---|
147 | attraction -viscosity 0.8 -points 75 \\ |
---|
148 | -mouse -geometry =500x500 |
---|
149 | .EE |
---|
150 | Give it a few seconds to settle down into a stable clump, and then move |
---|
151 | the mouse through it to make "waves". |
---|
152 | .TP 8 |
---|
153 | .B \-mouse |
---|
154 | This will cause the mouse to be considered a control point; it will not be |
---|
155 | drawn, but it will influence the other points, so you can wave the mouse |
---|
156 | and influence the images being created. |
---|
157 | .TP 8 |
---|
158 | .B \-no-mouse |
---|
159 | Turns off \fB\-mouse\fP. |
---|
160 | .TP 8 |
---|
161 | .B \-mouse-size integer |
---|
162 | In \fB\-mouse\fP mode, this sets the mass of the mouse (analagously to the |
---|
163 | \fB\-size\fP parameter.) |
---|
164 | .TP 8 |
---|
165 | .B \-nowalls |
---|
166 | This will cause the balls to continue on past the edge of the |
---|
167 | screen or window. They will still be kept track of and can come back. |
---|
168 | .TP 8 |
---|
169 | .B \-walls |
---|
170 | This will cause the balls to bounce when they get |
---|
171 | to the edge of the screen or window. This is the default behavior. |
---|
172 | .TP 8 |
---|
173 | .B \-maxspeed |
---|
174 | Imposes a maximum speed (default). If a ball ends up going faster than |
---|
175 | this, it will be treated as though there were .9 viscosity until it is |
---|
176 | under the limit. This stops the balls from continually accelerating (which |
---|
177 | they have a tendancy to do), but also causes balls moving very fast to |
---|
178 | tend to clump in the lower right corner. |
---|
179 | .TP 8 |
---|
180 | .B \-nomaxspeed |
---|
181 | If this is specified, no maximum speed is set for the balls. |
---|
182 | .TP 8 |
---|
183 | .B \-fast-bounce |
---|
184 | Uses the old, simple bouncing algorithm (default). This simply moves any |
---|
185 | ball that is out of bounds back to a wall and reverses its velocity. |
---|
186 | This works fine for most cases, but under some circumstances, the |
---|
187 | simplification can lead to annoying effects. |
---|
188 | .TP 8 |
---|
189 | .B \-correct-bounce |
---|
190 | Uses a more intelligent bouncing algorithm. This method actually reflects |
---|
191 | the balls off the walls until they are within bounds. This can be slow |
---|
192 | if balls are bouncing a whole lot, perhaps because of -nomaxspeed. |
---|
193 | .TP 8 |
---|
194 | .B \-graphmode none | x | y | both | speed |
---|
195 | For "x", "y", and "both", displays the given velocities of each ball as a |
---|
196 | bar graph in the same window as the balls. For "speed", displays the total |
---|
197 | speed of each ball. Default is "none". |
---|
198 | .BR |
---|
199 | .SH ENVIRONMENT |
---|
200 | .B DISPLAY |
---|
201 | to get the default host and display number. |
---|
202 | .TP 8 |
---|
203 | .B XENVIRONMENT |
---|
204 | to get the name of a resource file that overrides the global resources |
---|
205 | stored in the RESOURCE_MANAGER property. |
---|
206 | .SH SEE ALSO |
---|
207 | .BR X (1), |
---|
208 | .BR xscreensaver (1) |
---|
209 | .SH COPYRIGHT |
---|
210 | Copyright \(co 1992, 1993, 1997 by Jamie Zawinski. Permission to use, copy, |
---|
211 | modify, distribute, and sell this software and its documentation for any |
---|
212 | purpose is hereby granted without fee, provided that the above copyright |
---|
213 | notice appear in all copies and that both that copyright notice and this |
---|
214 | permission notice appear in supporting documentation. No representations are |
---|
215 | made about the suitability of this software for any purpose. It is provided |
---|
216 | "as is" without express or implied warranty. |
---|
217 | .SH AUTHOR |
---|
218 | Jamie Zawinski <jwz@jwz.org>, 13-aug-92. |
---|
219 | |
---|
220 | Viscosity and mouse support by Philip Edward Cutone, III. |
---|
221 | |
---|
222 | Walls, speed limit options, new bouncing, graphs, and tail mode fix by |
---|
223 | Matthew Strait. 31 March 2001 |
---|