130 likes | 275 Vues
More Fractals. Another example: the simple snowflake Discuss 2 things: what is its dimension ? how did we draw it ? Fractal can be drawn using a nonlinear map!. Snowflake dimension. We build it by taking a square and removing 4 smaller squares with 1/3 the side length
E N D
More Fractals • Another example: the simple snowflake • Discuss 2 things: • what is its dimension ? • how did we draw it ? • Fractal can be drawn using a nonlinear map!
Snowflake dimension • We build it by taking a square and removing 4 smaller squares with 1/3 the side length • Therefore we need 5 smaller squares to cover it • After k bites need 5k squares of side length 1/3k • Thus: D=ln(5)/ln(3)
Try this …Take triangle ABC Roll a die and do 1 of the following • if 1 or 2, find point midway from your current pt to A. This is your new current pt. Draw a dot there. • If 3 or 4 find point midway from your current pt to B. This is your new current pt. Draw a dot there • If 5 or 6 find point midway from your current pt to C. This is your new current pt. Draw a dot there.
Why ? • Suppose you are at (x,y) • Jump 1/2 way to A (0,0) means • x->x/2, y->y/2 • type A move • Jump 1/2 way to B (1,0) means • x->x/2+1/2, y->y/2 • type B move • Jump 1/2 way to C (1/2,1) • x->x/2+1/4, y->y/2+1/2 • type C move
Types of move • Type A moves map all pts of original triangle to region A • Type B moves map all pts of original triangle to region B • Similarly for type C moves. • But type A moves on region A map pt to region AA, move B on region A maps to region AB. • Similarly type C moves on region B produce pt in region BC etc etc
Iterate ... • If we start at a corner point every move takes us to a pt on the fractal • We never reach certain pts! • After an infinite number of moves we will have visited every point on the fractal • Dynamics is random and chaotic
Generalizations • Each point of the fractal is given by (x,y) • New points arise via a map xn+1=f(xn,yn) yn+1=g(xn,yn) • In case of Sierpinski the map is quite simple: f(x,y)=ax+by+e g(x,y)=cx+dy+f • a=b=1/2 c=d=0 and e and f vary
Nonlinear nature • If a,b,c,d,e,f were truly constant this would be linear map - no good! • Instead make nonlinear map by choosing moves at random from a fixed set. • All such fractals generated by suitable choice of sets of {a,b,c,d,e,f}
Summary of method • Suppose I have 3 different sets of {a,b,c,d,e,f} • Choose some initial (x,y) • Select 1 set at random and update x,y • Repeat very many times • If the sets are carefully chosen this will generate all pts of the fractal
Useful notation • Each set {a,b,c,d,e,f} may be labelled by an integer 0,1,2 .. • Use the notation that a[0] refers to the value of a in set 0, a[1] the value of a in set 1 etc • Thus b[3] would be the value of b in set 3 • Think of a[0], a[1], a[2] as elements of a list or array
More notation • Thus each regular fractal can be specified by giving the arrays a[],b[],c[] etc • Each update to x,y consists of choosing randomly one such set eg a[2],b[2],c[2],d[2],e[2],f[2] and computing new x,y xnew=a[2]x+b[2]y+e[2] ynew=c[2]x+d[2]y+f[2]
Sierpinski requires .. • 3 sets : • a[0]=0.5,b[0]=0,c[0]=0,d[0]=0.5 e[0]=0,f[0]=0 • a[1]=0.5,b[1]=0,c[1]=0,d[1]=0.5 e[1]=0.5,f[1]=0; • a[2]=0.5,b[2]=0,c[2]=0,d[2]=0.5 e[2]=0.25,f[2]=0.5