source: trunk/third/xscreensaver/hacks/attraction.man @ 20148

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