Fractals reproducing realistic shapes, such as mountains, clouds, or plants, can be generated by the iteration of one or more affine transformations. An affine transformation is a recursive transformation of the type
Each affine transformation will generally yield a new attractor in the final image. The form of the attractor is given through the choice of the coefficients a through f, which uniquely determine the affine transformation. To get a desire shape, the collage of several attractors may be used (i.e. several affine transformations). This method is referred to as an Iterated Function System (IFS).
The coefficients a ... f are the IFS "code". A given image will normally require multiple transformations, each with their own set of coefficients. In the random iteration algorithm each transformation is assigned a probability p. With each round of iteration one of the transformations is chosen randomly, using the probability as factor in the choice, and the transformed point is plotted on the graphic plane. As the points are plotted the image emerges.
eg. fern leaf:
f1(0.0x + 0.0y + 0.0, 0.0x + 0.16y + 0.0) p1=0.01
f2(0.85x + 0.04y + 0.0; -0.04x + 0.85y + 1.6) p2=0.85
f3(0.2x - 0.26y + 0.0; 0.23x + 0.22y + 1.6) p3=0.07
f4(-0.15x + 0.28y + 0.0; 0.26x + 0.24y + 0.44) p4=0.07