Instructions for creating fractals using the course software
Fractal Pattern
This program will draw fractals with an Iterated Function System
or by the Chaos Game. Either method requires that the transformations
defining the IFS be given. An IFS is composed of a number
of affine transformations, each of which is defined by 6
numbers (a,b,c,d,e,f). The first 4, (a,b,c,d), define the matrix
part of the affine transformation, while the last two, (e,f),
define the shift vector. You can input your own parameters (each
row corresponds to one affine transformation of the IFS up to
a maximum of 10 affine transformations i = 1,..., 10),
or use the drop down
menu (Select a Pattern)
to select one of those (afterwhich you could change their
paramenters).
Pressing the Blue Print button will display the blue print
of the current IFS (which is just one iteration of the IFS with an
initial image being the full square, or a triangle in the case of the
Sierpinski triangle).
The last column, p, is the 'probability' and is used in the chaos game. To begin with, just set
this to be 1/k where k is the number of transformations in the IFS (so for example, if your
IFS has 5 affine transformations w1,. . . , w5, then put 0.2 in
each row under the 'p'.) If the fractal is not being drawn well enough with these values of p, try
adjusting them so that the larger p goes with the wi that contracts the least (i.e.,
the image of the ith square is largest). Keep in mind that the sum of all the
p's must add up to 1 (so if you make one of the p's larger, you must make the other ones smaller).
Pressing the Fractal button will draw the fractal by iterating
the IFS. Before pressing that button however, you must enter the
number of iterations to be performed (Number of Iterations).
Drawing fractals using an IFS can be computationally intensive.
For an IFS with 3 transformations, 10 iterations
is about
the maximum you would want to wait for. With 4 transformations, the maximum
number of iterations is about 8, and with 5 transformations the maximum
number of iterations is about 7. For IFS's with more transformations, the
maximum number of iterations is correspondingly less.
To draw the fractal using the chaos game, you need to input the
probability p of each transformation of the IFS.
The probabilities are numbers between 0 and 1 and should add up
to 1.
It is much more efficient, usually, to draw fractals with via the
chaos game. Here it depends on the IFS, but about 20,000 iterations
will usually do a good job. If you think more points would do a better job, then
increase to 40,000 etc.
The parameters r, s, angle 1 and angle 2
can be used instead to define the matrices of the
affine transformations; this is
discussed in the text in Section 5.2.
So instead of inputing (a,b,c,d) to define the matrices of the
affine transformations, you could instead input the parameters
r,s, angle 1 and angle 2, and press the
Compute Parameters button which will convert them into
(a,b,c,d) (the i input specifies which of the affine
fransformations you are defining).
Sometimes is is instructive to see the fractal with the blue print of
the IFS over top of it. To do this, press the Blue Print button and
then without closing that window (just shift it down so you can get at
the buttons on the main window) press the Fractal button.
Printing out a copy of the image of the fractal;
If the 'Print' button doesn't seem to work
properly you can still get excellent quality images printed out by following this procedure. Create the image (either
with the 'Fractal' or 'Chaos Game' buttons) then take a screen shot; press the 'Ctrl' and 'Alt' keyboard buttons
('control' and 'alternate')
down simultaneously and then press down the 'Prt Scr' button ('print screen') while these two are pressed down.
Now you have saved a (bitmap) image of your computer screen. You need to paste itinto some picture editing software like
'Paint' or 'Photoshop' (to do this click 'file' and choose 'new'). Then 'paste' the image and save as JPG (for example).
Chaos Game Applet
Choose the largest applet so it fills your computer screen. Enter the IFS parameters (see above for choosing the 'p'
values in the last column). Click on 'fastest' and let the image develop. When it is filled, click 'stop' and take a
screen shot and save (as described above).
---- ---- ----- ---- ---- ---- ---- ---- --- ---- ---- --- ----- --- ---- ---- ----- ---- --- ---
If you have difficulty saving an image, just email me (R. Pyke) the IFS parameters and I will email
back to you the image produced. Print out this image and attach it to your solutions to hand in.