 Instructions for the software IterateAgainSam to accompany Chaos Under Control: The Art and Science of Complexity, W. H. Freeman, 1994, by David Peak and Michael Frame

Hardware requirements: Macintosh, 1MB of free memory

System requirements: System 7.0 or higher

© David Peak and Michael Frame

With IterateAgainSam we explore the dynamics of iterating a simple function in three variations: Graphical Iteration, Time Series, and Bifurcation Diagram.

From the Option menu we select one of Graphical Iteration, Time Series, and Bifurcation. For all three options, we are presented with
 * a Param box, * a Seed box, * an Iter box, and * a Drop box.

In Graphical Iteration and Time Series, the current parameter value of the function is displayed in the Param box. In Bifurcation, the parameter value, changing as the program runs, is displayed in the Param box.

The initial x-value is displayed in the Seed box.

The total number of iterations to be performed is displayed in the Iter box.

The number of iterations performed before plotting begins is displayed in the Drop box.

In all four boxes (except Param in Bifurcation), the value can be changed by dragging the cursor across the old value, typing the new value, and pressing Return.

From the Rule menu we select one of three functions to iterate:
 * the Tent map, T(x) = s/2 - s*|x - 1/2|, * the Logistic map, L(x) = s*x*(1 - x), and * the Sine map, S(x) = (s/pi)*sin(pi*x).

The range of parameter (s) values giving bounded dynamics are [0,2] for T(x), [0,4] for L(x), and [0,pi] for S(x).

From the Depth menu we select the Òorder of compositionÓ of the function being applied. For example, with depth = 2, each point plotted is the result of two additional iterations of the function. In Graphical Iteration, it is the graph of this composition that is plotted in the left window. For exmaple, with depth = 2 and the Tent map as rule, the graph of T(T(x)) is plotted. Depth = 1 is the default setting, and represents plotting each single itreration.

When Composition depth is selected from the Depth menu, a PopUp window appears on the upper left of the screen. In this window, we select the number of iterates, by either moving the slider or by double clicking on the numerical display (the number will darken) and typing the desired number (between 1 and 100). Clicking the Apply button sets this number of iterates.

Graphical Iteration

With the Graphical Iteration option we explore dynamics by generating the graphical iteration plot and a histogram of which pixels are visited how many times in the orbit. Denoting by x0 the seed value, iteration of the function f(x) produces a sequence of values x1 = f(x0), x2 = f(x1), x3 = f(x2), ... . Graphical iteration generates an initial vertical line from (x0,0) to (x0,x0), then a vertical line from (x0,x0) to (x0,x1) and a horizontal line from (x0,x1) to (x1,x1). The last two steps are repeated for each of the values x2, x3, ... - that is, we generate a vertical line from (x1,x1) to (x1,x2) and a horizontal line from (x1,x2) to (x2,x2), and so on. For each point (xn,xn), in the histogram the horizontal line of height xn (more precisely, the pixel into which xn falls) has one pixel added to its right edge.

In addition to the common features, we are presented with
 * an Iteration Window (on the left) in which are plotted the graph of the rule, the new = old line, and the graphical iteration lines, * a Histogram Window in which are plotted horizontal lines whose length represents the number of times the pixel at that height is visited by the iteration, * a Run/Stop button, * a Corners box for entering the x- and y-coordinates of the lower left and upper right corners of the Iteration Window.

* After selecting Param, Seed, Iter, and Drop, the iteration process is begun by clicking the Run button. Graphical iteration lines and histogram bars are plotted after Drop number of values are generated, and continue until either Iter number of values have been generated or the Stop button is clicked.

* A portion of the Iteration Window can be magnified by stopping the iteration, moving the cursor into the Iteration Window (it assumes an L shape there) and clicking the mouse button to select the lower left corner, then holding down the shift key (inverting the L shape of the cursor) and moving the cursor to the upper right corner and clicking the mouse button.

* Note that when the cursor is in the Iteration window, the x- and y-coordinates are displayed in a popup window above the Iteration Window.

* Alternately, the coordinates of the corners can be entered into the URx, URy, LLx, and LLy cells and the Corners button clicked. Here URx, URy, LLX, and LLy stand for "Upper Right x," "Upper Right y," "Lower Left x," and "Lower Right y" the x- and y-coordinates of the Upper Right and Lower Left corners of the Iteration Window.

* Clicking the Run button begins the iteration with this magnification.

* Because the Iteration Window is square, the program will modify a selected rectangular region to make it square. Keeping the lower left corner fixed, a square window with side the longer of the rectangle's sides will be used for the Iteration Window.

* When the cursor is moved into the Histogram Window, the height (y) and length (number of pixels, x) are displayed in a popup window above the Histogram Window.

Time Series

With the Time Series option we explore dynamics by plotting successive values of xn, the value giving the height of the point, n giving the horizontal position. That is, x0 is plotted on the left side of the window, x1 next right after it, x2 next right after x1, and so on.

In addition to the common features, we are presented with
 * a Time Series window in which the time series points are plotted, * a High and Low box containing windows displaying the current top and bottom x-values of the Time Series window, * a Run/Stop button, * a Cont (= Continue) button, * a Lines check box, * s Spacing window, and * a Count window.

* After selecting Param, Seed, Iter, and Drop, the time series is generated by clicking the Run button. Time series are plotted after Drop number of values are generated, and continue until either Iter number of values have been generated, the Stop button is clicked, or the right edge of the Time Series window is reached.

* If the plotting is stopped before Count = Iter and before the right edge of the Time Series window is reached, clicking the Continue button resumes plotting the points.

* If the right edge of the Time Series window is reached before Count = Iter, clicking the Continue button clears the Time Series window and continues plotting the time series points.

* Checking Lines connects successive points of the time series with lines.

* Spacing is the number of pixels each point is plotted to the right of the one before it. For example, if Spacing = 1, successive points are plotted in horizontally adjacent pixels; if Spacing = 2, successive points are plotted with a horizontal gap one pixel wide; and so on.

* To change the coordinates of the top and bottom of the Time Series window, either

** Enter the desired numbers in the High and Low boxes (darken by dragging the mouse across the entry, type the new number, and press return)

Or

** Move the cursor into the Time Series Window and click to select the bottom of the window, then hold down the shift key and click the mouse button to select the top of the window.

* Note that as soon as the cursor enters the Time Series window, the coordinates of the cursor appear in a popup window above the Time Series window. If the time series has been continued for several screens, the horizontal coordinate gives the series number from the beginning of the first screen.

{B>Bifurcation

With the Bifurcation option we produce a "family portrait," called a bifurcation diagram, of how the dynamics changes as the rule parameter increases. The parameter values increase horizontally across the bifurcation diagram. For each parameter value, the rule is iterated Iter times, and after Drop times, the points are plotted vertically above the parameter value. Increasing parameter value is indicated by a black line growing left-to-right across the bottom of the window.

In addition to the common features, we are presented with
 * a Bifurcation window in which the bifurcation diagram is plotted, * a Corners box displaying the ParL, ParR, DynL, and DynR values of the Bifurcation window. Here ParL, ParR, DynL, and DynR stand for "left parameter value," "right parameter value," "low dynamical value," and "high dynamical value." * a Run/Stop button.

* After selecting Seed, Iter, and Drop, the bifurcation diagram is generated by clicking the Run button.

* Progress is measured by a black line growing left-to-right across the bottom of the window, and by the current parameter value's being displayed in the Param box.

A portion of the Bifurcation Window can be magnified by stopping the iteration and either

** Moving the cursor into the Bifurcation Window (it assumes an L shape there) and clicking the mouse button to select the lower left corner, then holding down the shift key (inverting the L shape of the cursor) and moving the cursor to the upper right corner and clicking the mouse button.

Or

** Entering the new values of ParL, ParR, DynL, and DynR in the Corners box. Darken the old entry by dragging the cursor across it, type the new value, and press Return.

* Clicking the Run button begins the iteration with this magnification.

Erratum: Before Printing, under PageSetup choose Landscape format (the right-hand choice under Orientation).