What I find truly remarkable about iterated function systems is the astonishing variety of fractals you can create with just two affine transformations. Today, we’ll explore some more examples so you can get a better feel for how the particular affine transformations used affect the final image.
Let’s begin with the example from last week, which I color coded for easy reference.
Below are the affine transformations which generated this fractal.
Now compare the different colors in the image with the transformations. The first transformation combines a scaling by 0.95 with a rotation by 20 degrees. If you look closely, you’ll see that the green part of the image looks the same as a slightly smaller copy of the entire fractal, except rotated by 20 degrees from the center of the spiral (note that there is no translation involved in ).
The orange part of the image is simply a scaled version of the entire fractal (by a factor of 0.4), but moved over 1 unit. You can see this by looking at the form of the affine transformation
The pair of affine transformations used to generate the spiral exactly describes the self-similarity. This is easy to see after the fact — but I really have no helpful suggestion as to how to predict the form of this wonderful spiral just by looking at the transformations.
Now let’s just slightly alter the second transformation so that in addition to scaling by a factor of 0.4, there is a shear as well.
Notice how the fractal changes.
The shear distorts each arm of the spiral — stretching it in the process and creating more interaction between the various arms.
Now let’s go back to the original spiral and change the first transformation instead, slightly altering the scale factor.
Here is what happens:
I really don’t how to predict that this is what would happen — but I find it fascinating how even small changes in parameters can really change the way a fractal looks.
I can’t resist one more image created by changing the second transformation to
Here is the result.There’s so much you can do with just one pair of transformations!
While it may not be possible to guess exactly what a fractal will look like, it’s possible to know some features of a fractal based upon how you set up your transformations. For example, condsider this combination of a shear and a scaling:
There will be some aspect of the fractal which can be described by a shear. For the second transformation, just take the opposite of the first, as follows.
This must force the fractal to have 180 degree rotational symmetry! Think about how the algorithm works — take the image under one transformation, then the other — but by their definitions, the images must be symmetric about the origin.
So it is possible to use our knowledge of affine transformations to design, even if to a limited extent, some features of the resulting fractal.
As another example, we can assemble a fractal similar to two smaller copies of itself, one piece of which is a 90 degree rotation of the other. Use as above, and then use
Here is the resulting fractal.
You can clearly see how the red piece is a 90 degree counterclockwise rotation of the purple piece. This follows from how we created the second transformation from the first.
One reason for the diversity of fractals is the number of parameters needed to specify two affine parameterizations — twelve in all. Now some sets of parameters may create the same fractal — but even so, the wealth of variations is still staggering.
But will just any affine transformations work? There are some constraints — for example, you can’t describe a fractal in terms of larger copies of itself. So the affine transformations cannot make a starting object bigger, or else each successive iteration will expand. Of course you can still use such affine transformations to create interesting graphical effects — but the resulting image will not be an approximation to a fractal.
Next week, we’ll look at the algorithm which I used to create all these fractal images, and I’ll give you some Python code you can use yourself. But before I close, I’d like to share a few favorite fractals which are generated by just two affine transformations.
First, the Beetle. It looks like it’s scampering toward you.
And the second, well, it’s just yellow.
Until next week!
One thought on “Creating Fractals VI: Iterated Function Systems II”