1 ATTRACTION 
Interactions of opposing forces

SYNOPSIS

 $ attraction [-display host:display.screen] [-foreground color] 
              [-background color] [-window] [-root] [-mono] [-points int]
              [-threshold int] 
           [-mode balls | lines | polygons | splines | filled-splines | tails ] 
              [-color-mode cycle | random] [-size int] [-segments int] 
              [-delay usecs] [-color-shift degrees] [-radius int] [-vx int] 
              [-vy int] [-glow] [-noglow] [-orbit]

2 DESCRIPTION
The attraction program has several visually different modes of 
operation, all of which are based on the interactions of a set of control
points which attract each other up to a certain distance, and then begin
to repel each other.  The attraction/repulsion is proportional to the 
distance between any two particles.

2 OPTIONS
Attraction accepts the following options:

    -window
Draw on a newly-created window.  This is the default.

    -root
Draw on the root window.

    -mono 
If on a color display, pretend we're on a monochrome display.

    -points integer
How many control points should be used, or 0 to select the number randomly.
Default 0.  Between 3 and 15 works best.

    -threshold integer
The distance (in pixels) from each particle at which the attractive force
becomes repulsive.  Default 100.

    -mode "balls | lines | polygons | tails | splines | filled-splines"
In balls mode (the default) the control points are drawn as filled
circles.  The larger the circle, the more massive the particle.

In lines mode, the control points are connected by straight lines;
the effect is something like qix.

In polygons mode, the control points are connected by straight
lines, and filled in.  This is most interesting in color.

In splines mode, a closed spline is interpolated from the control 
points.

In filled-splines mode, the splines are filled in instead of being
outlines.  This is most interesting in color.

In tails mode, the path which each particle follows is indicated
by a worm-like trail, whose length is controlled by the segments
parameter.

    -color-mode cycle | random
Whether colors should cycle through the spectrum, or be picked randomly.

    -size integer
The size of the balls in pixels, or 0, meaning to select the sizes 
randomly (the default.)  If this is specified, then all balls will be 
the same size.  This option has an effect in all modes, since the ``size''
of the balls controls their mass.

    -segments integer
If in lines or polygons mode, how many sets of line segments
or polygons should be drawn. Default 100.  This has no effect in balls
mode.  If segments is 0, then no segments will ever be erased (this
is only useful in color.)

    -delay microseconds
How much of a delay should be introduced between steps of the animation.
Default 10000, or about 0.01 seconds.

    -color-shift degrees
If on a color display, the color of the line segments or polygons will 
cycle through the spectrum.  This specifies how far the hue of each segment
should be from the next, in degrees on the HSV wheel.  Default 3.
This has no effect in balls mode.

    -radius
The size in pixels of the circle on which the points are initially positioned.
The default is slightly smaller than the size of the window.

    -glow
This is consulted only in balls mode.  If this is specified, then 
the saturation of the colors of the points will vary according to their
current acceleration.  This has the effect that the balls flare brighter
when they are reacting to each other most strongly.

In glow mode, all of the balls will be drawn the same (random)
color, modulo the saturation shifts.  In non-glow mode, the balls will
each be drawn in a random color that doesn't change.

    -noglow
Don't do ``glowing.''  This is the default.

    -vx pixels

    -vy pixels
Initial velocity of the balls.  This has no effect in \fB\-orbit mode.

    -orbit
Make the initial force on each ball be tangential to the circle on which
they are initially placed, with the right velocity to hold them in orbit
about each other.  After a while, roundoff errors will cause the orbit
to decay.

    -vmult float
In orbit mode, the initial velocity of the balls is multiplied by this;
a number less than 1 will make the balls pull closer together, and a larger
number will make them move apart.  The default is 1, meaning stability.

2 COPYRIGHT
Copyright (co 1992, 1993 by Jamie Zawinski.  Permission to use, copy, modify, 
distribute, and sell this software and its documentation for any purpose is 
hereby granted without fee, provided that the above copyright notice appear 
in all copies and that both that copyright notice and this permission notice
appear in supporting documentation.  No representations are made about the 
suitability of this software for any purpose.  It is provided "as is" without
express or implied warranty.

2 AUTHOR
Jamie Zawinski <jwz@mcom.com>, 13-aug-92.
