# Iterated Function Systems

### GalleryIFS AppletSierpinski gallery

 Fractals are images of infinite complexity, characterized by being "similar" to themselves in some sense at all scales of magnification. Iterated function systems are a method of generating fractals using self-similarity. An IFS image is defined as being the sum of geometric transforms of itself. It turns out that simply specifying the transforms along with a weight for each transform is enough to determine the image. For example, the Sierpinski Triangle is made up of three half-size copies of itself. Symbolically, I = p1T1(I) + p2T2(I) + ... where the Ti are the transforms and the pi are weights adding to 1. The transformed images may overlap. The transformations I use are affine transformations, which mean they transform parallel straight lines into parallel straight lines. Thus each transform changes the rectangular image boundary into a parallelogram. Thus an IFS image may be defined simply by giving a few parallelograms, yet the resulting image may have infinite detail! The IFS algorithm for generating the image is simply this: Start with an arbitrary point in the plane, say (0,0). Pick a random transformation, according to the probabilities pi. Transform the point and plot it. Go to step 2. Usually the first few thousand iterations are not plotted to give the point time to settle down into the image. I like to plot the intensity of the image depending on the number of times a pixel has been hit, which gives a much smoother and more detailed image than simply plotting black or white.
Random fractals may be generated by choosing random transformations. The example at left shows a random fractal using two transformations. I have found that using just two transforms gives better images than using more. It is truly incredible the variety of images that can be generated just by picking a couple of parallelograms at random! This is an excellent example of how simple systems can give rise to very complex results.

For my own amusemant, I have written a Java program, available as an applet or as a standalone Java program. The program is necessary if you want to save IFS definition files and IFS images.

I also have a gallery of images.