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