This material is based upon work supported by the National Science
Foundation under Grant No. 9983703

Any opinions, findings, and conclusions or recommendations expressed
in this material are those of the author(s) and do not necessarily
reflect the views of the National Science Foundation.

A major part of this REU program involved using computers to visualize and explore the mathematical ideas that we were studying. This web page serves to describe and distribute the software that was used during the program. The software is distributed under the GNU General Public License.

- About the software
- Similarity transformations and fractal curves
- Graphical Analysis

- Orbit Diagrams
- Complex dynamics - Julia sets and the Mandelbrot set
- Box dimension
- Complex square roots

We generally used Python interactively. The python modules that are included in this distribution typically define one python class. The objects of these classes usually have a graphical component, so that creating the object causes an interactive window to open on the user's screen. But the objects also have methods that can be used to modify the attributes of the object. We would typically start a python interpreter, either from a UNIX command shell or from the IDLE interactive development environment, import one of our Python modules, and then create an object which could be used via the mouse, but could be modified from within the interpreter. This process will be illustrated when we describe the different modules.

Because Python programs are scripts, they are easily changed and do not need to be compiled. The REU participants were therefore able to easily change the programs to suit their individual purposes. They were encouraged to do so, and they frequently did.

The flexibility and ease of use of the Python language is achieved at the expense of speed. To compensate for this, it is easy to extend the language with modules written in a language, such as C, which is more directly tied to the computer hardware and therefore faster. A good strategy, which we followed, is to write special-purpose computational primitives in C and embed them in Python extension modules. This software package includes one such extension module written in C.

Information on

`>>> from chaos.simify import *`

>>> x = Similarity(3, 2+1j)

>>> x

z -> 3z + (2+1j)

>>> y = Similarity(1, 1-2j)

>>> y

z -> 1z + (1-2j)

>>> x*y

z -> 3z + (5-5j)

>>> y*x

z -> 3z + (3-1j)

>>> x(3-3j)

(11-8j)

The module also contains a few simple functions that we used to iteratively generate pictures of fractal curves, such as Koch's snowflake, as well as Hilbert's space-filling curve. (Of course the picture only shows the curve obtained after finitely many steps of the iterative construction.)

The programs koch.py and hilbert.py can be used to generate these images.

Graphical analysis is effective with pencil-and-paper , but it is even more effective with a computer. The Python module graphalyze.py defines an object that performs graphical analysis on the computer screen. Start your Python interpreter, create a Graphalyzer object, and use the Graphalyzer's set() method to set various parameter values.

`>>> from chaos.graphalyze import *`

>>> G = Graphalyzer()

>>> G.set(c=-1.24,x_min=-2, x_max = 2)

You will then have a window like this on your screen:

A mouse click on the window starts the graphical analysis:

The picture above shows an orbit that is attracted to the orbit of an attracting periodic point of period 2. Below you see one which is attracted to the orbit of an attracting periodic point of period 3.

Of course it is much harder to find repelling periodic orbits. With some luck and a great deal of patience, some of the REU participants did manage to find some repelling periodic points by this graphical method.

A Python object for viewing orbit diagrams is defined in the module orbits.py . To use it, start your Python interpreter, import the orbits module, and create an OrbitDiagram object:

>>> from chaos.orbits import *

>>> D = OrbitDiagram()

This will create a window on your screen which looks like this:

The slider controls how many iterates are plotted on each vertical line, and the mouse controls the vertical line on the screen which corresponds to the

The vertical line in the picture above is located approximately at a

One can also get some sense of what is happening in the dark colored

In our explorations we found that inside of an interval of

To use the program, start a Python interpreter, import the quaditerate module, and create a Mandelbrot object:

`>>> from chaos.quaditerate import *`

>>> M = Mandelbrot()

You should now have a window with a picture of the famous Mandelbrot set:

Click and drag the mouse to zoom in. (The click locates the center of the next view when zooming in. Clicking the right mouse button zooms out.)

The Mandelbrot set lies in the

Click and drag to zoom in on the filled Julia set, or use the right button to zoom out.

Clicking the middle mouse button toggles between a picture of the filled Julia set and a picture of the Julia set, i.e. the boundary of the filled Julia set. An estimate of the box dimension of the Julia set is displayed when the Julia set is visible. (We will say more about box dimension later.)

A few words are in order to explain how to interpret these pictures.

We are studying the dynamical systems given by iterating the functions

For a fixed value of

In our pictures of the filled Julia set the color of a pixel is black if the orbit of the corresponding

We studied the theorem that the Julia set

The program dust.py allows you to watch how the Julia set changes as *c *is varied. To run the program start a Python interpreter, import dust.py and then call the function todust with the starting and ending values of *c.*

`>>> from chaos.dust import *`

>>> todust(-.5+0j, -1+1j)

The box dimension of a bounded set

If we have a black-and-white computer image of

then an estimate of the box dimension of the set

The Python module box.py implements this algorithm. One can start with any image that has pixel values from 0 to 255. The set

import the box module and then create a Box object. It must be initialized with the name of an image file and a threshold value:

`>>> from chaos.box import *`

>>> B = Box('koch.gif',1)

Here we are initializing our box object with the gif image of Koch's snowflake from the top of this web page. We get two windows, one showing the black-and-white image of the boundary of the image, and one showing the least squares regression used to estimate the dimension:

The estimated dimension of 1.275 is reassuringly close to the actual box dimension of Koch's snowflake, 1.261... .

To use the program, start a Python interpreter, import the squirt module, and create a Squirt object. Then call the sqrt method of the object:

`>>> from chaos.squirt import *`

>>> S = Squirt('w.gif')

>>> S.sqrt()

Here are the results:

w |
z^{2 } = w |