|Dͻ
|D |5Brainware |D
|Dͼ

^C^1STRANGE ATTRACTORS
^Cby
^CDaniel Tobias

   Perhaps you were attracted to this feature by its strange name.  Actually,
a "strange attractor" is an interesting mathematical concept.  Strange
attractors are described in A. K. Dewdney's Computer Recreations column in the
July, 1987 Scientific American; the subject is also discussed in the article
"Chaos" by Crutchfield, Farmer, Packard, and Shaw in the December, 1986
Scientific American, and in an article by Gordon Hughes in the December, 1986
issue of Byte (about Henon mappings, a related subject).  What follows here is
a brief explanation; read the above articles for more in-depth information.

   Attractors are a particular type of iterated equation.  An iterated equation
is one in which successive values of a variable are generated by applying a 
formula to the previous value.  For example, the equation ^1x := x + 1^0 iterates
to produce successive integers.  ^1x := -x^0, on the other hand, causes oscillation
between the original value of x and its negative; if you start with x = 1, you 
will get the sequence 1, -1, 1, -1, ...

   An "attractor" is an iterative equation for which the variable settles down 
to a particular value or set of values.  For instance, a pendulum will, due to 
friction, ultimately come to a rest at its central point; hence, the equation 
describing its motion will ultimately settle on a single value, the value to 
which it is "attracted".  There are other equations describing more complex 
physical systems which oscillate repeatedly between two or more values. 

   To be "strange", an attractor must yield unusual, "chaotic" results at
certain values.  A strange attractor might be a perfectly civilized equation
given a particular set of values for its parameters, settling down to a regular
pattern of values; but if the parameters are changed a bit, there suddenly
doesn't seem to be much order to the resulting values.

   A good example, the one which the accompanying program illustrates, is the
iterated equation:

^C^1x := r * x * (1 - x)

   Here, the current value of x is multiplied by 1 - x, and this product is
multiplied by the fixed parameter r to yield the new value of x.  This models
the behavior of an electronic circuit of three amplifiers, in which the first
amplifier outputs a signal x, the second takes x as an input and produces 1 - x,
and the third takes these two signals, outputs their product, and feeds it back
into the first amplifier.  The parameter r represents a control voltage given
to the first amplifier.

   Given a value of r below 3, the equation produces values which initially
oscillate, but ultimately settle down to a single value.  At values just above
3, x reaches a dual equilibrium, going back and forth between two values.  With
higher values of r, you reach places where there are four, eight, 16, and more
equilibrium values, in an exponentially doubling sequence.  But, when r reaches
3.56994571869, all bets are off; x oscillates in a seemingly-random manner,
never settling on any particular values.  However, there are still some
interesting patterns and pockets of order, which can be seen when values of r
and x are plotted.

   The program accompanying this article will display the iterative values of x
given different values of r (between 0 and 4) and starting values of x (between
0 and 1).  Also, if you have color graphics capability, you can display a graph
of the values of the attractor.  This is displayed with the x axis ranging from
0 to 1 in the left-right direction (with 0 at the left edge and 1 at the 
right edge), and the r axis in the up-down direction (with lower values near 
the top of the screen and higher values near the bottom) at a scale determined 
by the low and high values of r you choose to plot.  Use the range from 0 to 4 
to see the full graph; 2.95 to 4 to concentrate on the "interesting" part 
where it splits from one single strand into chaos; or a narrower range to see 
a close-up of a part of the graph.  Other parameters you can adjust are the 
starting value of x (in a range of 0 to 1; if you pick 0 or 1, the graph will 
be rather boring, since all further iterations will equal zero), the number of 
iterations to skip before plotting (this is to screen out the initial 
oscillations before the equation "settles down" at the appropriate point(s) 
for the given value of r), and the number of points to plot at each value of r 
(higher values of this will increase the accuracy of the graph at places where 
there are many different values in the iterations). 

   Reducing the last two parameters will speed up plotting, but make the graph
less accurate.  Some interesting patterns are yielded, however, when you set
these parameters to very low values such as zero skipped iterations and 10
plotted iterations.  Also, with low values of these parameters, the starting
value of x makes a difference in the plotted graphs; with higher values there
isn't any noticeable difference, since the values of x ultimately settle down to
the same place regardless of where they start.

   You may still be mystified about this whole thing after this brief
explanation.  Go ahead and run the program.  Try plotting the graph with the
default values first, then you can experiment by varying the parameters and see
what you end up with.  Be patient; the graph takes a while to plot.  You may
also want to use the value-display feature (the only accessible feature for you
if you don't have color graphics capability) to see what numeric values result
from different values of r and starting values of x.

   To run this program outside BIG BLUE DISK, type: ^1PASRUN ATTRACT^0.

DISK FILES THIS PROGRAM USES:
^FATTRACT.CHN
^FPASRUN.COM
^FRETURN.CHN
