FRACTINT has a nice section for computing the attractor of an IFS, as well as a collection of interesting choices of IFS's. The documentation on the ifs type of fractal in FRACTINT is available at
the Iterated Function Systems page in the FRACTINT manual
FRACTINT's IFS programs correspond to the fractal type of ifs. When you select that type, FRACTINT will next prompt you for a choice of file containing the definition of the IFS you wish to explore. The standard file is fractint.ifs, although just as in the case of L-systems you may also create your own IFS definitions file. After selecting the IFS file, you choose a named IFS such as fern, or crystal, or spiral. Just as for L-systems, press the key t to change the fractal type and z to change the parameters.
When you select the class fern, Barnsley's production of a Black Spleenwort fern, you see the definition of the IFS:
fern {
0 0 0 .16 0 0 .01
.85 .04 -.04 .85 0 1.6 .85
.2 -.26 .23 .22 0 1.6 .07
-.15 .28 .26 .24 0 .44 .07
}
The probability that w is selected is p. One may check that the last column sums up to 1. As a second example, consider the Sierpiński triangle IFS of the last section. There are three affine maps with equal probabilities. Looking at the precise formulas given in the last section, we would write the IFS as:
sierpinski {
.5 0 0 .5 0 0 .333
.5 0 0 .5 1 0 .333
.5 0 0 .5 .5 .8660254 .334
}
For the sierpinski IFS, let's try varying a few parameters. First let's replace all the scale factors .5 by .33, or more precisely, in the Chaos Game we suppose the traveller moves two-thirds of the way to the chosen destination each day. This would lead to the IFS:
sierpinski2 {
.33 0 0 .33 0 0 .333
.33 0 0 .33 1.34 0 .333
.33 0 0 .33 .67 1.160474 .334
}
Figure 47: Attractor of IFS sierpinski2
On the other hand, if we increase the scale factor .5 to something like .67, we would expect the attractor to become much thicker. What do you think the attractor turns out to be? Play the Chaos Game and find out! There are many other interesting variations that can be tried.
According to our theory, varying the probabilities have no affect on
the ultimate attractor. However, in practice we carry out only a
finite number of iterations in the Chaos Game. Changing the
probabilities can substantially affect which parts of the attractor
our orbit wanders through first. For instance, suppose we skew the
Sierpiński IFS heavily toward
, making the probabilities
0.98, 0.01 and 0.01, respectively. Under FRACTINT's standard
iteration limits the resulting orbit is shown in this
figure. The vast majority of iterates
stay very near the lower left vertex. If we increase the number of
iterations carried out in FRACTINT (use the x command to get
to the basic options screen), we can push it a bit further to look
more and more like the usual attractor.
Figure 48: Probabilities weighted heavily toward lower left vertex
The fern IFS is simple enough to carry out; the attractor here is a breath-takingly realistic image of a natural fern.
Figure 49: Barnsley's Black Spleenwort Fern
One nice feature of the Sierpiński system is that we have an idea of the original triangle as the big piece mapped onto the three smaller triangles. This construction of the whole fractal from three similar but smaller pieces is what Barnsley calls a collage, alluding to the art-form of constructing a scene from snippets of colored paper. Finding these collages in images and turning them into definitions of an IFS is the subject of our next section.
As a first guess, we might choose a big compact set K containing the
fractal we are seeking to create. The iterates
are guaranteed
to converge to the attractor of the IFS. For example, from eyeing the
picture of the fern, it appear that the attractor is contained in the
square K with vertices (0,0), (4,4), (0,8) and (-4,4). Then
to approximate the attractor, we may plot all the images of K under
words in the generators
with, say, five terms, i.e.
. The result is shown in
this figure. At the same time,
we show the original square in blue, and the images of the square
under each individual
in red. Each
in red is labelled
by its number j.
Figure 50: Approximating the fern by images of a square.
One can see the image squares converging on the attractor. The images
under
are completely flattened out; they form the ``stems''
appearing throughout the fractal. The transformation
has a
relatively large scaling factor. Therefore, it takes relatively many
more applications of
to shrink down to the attractor. This
explains why the chosen probability for
is so high (85%), and
why the ``stem'' transformation probability (1%) is so low.