Professional Documents
Culture Documents
Unit 5 Fractals: Fractals and Self-Similarity
Unit 5 Fractals: Fractals and Self-Similarity
FRACTALS
Fractals and Self-Similarity
Fractals Types
Fractals can also be classified according to their Self-Similarity. There are three types of Self-
Similarity found in fractals
Exactly Self-Similarity
Quasi Self-Similarity
Statistically Self-Similarity
Exactly Self-Similarity
Fractals defined by iterated function system (IFS) often display exact self-similarity.
Quasi self-similarity
This fractal approximates the same pattern at different scales; may contain small copies of the
entire fractal in distorted and degenerate forms; e.g., the Mandelbrot set, Julia set.
Statistical self-similarity
This fractal repeats a pattern stochastically. So numerical or statistical measures are preserved
across scales; e.g., randomly generated fractals like mountain, clouds, seashore etc.
Fractal Dimension
N=rD
Take the log on both sides and get log(N) = D log(r).
D = log (N)/log(r)
Sierpinski Triangle
It can be generated by infinitely repeating a procedure of connecting the midpoints of each side
of the triangle to form four separate triangles, and cutting out the triangle in the center.
S0 :
Initiator - S0
Step 2 - Connect the midpoints of each side of the triangle to form four separate triangles.
S1 :
S2 :
Generator : S1 & S2
Step 4 - Repeat the steps 2 and 3 on the three black triangles left behind
S3 :
Step 5 - Further repetition with adequate screen resolution will give the following pattern.
= log(3)/log(2)
= 1.585
do {
Draw a dot at P;
Set P= newPt;
} while(!bored);
Koch Curve
The Koch curve is generated by a simple geometric procedure which can be iterated an infinite
number of times by dividing a straight line into three equal parts and substituting the
intermediate part with two segments of the same length (like Triangular bump)
Construction of Koch curve
Ko : Initiator
2. The straight line is divided into 3 equal parts, and the middle part is replaced by two linear
segments at angles 60º and 120º be K1 the Generator
K1 : Generator
K1 :
N= 4 segments
Subdivide each segment of Kn into three equal parts and replace the middle part with a bump
in the shape of an equilateral triangle.
Pseudocode to draw Kn
if (n equals 0)
draw straight line
else
{
Draw Kn-1
turn left 60 degree
Draw Kn-1
turn right 120 degree
Draw Kn-1
turn left 60 degree
Draw Kn-1
}
OpenGL Code
Space-filling fractal
There is a type of fractals continuously attempts to fill in the empty area without any holes as it
goes along its iteration. We call them space-filling fractals.
Peano Curve
Hilbert Curve
Hilbert Curve which fill up a square plane, the Peano Curve fills up a plane in rhombus
shape.
Po : Initiator
2. Divide the line segment into 9 segment in two dimension be P1 the Generator
P1 : Generator
3. As the segments are replicated at higher and higher levels, the curve's "plane" filling
properties become increasingly apparent
P2 to Pn :
=2
Hilbert Curve
The basic principle behind the Hilbert curve is slightly different from the constructions of exact
replacements. Instead of using a single standard shape to replace every line segment on every
continuing level, the Hilbert curve applies various shapes or “rules” to different segments. The
Hilbert curve forms an elegant construction of patterns whose lines do not overlap. Also, since
the standard Hilbert curve fills a plane, its dimension is 2.
The basic elements of the Hilbert curves are
Cups – (a square with one open side)
The open side of a cup can be top, bottom, left or right
Every cup has two end-points
Joins - (a vector that joins two cups)
A join has a direction : up, down, left or right
Construction of Hilbert curve
1. Start with the basic staple-like shape. Single cup which filles a 2 X 2 space.
Ho : Initiator
2. Replaces that cup by four smaller cups, which are linked together by three joins.
Shrink the previous curve to half its size. Simultaneously, decrease the grid size by
the factor of two.
Place four copies of the curve on the grid. The lower two must be placed directly as they
are.
The upper two must be rotated a quarter turn - one left, another right.
Lastly, connect the four pieces with short straight segments to obtain the next step curve.
Sometimes the connecting segments are horizontal, and sometimes they are vertical
H1: Generator
Cup division rules
3.All the rest of the curves are created sequentially one from another using the same algorithm.
Fractal is the term associated with randomly generated curves and surfaces that
exhibit a degree of self-similarity. These curves are used to provide “naturalistic” shapes for
representing objects such as coastlines, rugged mountains, grass and fire.
Random fractal is generated by stochastic rather than deterministic processes. It can be generated
by modifying the iteration process of the last section to include a probabilistic element.
Fractalizing a Segment
For a fractal curve, point C is randomly chosen along the perpendicular bisector L of S.
The elbow lies randomly on one or the other side of the “parent” segment AB.
In the second stage , each of the two segment AC and BC has its midpoints perturbed to form
points D and E.
In the third ,AD, DC, CE and EB has its the new points F, G, H and I.
Parametric Form
C(t) = M + (B-A) t