next up previous contents
Next: Designing IFS's: the Collage Up: Iterated Function Systems Previous: Calculating the attractor by

Plotting IFS's with FRACTINT

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
          }

Each line is of the form tex2html_wrap_inline8660 . The affine map is then

displaymath8662

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
          }

We encourage the reader to add this definition to their fractint.ifs file, and to try it out in FRACTINT.

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
          }

We had to adjust the translations so that the three vertices of the original triangle remain the fixed points of the three affine maps. The resulting attractor is shown in this figure. All we see is a faint smattering of fractal dust, a two-dimensional analogue of the Cantor set. ``Middle-third'' gaps appear throughout this triangle.

   figure2309
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 tex2html_wrap_inline8582 , 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.

   figure2321
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.

   figure2333
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 tex2html_wrap_inline8318 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 tex2html_wrap_inline7836 with, say, five terms, i.e. tex2html_wrap_inline8702 . 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 tex2html_wrap_inline7836 in red. Each tex2html_wrap_inline7832 in red is labelled by its number j.

   figure2350
Figure 50: Approximating the fern by images of a square.

One can see the image squares converging on the attractor. The images under tex2html_wrap_inline8582 are completely flattened out; they form the ``stems'' appearing throughout the fractal. The transformation tex2html_wrap_inline8712 has a relatively large scaling factor. Therefore, it takes relatively many more applications of tex2html_wrap_inline8712 to shrink down to the attractor. This explains why the chosen probability for tex2html_wrap_inline8712 is so high (85%), and why the ``stem'' transformation probability (1%) is so low.


next up previous contents
Next: Designing IFS's: the Collage Up: Iterated Function Systems Previous: Calculating the attractor by

David J. Wright
Mon Aug 19 17:21:15 CDT 1996