Macintosh IFS manualWritten by Paul Bourke
The following describes iterated function systems, a particular implementation on the Macintosh, and presents some examples.
One of the many ways of describing the affine transformations for iterated functions systems (IFS) is as follows:
y = -r sin(theta) x + s cos(phi) y + k
Generally there are a number of these mappings (different values of r, s, theta, phi, h, k) which are chosen at random at each iteration.
How does the program work
The fundamental iterative process involves replacing rectangles with a series of rectangles called the generator. The rectangles are replaced by a suitably scaled, translated, and rotated version of the generator.
For example consider the generator below
It consists of three rectangles, each with its own center, dimensions and rotation angle. The initial conditions usually consist of a single square, the first iteration then consists of replacing this square by a suitably positioned, scaled and rotated version of the above generator. The result would just be the generator above. The next iteration involves replacing each of the rectangles in the current system by suitabled positioned, scaled, and rotated versions of the generator resulting in the following
The next iteration replaces each rectangle above again by the initial generator as shown below
and so on, three iterations later
IFS allows the user to explore the result of applying different generators. The generator rectangles can be created, shifted, scaled, and rotated by the handles on each rectangle shown below.
The user may iterate forward or in reverse, colour the borders, interior, or background.
A library of interesting generators is provided for initial experimentation. Generators created by users may be saved in files and recalled at a later time.
Images so created may be copied from IFS and pasted into a more standard drawing package for incorporation into a document and printing.
Hopalong or "The Chaos Game"
A technique exists by which the resulting form after an infinite number of iterations can be derived. This is a function of the form
This gives a series of (x,y) points all which lie on the result of an infinite IFS. Although it still takes an infinite number of terms in this series to form the result the appearance can be readily appreciated after a modest number of terms (10000 say).
Note that with both methods it is possible to create the image at any scale. In many but not all cases zoomed in examples will be exhibit self similarity at all scales.
Data reduction for model files. If a generator can be found for a complex image then storing the generator and the rules of production results in a great deal of data reduction. For example the weed in the examples above might eventually contain over 2000 rectangles but is completely specified by the characteristics of 3 rectangles, only 5 numbers, center (cx,cy), scale (sx,sy), and angle
Note: it is not necessarily trivial to derive a rectangular generator for an arbitrary form, although it is possible to create a polygonal generator for any form. The following shows a maple leaf generated using the IFS program.
Some other IFS examples of plant-like structures are shown below
Demko, S., Hodges, L., and Naylor B
Barnsley, F., and Sloan, A.D.
Gallery of Randomly Generated IFSCreated by Paul Bourke
The following images are a selection from an infinite set of Random Iterated Function Systems (IFS) of the form
yn+1 = d xn + e yn + f
For the mapping to contractive the following must all be true.
b2 + e2 < 1
a2 + b2 + d2 + e2 < 1 + (ae - db)2
For any particular image there are 4 different sets of values for (a,b,c,d,e,f) all on the interval [-1,1]. At each iteration step one of the sets is chosen at random to form the next term in the sequence (series).
The results fall into the following broad classes of images
The third "interesting" category can be further classified as follows