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
selfsimilarity. 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 halfsize copies
of itself. Symbolically,
I = p_{1}T_{1}(I) + p_{2}T_{2}(I) + ...
where the T_{i} are the transforms and the p_{i} 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 p_{i}.
 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.
