Usage of the IFS fractals applet

The upper part of the applet has three active panels, called the Picture Panel (left), the Collage Panel (center) and the IFS Attractor (or Fractal) Panel (right).

By means of the dropdown menu Choose Image..., you can select one of the pictures in the list: the chosen picture appears both in the Picture Panel (in gray) and at the center of the Collage Panel (in blue). Actually, in the Collage Panel there are two superimposed copies of the picture: if you drag the orange dot, the blue picture moves and you will notice a gray copy beneath it.

Our goal is to reproduce the chosen image as the attractor of an Iterated Functions System (IFS): to this aim, we try to cover the gray picture in the Collage Panel with smaller copies of the picture itself, transformed through an affine transformation (a collage!).

An affine transformation in the plane is uniquely determined by specifying where an arbitrary triple of non-aligned points is sent by the transformation. You can choose the three source points by dragging the orange, cyan and green crosshairs in the Image Panel (by default, these three point are at the corner of the picture, but the sensible thing to do is to make them coincide with three meaningful spots of the image).

The orange, cyan and green dots in the Collage Panel specify where these three source points are sent by the transformation, while the tranformed picture is drawn in blue. Initially, the transformation is the identity map and we simply have an identical copy of the target picture, but we can change this by dragging the three coloured dots somewhere else:

In dragging the three image points, beware that the orange dot behaves differently from the cyan and green one: the latter two move independently, while dragging the orange dot translates rigidly the whole triple: thus, we need to place the orange dot before the other two. When fine-tuning the tranformation, for each small change in the orange dot we will need also to adjust slightly the other two.

Our goal is to place the three dots in the Collage Panel in such a way that the transformed picture covers perfectly a portion of the gray picture: this will be the first piece of our collage.

When satisfied, we can add a second piece to the collage: this can be done by pressing either the New Transformation or the Clone Transformation button (in the first case, the new transformation will be initialized as the identity, in the second case, as the previously active transformation). The images of all previously defined transformations are still visible in red.

We can proceed in this way until the collage is finished, i.e. we completely covered the gray image with collage pieces: for example, in the picture below Barnsley's Fern is covered with the images of four affine transformations (the last is the one responsible for the stem).

Whenever we need, we can change the currently active transformation by means of the numerical field Transformation number. We can thus modify (or clone, or delete by pressing the buttons...) each one of the previously defined transformations.

When satisfied with the collage, we just have to press the button Draw Fractal to check the attractor of the IFS we defined (which will appear in the Fractal Panel). We will see how much it resembles the original picture: if not, we may still go back to fine-tuning the transformations to get a better result!

A side effect of pressing the Draw Fractal button, is that the coefficients of the affine transformations of our IFS are printed in the text area below the buttons (the six non trivial coefficients of a 3x3 affine transformation matrix A - whose last row is always 0, 0, 1 - are printed in the following order: a11, a21, a12, a22,a13,a23). The coefficients can be used in any IFS drawing software.