1attraction(6x)                XScreenSaver manual               attraction(6x)
2
3
4

NAME

6       attraction - interactions of opposing forces
7

SYNOPSIS

9       attraction  [-display  host:display.screen] [-foreground color] [-back‐
10       ground color] [-window] [-root]  [-mono]  [-install]  [-visual  visual]
11       [-points  int]  [-threshold  int]  [-mode  balls  |  lines | polygons |
12       splines | filled-splines | tails ] [-size int] [-segments int]  [-delay
13       usecs]  [-color-shift  int]  [-radius  int] [-vx int] [-vy int] [-glow]
14       [-noglow] [-orbit] [-viscosity float] [-walls]  [-nowalls]  [-maxspeed]
15       [-nomaxspeed] [-correct-bounce] [-fast-bounce] [-fps]
16

DESCRIPTION

18       The  attraction  program has several visually different modes of opera‐
19       tion, all of which are based on the interactions of a  set  of  control
20       points  which attract each other up to a certain distance, and then be‐
21       gin to repel each other.  The attraction/repulsion is  proportional  to
22       the distance between any two particles.
23

OPTIONS

25       attraction accepts the following options:
26
27       -window Draw on a newly-created window.  This is the default.
28
29       -root   Draw on the root window.
30
31       -mono   If on a color display, pretend we're on a monochrome display.
32
33       -install
34               Install a private colormap for the window.
35
36       -visual visual
37               Specify  which  visual  to use.  Legal values are the name of a
38               visual class, or the id number (decimal or hex) of  a  specific
39               visual.
40
41       -points integer
42               How many control points should be used, or 0 to select the num‐
43               ber randomly.  Default 0.  Between 3 and 15 works best.
44
45       -threshold integer
46               The distance (in pixels) from each particle at  which  the  at‐
47               tractive force becomes repulsive.  Default 100.
48
49       -mode balls | lines | polygons | tails | splines | filled-splines
50               In  balls  mode  (the  default) the control points are drawn as
51               filled circles.  The larger the circle, the  more  massive  the
52               particle.
53
54               In  lines  mode,  the  control points are connected by straight
55               lines; the effect is something like qix.
56
57               In polygons mode, the control points are connected by  straight
58               lines, and filled in.  This is most interesting in color.
59
60               In  splines mode, a closed spline is interpolated from the con‐
61               trol points.
62
63               In filled-splines mode, the splines are filled  in  instead  of
64               being outlines.  This is most interesting in color.
65
66               In  tails  mode,  the path which each particle follows is indi‐
67               cated by a worm-like trail, whose length is controlled  by  the
68               segments parameter.
69
70       -size integer
71               The  size  of  the balls in pixels, or 0, meaning to select the
72               sizes randomly (the default.)  If this is specified,  then  all
73               balls  will be the same size.  This option has an effect in all
74               modes, since the ``size'' of the balls controls their mass.
75
76       -segments integer
77               If in lines or polygons mode, how many sets of line segments or
78               polygons  should  be drawn. Default 500.  This has no effect in
79               balls mode.  If segments is 0, then no segments  will  ever  be
80               erased (this is only useful in color.)
81
82       -delay microseconds
83               How  much  of a delay should be introduced between steps of the
84               animation.  Default 10000, or about 0.01 seconds.
85
86       -color-shift int
87               If on a color display, the color of the line segments or  poly‐
88               gons will cycle through the color map.  This specifies how many
89               lines will be drawn before a new  color  is  chosen.   (When  a
90               small  number  of  colors  are available, increasing this value
91               will yield smoother transitions.)  Default 3.  This has no  ef‐
92               fect in balls mode.
93
94       -radius The  size  in pixels of the circle on which the points are ini‐
95               tially positioned.  The default is slightly  smaller  than  the
96               size of the window.
97
98       -glow   This  is  consulted  only in balls mode.  If this is specified,
99               then the saturation of the colors of the points will  vary  ac‐
100               cording  to  their  current  acceleration.  This has the effect
101               that the balls flare brighter when they are  reacting  to  each
102               other most strongly.
103
104               In  glow mode, all of the balls will be drawn the same (random)
105               color, modulo the saturation shifts.   In  non-glow  mode,  the
106               balls will each be drawn in a random color that doesn't change.
107
108       -noglow Don't do ``glowing.''  This is the default.
109
110       -vx pixels
111
112       -vy pixels
113               Initial  velocity  of  the balls.  This has no effect in -orbit
114               mode.
115
116       -orbit  Make the initial force on each ball be tangential to the circle
117               on  which they are initially placed, with the right velocity to
118               hold them in orbit about each other.  After a  while,  roundoff
119               errors will cause the orbit to decay.
120
121       -vmult float
122               In  orbit mode, the initial velocity of the balls is multiplied
123               by this; a number less than 1 will make the balls  pull  closer
124               together,  and  a larger number will make them move apart.  The
125               default is 0.9, meaning a slight inward pull.
126
127       -viscosity float
128               This sets the viscosity of the hypothetical fluid through which
129               the  control  points  move; the default is 1, meaning no resis‐
130               tance.  Values higher than 1 aren't interesting;  lower  values
131               cause less motion.
132
133               One interesting thing to try is
134
135                    attraction -viscosity 0.8 -points 300 \
136                    -size 10 -geometry =500x500
137
138               Give  it  a few seconds to settle down into a stable clump, and
139               then move the drag the mouse through it to make "waves".
140
141       -nowalls
142               This will cause the balls to continue on past the edge  of  the
143               screen  or  window.   They  will still be kept track of and can
144               come back.
145
146       -walls  This will cause the balls to bounce when they get to  the  edge
147               of the screen or window.  This is the default behavior.
148
149       -maxspeed
150               Imposes  a  maximum  speed  (default).  If a ball ends up going
151               faster than this, it will be treated as though  there  were  .9
152               viscosity  until  it  is  under the limit. This stops the balls
153               from continually accelerating (which they have  a  tendency  to
154               do), but also causes balls moving very fast to tend to clump in
155               the lower right corner.
156
157       -nomaxspeed
158               If this is specified, no maximum speed is set for the balls.
159
160       -fast-bounce
161               Uses the old, simple bouncing algorithm (default).  This simply
162               moves  any  ball  that  is out of bounds back to a wall and re‐
163               verses its velocity.  This works fine for most cases, but under
164               some circumstances, the simplification can lead to annoying ef‐
165               fects.
166
167       -correct-bounce
168               Uses a more intelligent bouncing algorithm.  This method  actu‐
169               ally  reflects  the  balls  off the walls until they are within
170               bounds.  This can be slow if balls are bouncing  a  whole  lot,
171               perhaps because of -nomaxspeed.
172
173       -graphmode none | x | y | both | speed
174               For "x", "y", and "both", displays the given velocities of each
175               ball as a bar graph in the  same  window  as  the  balls.   For
176               "speed",  displays  the  total  speed of each ball.  Default is
177               "none".
178
179       -fps    Display the current frame rate and CPU load.
180

ENVIRONMENT

182       DISPLAY to get the default host and display number.
183
184       XENVIRONMENT
185               to get the name of a resource file that  overrides  the  global
186               resources stored in the RESOURCE_MANAGER property.
187

SEE ALSO

189       X(1), xscreensaver(1)
190
192       Copyright  ©  1992,  1993,  1997 by Jamie Zawinski.  Permission to use,
193       copy, modify, distribute, and sell this software and its  documentation
194       for  any purpose is hereby granted without fee, provided that the above
195       copyright notice appear in all copies and that both that copyright  no‐
196       tice and this permission notice appear in supporting documentation.  No
197       representations are made about the suitability of this software for any
198       purpose.  It is provided "as is" without express or implied warranty.
199

AUTHOR

201       Jamie Zawinski <jwz@jwz.org>, 13-aug-92.
202
203       Viscosity support by Philip Edward Cutone, III.
204
205       Walls,  speed limit options, new bouncing, graphs, and tail mode fix by
206       Matthew Strait. 31 March 2001
207
208
209
210X Version 11               6.00-4.fc34 (05-May-2021)            attraction(6x)
Impressum