Fractal REU Spring 2007

advertisement
Fractal REU Spring 2007
I. Carl Tams: Introduction
II. Masaki Iino: Fractal Theory
III. Eric Heisler: Continuous Dependence on Parameters
IV. Bill Clark: IFS Random Trees
V. Jordan Judkins: Biological Applications
VI. Greg Danner: CS Applications
VII. Eric Heisler: Music
Graduate Assistant: Liz Copene
Supervised By Elena Cherkaev
Fractals
Fractals
• What are they?
Pictures
Definition
• A fractal is a geometric figure that can be
subdivided in parts,
–
–
–
–
self similar
small parts
crazy Euclidean behavior
generated by Iterated Function Systems (IFS)
Fractals in life
• Nature
– clouds, mountain ranges, lightning bolts, coastlines, trees, leaves,
rivers, mountains, cauliflower, broccoli, blood vessels, pulmonary
vessels, and snow flakes
• Man made fractals
– roads
– circuits
Analyzing fractals
• Fractal Dimension
• Hausdorff Dimension
• Self Similar Dimension
• Box Dimension
• Iterated Function Systems
History
• 1872-Karl Weierstrass
• 1904-Helge von Koch
– Koch snowflake
Sierpinski
• 1915-Waclaw Sierpinski-constructed his
triangle and, one year later, his carpet
Julia Set
• Studied fractals without
computers
–
–
–
–
Henri Poincaré
Felix Klein
Pierre Fatou
Gaston Julia
Mandelbrot
• 1975-Mandelbrot-illustrated fractals with a computer
• -These images lead to the popular meaning of the term
"fractal".
Basic Fractal Theory
Masaki Iino
Department of Mathematics
University of Utah
REU Symposium --- April, 2007
Metric Space


Def: A metric space (X, d) is a space X
together with a real-valued fcn d:X x X -> R
which measures the distance bet. pairs of pts
x and y∈X.
A metric space is considered as complete if
every Cauchy seq. has a limit Xn->x for some
x in X.
Fractal Space


Given a metric space (X,d), we define another
metric space (H(X),h(d)). H(X) is the set of all
nonempty compact subsets of X, and h(d) is the
Hausdorff distance between two subsets of H(X).
Fractals reside on this space.
Def: Hausdorff distance btw. subsets A and B in
H(X): H (A, B) = max { h (A, B), h (B, A) } where
Example of Hausdorff Distance

Take two point sets A {a1,a2,a3} and B{b1,b2,b3}
as seen in the picture below. What’s h(A,B)?
The Methods of Generating Fractals



Escape-time fractals — These are defined by a
recurrence relation at each point in a space.
Examples of this type are the Mandelbrot set, Julia
set.
Iterated function systems — These have a fixed
geometric replacement rule. Cantor set, Sierpinski
carpet, Sierpinski gasket, Peano curve, Koch
snowflake, Menger sponge, are some examples of
such fractals.
Random fractals — Generated by stochastic rather
than deterministic processes, for example,
trajectories of the Brownian motion, fractal
landscapes and the Brownian tree.
Iterated Function Systems (IFSs)



Def:: An (hyperbolic) iterated function system is a
metric space (X,d) together with a finite set of
contraction mappings on that space. The notation used
for such an IFS is:
where each Wn is a contraction map and its
contractivity factor is
A fractal is made of the union of copies of itself. Each
copy is transformed (i.e. scaled, rotated, sheared,
reflected) by a fcn. And the fractal is the fixed attractor
of an IFS.
A transformation can be nonlinear (i.e. polynomial
transformation)
2D IFSs and Levy’s Dragon
2D IFSs are
expressed as:
w(x)=Ax+t where A is a
2x2 real matrix and t is a
column vector.

As an example of 2D
IFS, we introduce the
Levy’s Dragon. The right
pic shows the 1st to 4th
iteration.

Continuation of Levy's Dragon


Visually,
The Pic of the Levy’s Dragon
Fractals as Sets of Attractors of IFSs


Since the fractal is the fixed attractor of an IFS, we
need a theorem for that: Fixed Point Theorem (or
Contraction Mapping Theorem). This guarantees the
existence and uniqueness of fixed points of some
self-maps in metric space, and provides a way to
find the fixed pts.
Def. (Contraction Map): φ: X->X on a metric space
is called a contraction map if there exists a positive
constant s < 1 such that d(φ(x),φ(y)) ≤ s*d(x, y)
for all x, y ∈X
Fixed Point Theorem


Let (X,d) be a complete metric space. If φ : X →X is
a contraction, then φ has a unique fixed point.
Remark: This is required to define a deterministic
fractal which is a fixed point of a contractive map on
a complete metric space.
3D IFSs and 3D Fern


Instead of a 2x2 real matrix A and a column vector
t (*,*), we have a 3x3 real matrix A and a column
vector t (*,*,*) for a 3D IFS. Again, it can be
expressed as w(x)= Ax+t.
As an example of 3D, we introduce a 3D Fern, which
is the attractor of an IFS of affine maps in 3D.
3D Fern

This is an IFS for the 3D
Fern
[ ] [ ][ ] [ ]
][ ] [ ]
[ ][
[ ] [ ][ ] [ ]
[ ] [ ][ ] [ ]
x1
0 0 0
w1 x 2 = 0 0.18 0
0 0 0
x3
x1
x2
x3
0
0
0
x1
0.85
0
0
w 2 x2 = 0
0.85 0.1
0 − 0.1 0.85
x3
x1
0.2 0.2 0
w 3 x 2 = 0.2 0.2 0
0
0 0.3
x3
x1
− 0.2 0.2 0
w 4 x 2 = 0.2 0.2 0
0
0 0.3
x3
x1
x2
x3
x1
x2
x3
x1
x2
x3
0
1.6
0
0
0.8
0
0
0.8
0
Recommended Books
1. Michael Bransley: “Fractals Everywhere” (Introductory
Level)
2. Masaya Yamaguchi et al: “Mathematics of Fractals”
(Advanced Level)
Properties of IFS fractals
Eric Heisler
Fractal Dimension
The easiest way to characterize a fractal
box dimension:
log( N )
D  lim
e 0
log 1
 e
e
Some 3D IFS fractals
• Menger sponge
log( 20)
D
 2.73
log 3
0   0 
1 / 3 0
w1 ( x)   0 1 / 3 0  x   0 
 0
0 1 / 3 2 / 3
Another one
• Sierpinski pyramid
log( 5)
D
 2.32
log 2
Self similar fractals
Looks the same no matter
how close you get.
A smaller copy of the fern
A copy within the copy
Parameters
• The picture changes continuously as you
change the parameters.
0  2 / 3
1 / 3 0
w1 ( x)   0 1 / 3 0  x   0 
 0
0 1 / 3  0 
• An applet that shows this
Random Tree Fractals
By Bill Clark
Transformations
 cos 
w1 (v )  
 sin 
 sin     x1 
v 

cos    y1 
(x1,y1)
Each Iteration takes a line segment and
creates two branches to replace it.
Random Verses Non-Random
Trees
%Random Tree!
%----------------------------MAIN----FUNCTION----------------------------function[]=random_tree(r,theta,iterations,exponent)
%here is the original branch in the form of 2 points (x1,y1,x2,y2)
l=[0,0,0,1];
x=l;
h(1) = plot(l(1:2),l(3:4),'Color',[0.58 0.39 0.39],'Linewidth',1);
hold on
count = 2;
for i=1:iterations
n=ceil((rand(1)^exponent)*size(x,1));
l=x(n,:);
[L1,L2]=expand(l,r,theta); %this will send the segment for expansion
%replace the plotted line with two new lines
x(n,:)=[];
x(end+1,:)=L1;
x(end+1,:)=L2;
%plot here
h(count)=plot([L1(1),L1(3)],[L1(2),L1(4)],'Color',[0.58 0.39 0.39],'Linewidth',1);
count = count+1;
h(count)=plot([L2(1),L2(3)],[L2(2),L2(4)],'Color',[0.58 0.39 0.39],'Linewidth',1);
count = count+1;
drawnow
end;
hold off
%----------------------------Calculation----FUNCTION----------------------------function [L1,L2]=expand(l,r,theta)
t=[l(3);l(4)];
v=[l(1),l(3);l(2),l(4)];
%here are the two transformations
A1=r*[cos(theta) , -sin(theta) ; sin(theta) , cos(theta)];
A2=r*[cos(theta) , sin(theta) ; -sin(theta) , cos(theta)];
% Calculate the two new lines
L1=A1*(v(:,2)-v(:,1))+t;
L2=A2*(v(:,2)-v(:,1))+t;
L1=[t(1),t(2),L1(1),L1(2)];
L2=[t(1),t(2),L2(1),L2(2)];
Large Angles verses Smaller
Angles
Various 3D Objects
Fractals
In the human body
Natural Fractals in the Body

SYSTEMS




Respiratory
Lymphatic
Nervous
Circulatory
(Mandelbrot 1982)
Benefits of fractals





Increase the Surface Area for absorption
and transfer
Self-similar (easily constructed)
“Packing efficiency” (lungs , small intestines
etc)
Decrease speed of fluids or air
Minimize material used to form structures
Blood Vessels and Bile Ducts

Branches enhance surface area aiding in
distribution and collection.
Lungs
Surface area130 meters^2=5-6 liters
Branching airway of the Lungs






Esophagus
Trachea
Primary Bronchi
Smaller Bronchi
Bronchioles
Alveoli
(Porra 2006)
Splitting of Air

As air is split by the process mentioned above into
the Alveoli. The splitting of air occurs on order for
rapid diffusion of the gases.
(Porra 2006)
Different proposed lung models

Length=L1= 2n× D


2n =# of branches
Material used=SA × ar × L

2 × P × r02 × a × L
 r= radius of airway
 ar= width of wall of airway
Model 2

L2=D/2+(2n-1) × D)
 2n=# of end branches

Material used=SA x ar x L

2 × P × a(r02 × D/2+ r12 × D/2 × 2n)
 r= radius of airway
 r1= 2-n r0
 ar= width of wall of airway
D
2
Model 3

L3= D/2+(2)D/4+(2n × D/4)
 2n =# of end branches

Material used=SA x ar x L

2 × P × a(r02 × D/2+ 2(r12 × D/4) + r22 ×
D/4 × 2n)
 r= radius of airway
 r2= 2-n r0
 ar= width of wall of airway
Model n

Ln= D/2+(2)D/4+((4)D/8)…(2n-1 ×
D)/ 2n
 2n =# of end branches
 S 2n-1/(2n) i=1…n

Material used=SA x ar x L

2 × P × a(r02 × D/2+ 2(r12 × D/4) + 4(r22
× D/8)+… 2n (rn2 × D/(2n-1))
 r1,r2,r3..rn= changing radius of
airway
 ar= width of wall of airway
Results for models

Model 1





L1= 320
M1Z 8042a
Model 2

(D=10, r0=2, n=5)
L2= 165
M2Z129.591a
Model 3
 L3= 90


M3Z125.788a
Model n
 Ln= 25.1563

MnZ125.786a
Speed of the entering air

Mauroy 2006
V=(d12v1+d22v2)/
(d13+d23)2/3
Diffusion of Air (Porra 2006)

Air speed must equal
the speed of diffusion
for air intake to be
optimized.
n model proves to be the best




Minimize material used
Fractal dimension is higher (space filling)
Security (if failure occurs minimizes effect)
Slowing down the air when breathing
Artificial organs: The reason to study
References

1. Dissecting Fractals in Nature. http://fractal.org/Fractal-Research-

and-Products/Dissecting-fractals.htm
2. Frame, Michael, Benoit Mandelbrot, and Nial Neger. Fractal
Geometry.Yale University. March 6, 2007.
http://classes.yale.edu/Fractals/


3. Fung, Y.C., G.S. Kassab, and Z.L. Jiang. Diameter-defined
Strahler system and connectivity matrix of the pulmonary arterial
tree. University of California-San Diego. 1994.
4. Goldberger, Ary. Nonlinear dynamic, fractals,and chaos. March 5,
2007. http://www.anatomiafractal.com/article_fractal_anatomy.htm

5. Losa, Gabriela, Danilo Merlini, Theo F. Nonnenmacher, and
Edwald Weibul. Fractals in Biology and Medicine. Springer. Verlag.
vol 4. 2005. pp 17-29.
References






6. Mandelbrot, B.B, (1982) The Fractal Geometry of Nature. W.H
Freeman and Company. ISBN 0-7167-1186-9
7. Mandelbrot, B.B, (1982) The Fractal Geometry of Nature. W.H
Freeman and Company. ISBN 0-7167-1186-9
8. Mauroy, Benjamin and Nicolas Meunier. A mechanical model of
the human lung. Paris, France. November 2006.
9. Porra, Liisa. Lung structure and function studied by Synchotron
Radiation. Report series of Physics. University of Helsinki. Helsinki.
2006. Accessed March 31, 2007.
10. E.R.WEIBEL. Morphometry of the human lung, Springer Verlag,
1963.
11.Xia, Quiglan. Ramified structures in optimal transportation.
University of Texas at Austin. Jan 03, 2005.
L-Systems
Gregory Danner
REU Symposium 2007
Formal Grammars


Mathematically speaking, a formal grammar
G is a 4-tuple of the form G=(T, N, P, S),
where T is a set of terminal symbols, N is a
set of non-terminal symbols, P is a set of
production rules, and S is an element of N.
Production rules are of the form:
(T U N)*->(T U N)*
L-Systems



Were developed by a Hungarian botanist, Aristid
Lindenmayer, to model plant growth.
On the most basic level, an L-system is a formal
grammar, often with parameters to allow for
environmental influence (like the effects of a
plant growing next to a wall or near to light)
Since context-sensitive grammars are Turing
complete, they have a very great amount of
expressive power.
What I Did


I wrote a simple parser to render context-free
grammars in 2D. Quite a few 2D L-systems
have important applications – the Sierpinski
Curve is used
find
solutions to
Theto
USS
Makeapproximate
Shit Up Lyrics
the Traveling Salesman Problem, and the
Hilbert Curve is used to preserve locality
when mapping a 2D space on to a 1D line.
Here are a few examples:
A Quick Example

Let’s build the Sierpinski Triangle, L-System
style. The L-System for the Triangle is
Axiom: A
Rules:
A -> B-A-B
B -> A+B+A
Where A and B both represent drawing one unit
forward, + represents rotating 60⁰ to the right
and – represents rotating 60⁰ to the left
A Quick Example

The first step is
easy – it’s just the
axiom, A, which is
drawing one unit
forward
A Quick Example

Now we apply a
rule. We replace
A with B-A-B.
A Quick Example

In the next step,
there are two B’s
and one A. Each
B is replaced by
A+B+A, and the A
is replaced by BA-B, yielding:
A+B+A-B-A-BA+B+A
A Quick Example

If you continue, the
structure begins to
look more and
more like the
famous triangle
A few (quicker) examples…
Sierpinski
Curve
Koch
Snowflake
Tetrahedron
Curve
ConstantBranch Tree
Fractals in Music
Eric Heisler
Application to art
• We know how to find the fractal dimension
of various things.
– Paintings
– Organs
– Clouds
• Why not music?
To visualize music
• Make a frequency vs. time plot
– Cut the music into short intervals.
– Find the frequency spectrum using a Fourier
transform.
– Set a threshold for black and white.
– Put them all together to build a picture!
time
freq.
freq.
A picture of music
Different types of music
Then measure their fractal dimensions.
The dimensions
• Simple music:
d = 1.21
• Complex music:
d = 1.36
Compare fractal dimension
Why?
• Could be a measure of complexity.
• Perhaps different types of music have
characteristic dimensions.
• It’s just interesting!
Download