Up: IFSoft Home Page

About Fractalina

Fractalina allows the input and iteration of affine Iterated Function Systems. That is, it allows you to play "the chaos game".

To see it in action, you can go directly to the applet: Fractalina.

The chaos game begins with the selection of a few transformations. These transformations are of a special kind. Each transformation has a center point around which things rotate or compress. We sometimes informally think of the point as being where the transformation lives, so we can say things like "go halfway to the transformation". Each transformation has rotation, compression, and position values that determine how it works.

The chaos game can be explained this way:

  1. Starting at any point, randomly choose one of the transformations.
  2. Go part of the way towards the center point of that transformation and rotate part way around it.
  3. Repeat the process from the resulting point.

Basic Controls

The transformation parameters:

Compression determines the distance the point goes towards the transformation. The distance between your starting point and the transformation compresses by this value. That is, if the compression is 2 the point moves half way towards the transformation, for 3, the point goes two thirds of the way, 4 for three-fourths, etc. Rotation is the amount, in degrees, that the point will rotate around the transformation position.

The chaos game is a description of the random algorithm for computing the attractor of an Iterated Function System when all the transformation are affine. For more information about the math behind the chaos game, see the section Iterated Function Systems: The Underlying Math.

Setting the transformation parameters:

Fractalina labels each transformation by a color. In the drawing window a dot is drawn at the position of each transformation with the correct color for that transformation. Additionally, on the right-hand side of the Fractalina window, each transformation is listed and indicated by it's color.

When a transformation is created it inherits the rotation and compression of the transformation listed directly above it, and gets the position (0,0).

Changing the parameters of a transformation is easy. You can set the value of any parameter by simply editing the value shown in the appropriate box on the right of the window. Additionally you can set the position by dragging around the point in the drawing window. If you drag a point while the system is being iterated Fractalina will stop iteration, to start again press start. (Note that on some systems dragging won't register immediately, so start slow. If you do miss the point, Fractalina will think you're trying to zoom, and will display the zoom rectangle.)

Starting and stopping iteration:

Once you have set up your transformations you can start the chaos game (start to iterate the IFS) by pressing the large button labeled "Start". When you start, the button will be changed to read "Stop". If you want to stop iteration press "Stop" (the button will again become "Start").

Clearing the drawing window:

If you decide that you want to clear the drawing window at any time, just press the button labeled "Clear". If you press "Clear" while iteration is going, iteration will stop. To re-start press "Start".

A number of other actions result in the window being cleared. In general, anything that results in the appearance of the fractal changing will cause a clear.

Adding and deleting transformations:

To add a transformation press the "New Point" button. The color of the new point is selected according to the color selection mode (see below) which is either random, pre-set, or user selected. The values of rotation and compression are copied from the previous transformation (the last in the list). The new point is automatically placed at the origin.

To delete the last point in the list simply press the "Kill Point" button. In the current version only the last point in the list can be deleted, there is no way to delete a point in the middle with out deleting all those below it as well.

Advanced Controls


To inspect a region of the drawing window more closely you can use the zoom features. To zoom in place the cursor in at the upper-left or lower-right corner of the region you want to zoom, click and drag. As you drag a box will be outlined, drag the mouse around until the box is around the region you want to zoom and let up the mouse. Be careful that you don't start over a transformation point, or you'll end up dragging it instead of zooming! If you start to zoom, then decide you don't want to, make the zoom window small and it will be ignored. Remember that the further you zoom the slower drawing will be, since fewer points will land in the region on-screen

To zoom out to your most recent zoom setting, press the "ZoomOut" button. When you are in the un-zoomed state this button won't do anything.

Color selection:

When you make a new point the color of that point is generated based on the color selection mode. There are three modes: Random Colors, Preset Colors, and Select Colors. Random Colors randomly selects a color from the possible color space. Preset Colors takes the next color in a list of predefined colors. Select Colors allows the user to select a color from a wedge of colors with similar saturation.

To choose a color mode click on the choice box to the left of "Color selection:" and chose a mode. The default is Random Colors.

Choosing the color scheme for drawing:

There are several ways provided for coloring the fractal. First is plain black and white: the points are all colored black. Second is "Colors": each point is drawn according to the transformation just applied to get it. The rest are averagings over different numbers of transformations. That is, for "Averaged Over n" the colors of the n transformations most recently applied are averaged to find the color in which to draw the point. To chose one of the color schemes, use the choice box to the left of "Drawing color:".

The various coloring schemes are a good way to visualize the idea of code space, and understand the address of different regions of the attractor. They also look neat.

Preset configurations:

The choice box to the left of "Pre-set:" allows you to load a pre-set configuration of transformations. The default "no preset" does nothing. Others are labeled according to the fractal they make.

Hidden Features

Several features are hidden, since they are either limited or intended primarily for teachers. To access these features click the mouse in the control panel (near the buttons), and press the appropriate key.

Pressing 'r' creates a new point with random color, random rotation, and random compression. This is a neat way to get an idea of the "general fractal". That is, most fractals don't look like the mathematically usual ones, but are much more splotchy (less symmetry). It's also an interesting way to create art.

Pressing 'g' dumps the current image (fractal) to a gif file called frac.gif. Note: this won't work in most applet viewers, for security reasons. The gif dump feature uses the excellent GIFEncoder class by Addam Doppelt.

Pressing 'h' hides or un-hides the transformation settings and points. This is a way for a teacher to challenge students: the teacher sets up the fractal, then hides the settings and asks the students figure them out.


The only bugs known so far are problems inherited from various versions of the java runtime system. In particular, there are several bugs with most current (8/5/96) versions of Mac and PC JVMs.

*Fixed (8/7/96) (I wrote a good work around)* On Macintosh and PC computers many implementations of the Java Virtual Machine don't propagate the keyUp event. As a result, Fractalina won't recognize changes to transformation parameters. If you are on a system effected by this bug, make sure to pass the mouse over the text field after typing. (A work around causes Fractalina to check for changes when the mouse is in the text box.)

If you find any bugs not listed here, please email the author.

IFSoft Home Page

[HOME] The Geometry Center Home Page

This page was created by Noah Goodman.
Comments to: webmaster@geom.umn.edu
Created: Sep 23 1996 --- Last modified: Tue Oct 8 11:32:24 1996