Omega Red's garbage heapInformation wants to be free.
OK... Now something for those more inclined. What are this transformations? Nothing very special: composition of translation, scaling and rotation. Some formulas (P-original point, P'- point after transformation):
Every IFS fractal is an attractor of some transformation system; that is, it appears after infinite number of steps of these transformations applied to ANY starting image. The attractor itself does not change under these transformations - it's a stable "point".
Transforming of every image pixel with above formulas may take some time (especially
trigonometrical functions are costly).
Here comes handy the fact, that composition of our three operations affecting the pixel can be
represented in more simple way. If we have transformation composed of scaling with factors
[sx, sy], rotation of axes with [rotx, roty] radians and translation with vector [dx, dy] (order
of the operations is important!) - then we can calculate four derived parameters:
However, with large resolutions our program may be slow anyway. There is another trick that can help us do the work. Let's select one pixel, it will be our starting point. Now we randomly select one of the transformations, apply it to our pixel, draw the resulting point, and this point is our next starting point. And so on... Next point is created by applying randomly selected transformation to the previous one. (Now the similarity to the "chaos game" should be clearly seen...)
The important thing is how we select probabilities for particular transformations. Simplest
way is to make them equal, but this can often lead to irregular point distribution. Better
method is as follows (assume we have N transformations with coefficients a[i], b[i], c[i], d[i],
i=1..N). Firstly, we calculate sum of the determinants of all transformations:
Yeah... Afther this dose of theory you can write your own programs that draw IFS fractals. When in doubt, experiment or contact me.
Copyright by Omega Red 2003,2004