The word
The word FractalFractal has been derived from has been derived from the Latin word
the Latin word fractusfractus meaning
meaning
broken, uneven: broken, uneven:
any of various extremely irregular curves or shapes
any of various extremely irregular curves or shapes
that
that repeat themselves at any scalerepeat themselves at any scale on which they on which they are examined.
are examined.
(1)
(1) A certain self-similarity A certain self-similarity between the object parts between the object parts and the overall features of the object.
and the overall features of the object. A fractal object has
A fractal object has two basic characteristicstwo basic characteristics: :
(2)
Discovered in 1904 by Helge von Koch
Start with straight line of length 1 Recursively:
– Divide line into 3 equal parts
– Replace middle section with triangular bump with sides of length 1/3
Can form Koch snowflake by joining three Koch curves
Perimeter of snowflake grows as: Pi = 3(4/3)i
where Pi is the perimeter of the ith snowflake iteration
However, area grows slowly and S = 8/5 S0 !!
Self-similar:
– zoom in on any portion
Pseudo code, to draw Kn:
If (n equals 0) draw straight line Else{
Draw Kn-1
Turn left 60° Draw Kn-1
Turn right 120° Draw Kn-1
Turn left 60° Draw Kn-1
Clouds
Grass
Fire
Mountains (terrain)
Coastline
Self-similar Fractals Self-similar Fractals
Parts are scaled down versions of the entire object. Parts are scaled down versions of the entire object.
Known as
Known as Statistically Self-similarStatistically Self-similar if random if random variations are applied.
variations are applied.
Invariant Fractal Sets Invariant Fractal Sets
They are formed with nonlinear transformations. They are formed with nonlinear transformations. Includes
Includes self-squaring fractals self-squaring fractals (eg. Mandelbrot set), (eg. Mandelbrot set),
self-inverse fractals
Fractal Dimension
Fractal Dimension is the measure of the is the measure of the roughness or fragmentation of fractal objects. roughness or fragmentation of fractal objects.
This dimension is
This dimension is not necessarily an integernot necessarily an integer..
To calculate this dimension we need to To calculate this dimension we need to understand how the
understand how the Euclidean DimensionEuclidean Dimension of an of an object is calculated.
object is calculated. Sometimes referred to as
4 = 41
16 = 42
64 = 43
So, we may write,
N = S D
N = number of small
pieces that go into the larger one.
S = scale to which
smaller pieces compare to the larger one.
D = dimension
So, Fractal Dimension,
Fractal Dimension of Koch Curve Fractal Dimension of Koch Curve
N = 4
Fractal Dimension of Menger Sponge Fractal Dimension of Menger Sponge
N = 20
S = 3
N = 2
S = √2
D = 2 (Peano Curve)
This is a widely used method of explaining the use This is a widely used method of explaining the use
of fractals. of fractals.
The coastline is self-similar. The coastline is self-similar.
Therefore as we decrease the size of the measuring Therefore as we decrease the size of the measuring device the length of the coastline increases without device the length of the coastline increases without
limit. limit.
L-Systems
– Draw complex curves based on a simple set of rules
– Operations • ‘F’ – Forward
• ‘+’ – turn (A)(right turn A degrees) • ‘–’ – turn (-A) (left turn A degrees)
Koch Curve
– Rule: ‘F’ -> “F-F++F-F”
Koch Curve
– S2: F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F
Iterated Function System (IFS)
– Recursively call a function
– Converge to an image
Allow to draw branchlike figures
– ‘[‘ : Save the current state – ‘]’ : Return to the state
Based on Iteration theory Function of interest:
ƒ(z) = (z)2 + c
Sequence of values or orbits:
d1 = (s)2 + c
d2 = ((s)2 + c)2 + c
d3 = (((s)2 + c)2 + c)2 + c
Orbit depends on s and c
Basic question,:
For given s and c,
– does function stay finite? (within Mandelbrot set)
For c=0, s=1, then 1,1,1,1,1 what about s=½, Definition: if |s| < 1, orbit is finite else infinite Examples orbits:
– s = 0, c = -1, orbit = 0,-1,0,-1,0,-1,0,-1,…..finite
– s = 0, c = 1, orbit = 0,1,2,5,26,677…… explodes
Mandelbrot set: use complex numbers for c and s Always set s = 0
Choose c as a complex number For example:
– s = 0, c = 0.2 + 0.5i Hence, orbit:
Definition: Mandelbrot set includes all finite
orbit
c
Some complex number math:
i * i = -1
Modulus of a complex number, z = ai + b:
|z| = √(a
2+b
2)
Squaring a complex number:
Fixed points:
Some complex numbers
converge to certain values after
x
iterations.
Example:
– s = 0, c = -0.2 + 0.5i converges to –0.249227 + 0.333677i after 80 iterations
– Experiment: square –0.249227 + 0.333677i and
add -0.2 + 0.5i
Mandelbrot set depends on the fact the
convergence of certain complex numbers
Routine to draw Mandelbrot set:
– Cannot iterate forever: our program will hang! – Instead iterate 100 times
– Math theorem:
• if number |dk| ever exceeds the value 2, then the orbit will definitely explode at some point
• DWELL– no. iteration required to exceed 2
Routine returns:
– Number of times iterated before value exceeds 2, or
Mandelbrot dwell( ) function (pg. 510)
int dwell (double cx, double cy)
{ // return true dwell or Num, whichever is smaller #define Num 100 // increase this for better pics double tmp, dx = cx, dy = cy, fsq = cx*cx + cy*cy;
for(int count = 0;count <= Num && fsq <= 4; count++) {
tmp = dx; // save old real part
dx = dx*dx – dy*dy + cx; // new real part dy = 2.0 * tmp * dy + cy; // new imag. Part fsq = dx*dx + dy*dy;
}
Julia Set (J
Julia Set (Jcc)) uses the same iterative equation: uses the same iterative equation:
Based on the value of
Based on the value of zz00 different sets are obtained. different sets are obtained.
ƒ(z) = (z)2 + c
But, here,
But, here, cc is a fixed constant complex number. is a fixed constant complex number.
The
The Filled-in Julia set Filled-in Julia set at c, Kat c, Kc, c, is the set of all is the set of all starting points whose orbits are finite.
starting points whose orbits are finite. J
Orbit of S: s, f(s), f
2(s), f
3(s)…………
The point “just before” s in the sequence is
called the
preimage
of s.
– Two preimages of z are given by ±√(z-c)
The collection of all preimages of any point
in J
cis dense in J
c.
Using Mid-point Displacement Using Mid-point Displacement
A
A Roughness FunctionRoughness Function controls the speed at which controls the speed at which the maximum change value decreases.
the maximum change value decreases. Start with two points.
Start with two points.
Average the two points to get the mid-point. Average the two points to get the mid-point. Then increase or decrease the mid-point by a Then increase or decrease the mid-point by a
certain value. certain value.
Recursively apply this process to both sides of the Recursively apply this process to both sides of the
mid-point. mid-point.
At each level of recursion the maximum amount a At each level of recursion the maximum amount a