Académique Documents
Professionnel Documents
Culture Documents
Date: 04/21/2017
A. Objectives
This purpose of this project is to understand how to generate fractal images using
iterated function systems. The objectives of the project are:
• Implement the Algorithm RenderIFS and generate the resulting images for
different number of algorithm iterations
• Observe the change in the resulting images when the affine transformation
probabilities are changed.
B. Methods
Peitgen and Saupe present the Algorithm RenderIFS in The Science of Fractal
Images, which is an extension on iterated function systems. Iterated function
systems, in general, are an iteration on well-defined functions. These functions
provide a transformation that maps one point f(x) ϵ Χ to each point x ϵ Χ. Forward
iterations of f are defined by:
f °(0)(x) = x
f °(1)(x) = f(x)
f °(2)(x) = f( f(x) )
f °(n)(x) = f( f °(n-1)(x) )
In a complete metric space (Χ,d), d can be considered a distance measure metric for
the space Χ when d has the following properties:
d(x,x) = 0, ∀ x ϵ Χ
d(x,y) ≥ 0, ∀ x,y ϵ Χ
d(x,y) = d(y,x), ∀ x,y ϵ Χ
d(x,y) ≤ d(x,z) + d(z,y), ∀ x,y,z ϵ Χ
A transformation f is a contractive transformation on the metric space (Χ,d) if the
distance measure between the output of the transformation of two points is less than
the distance between the two points before the transformation. This can be expressed
as:
d( f(x), f(y)) <= cd(x,y), 0 ≤ c < 1, ∀ x,y ϵ Χ
where c is known as the contractivity factor. A contractive function has exactly one
fixed point (attractor) xf ϵ Χ, which is the value that the iterated function outputs as
the number of iterations approaches infinity.
Table 2 lists the three different probability distributions that were tested for the four
functions:
p1 p2 p3 p4
0.2 0.35 0.35 0.1
0.25 0.25 0.25 0.25
0.35 0.2 0.1 0.35
main5.m
plotting
fern100.gif
fern5000.gif
fern10000.gif
fern20000.gif
fern100000.gif
fern500000.gif
fern1000000.gif
fern10000000.gif
fern100000000.gif
C. Results
Figure 1 – Generated fern after 100 iterations using first probability distribution in
Table 2.
Figure 2 – Generated fern after 5000 iterations using first probability distribution in
Table 2.
Figure 3 – Generated fern after 10,000 iterations using first probability distribution in
Table 2.
Figure 4 – Generated fern after 20,000 iterations using first probability distribution in
Table 2.
Figure 5 – Generated fern after 100,000 iterations using first probability distribution
in Table 2.
Figure 6 – Generated fern after 500,000 iterations using first probability distribution
in Table 2.
Figure 7 – Generated fern after 1,000,000 iterations using first probability
distribution in Table 2.
Figures 1 through 9 show the generated fern after 100 to 100,000,000 iterations of the
Algorithm RenderIFS using the first probability distribution in Table 2. We can see
that it takes many iterations until a fern shape really starts to emerge onto the output
photo---subjectively, this doesn’t occur until 500,000 iterations (Figure 6). By
100,000,000 iterations (Figure 9), the fern branches all start to really be defined and
fill out. This took approximately 5 minutes of execution to iterate 100,000,000 times.
Figure 10 – Generated fern after 100 iterations using second probability distribution
in Table 2.
Figure 11 – Generated fern after 5000 iterations using second probability distribution
in Table 2.
Figure 12 – Generated fern after 10,000 iterations using second probability
distribution in Table 2.
Figures 10 through 18 show the generated fern after 100 to 100,000,000 iterations of
the Algorithm RenderIFS using the second probability distribution (uniform
distribution) in Table 2. The image of the fern using this probability distribution is
more defined and filled in with the same amount of iterations compared to Figures 1
through 9. Specifically, after 100,000,000 iterations, the fern using the uniform
distribution is significantly more filled in and detailed than the first probability
distribution. Using the uniform distribution, the fern shape seemed to emerge with
less iterations (subjectively, starting at 100,000 iterations) than with the first
distribution (starting at 500,000 iterations).
Figure 19 – Generated fern after 100 iterations using third probability distribution in
Table 2.
Figure 20 – Generated fern after 5000 iterations using third probability distribution in
Table 2.
Figure 21 – Generated fern after 10,000 iterations using third probability distribution
in Table 2.
Figure 22 – Generated fern after 20,000 iterations using third probability distribution
in Table 2.
Figure 23 – Generated fern after 100,000 iterations using third probability
distribution in Table 2.
Figures 19 through 27 show the generated fern after 100 to 100,000,000 iterations of
the Algorithm RenderIFS using the third probability distribution (a variation on the
first probability distribution) in Table 2. Comparing to Figures 1 through 9, the
image of the fern is more defined and filled in with the same amount of iterations.
Specifically, after 100,000,000 iterations, the fern using this distribution is
significantly more filled in and detailed than the first distribution. Comparing to
Figures 10 through 18, the fern image seems to be about the same in terms of
definition. The fern shape seemed to emerge with the same number of iterations as
the uniform distribution (subjectively, starting at 100,000 iterations).
D. Conclusions