Creating Fractals


Exercise

The purpose of the present exercise is to generate a fractal with the method of Iterated Maps. This method is demonstrated in the Game of Chaos for an example.

Consider the initial point with coordinates (, ) = (0,0). We will produce 10,100 other points in sequence using the following procedure: the coordinates (, ) of a generic point will be computed using the coordinates (, ) of the previous point in the sequence using the following formulas:

 

and are coefficient that are assigned in the table below.

 
A.85.04-.04.85.001.60
B.20-.26.23.22.001.60
C-.15.28.26.24.00.44
D.00.00.00.16.00.00
       

Every time we generate a new point we select one of the rows at random in the table above and use the coefficients in that row to compute the coordinates of the point. The rows are not be selected with uniform probability, but with the following ones:

Finally, we then draw the last 10,000 point you generated.

Below is the code to execute the above detail exercise.


Generate Functions Which Do the Heavy Lifting

Checking the select_locator() function works properly via quick simulation...

image-20201007210829379

Calculate New Coordinate Points

Create Fractal Figure

image-20201007211204468