Using the VB Program "Fractal Pattern" to Draw Fractals with Iterated Function Systems and the Chaos Game




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).

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.

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 on pages 235,236. 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.

Back to the MAT335 software page