airspray

a fractal animation program for unix/x11

copyleft, Cliff Miller, 2004

Release 0.1.1, 31 July 2004

Airspray is a fractal animation program for Unix machines running X11. It allows you to define your own complex functions and play with numerous animation parameters.

The current release is pretty much a hack, but functional. There is no formal documentation or help system, but this web page explains the GUI parameters enough that you should be able to enjoy airspray a little more.

Download and Install

To build airspray, you need: Build fltk first, then guifl (which depends on fltk), and finally airspray itself. The guifl and airspray packages have ./configure --with-* parameters that allow you to easily specify the locations of the fltk and guifl libraries.

About airspray's fractals

Airspray is a fractal animation program. Like many fractal programs it computes an iterated complex function zn+1=f(zn)+c, where c is a complex constant. The classic Mandelbrot set is computed by f(z)=z2.

Fractals are computed by coloring the complex plane according to the escape function E(z0, c, f), which represents the "stability" of the complex function f when iterated starting at z0. E is the number of times that zn+1=f(zn)+c can be evaluated before zn falls outside a boundary surrounding the origin; the classical boundary definition is a circle at radius 2, or |zn|=2.

A single Mandelbrot set image exists for any given complex function, and it is computed by coloring the complex plane using

color(z) = E(0, z, f).
Closely related to Mandelbrot images are Julia set images. There are infinitely many Julia set images that can be derived from a single Mandelbrot image -- one for every point on the complex plane. The Julia set image for coordinate zj is
color(z) = E(z, zj, f).

Airspray does not draw Mandelbrot or Julia images, but shows the trajectory of Mandelbrot iteration sequences. Thus as we iterate zn+1=f(zn)+c, we simply plot zn. With f(z)=z2, plotting such trajectories usually produces spirals or clusters of points. The animation of the spiral is achieved by finding an "interesting" trajectory, i.e. one with a relatively high stability, and then computing the trajectories for "nearby" initial points. Thus, if we find an interesting trajectory with initial value zt, we then compute n additional trajectories for zt + nd, where d is a very small complex "delta" that moves us through trajectory space. Such a group of trajectories is called a "flock".

Controlling airspray via the GUI

Version 0.1.1

Airspray computes 10 different flocks, each with its own value of zt. As the value of n increases for any given flock, the associated trajectory may become less stable and disappear. When that happens, that flock is allowed to die and a new one is searched for. Flocks also die naturally if the sum total number of iterations for the entire flock exceeds the "duration" parameter in the GUI. Another slider allows you to control the "flock size", which controls the number of trajectories displayed concurrently in any given flock. Once a flock's n reaches the flock size limit, the earliest trajectories are erased using black dots, resulting in a "tracer" effect. When a flock dies, the tracer effect smoothly erases the remainder of the flock unless the "paint" toggle button is activated, in which case the flock remnant is left permanently on the display (until you clear it using the "clear" button, resize the window, or the window redraws itself after being exposed).

There are numerous other ways to control the display animation. An initial flock location is selected by finding a zt such that

|E(zt)–Ei| ≤ D
where Ei is the "initial stability level" and D is the "level tolerance". Once a flock is established, each trajectory in it is drawn until either it escapes the boundary, or until it reaches Em, the "maximum iteration".

Flocks can be colored in two different ways:

If the "smooth color" toggle is activated, smooth coloring is used; otherwise iteration coloring is used.

Finally, the iteration function itself can be set using the text input window below the "clear" button. You may type in any expression involving the following terms:

You can use the mathematical operators +, &ndash, *, /, and ^ for addition, subtraction, multiplication, division, and exponentiation. The * symbol can be left implicit, as in 2z for 2*z, zzz for z*z*z (z3). You can also specify the functions cos, sin, exp, and log, for cosine, sine, exponential (ez), and natural log, all of which are implemented as complex functions. These functions all take a single argument and bind with the highest precedence. This is important to remember because the function may not always parse the way you expect (the parser is somewhat simplistic). For example: