Fractal Isa S. Jubran – [email protected] – http://web.cortland.edu/jubrani

A is a geometric object whose dimension is fractional. Most are self similar, that is when any small part of a fractal is magnified the result resembles the original fractal. Examples of fractals are the Koch , the Seirpinski gasket, and the . Similarity Dimension: • Take a line segment of length one unit and divide it into N equal parts. let old length 1 S = new length , then N = S .

N = 3,S = 3

• Take a square (dimension 2)√ of area one square unit and divide it into N congruent parts. Then S = N and N = S2.

N = 4,S = 2

• Take a cube (dimension 3) of volume one cubic unit and divide it into N 1 3 congruent parts. Then S = N 3 and N = S .

...... N = 8,S = 2 ......

So given set of dimension d consisting of N parts congruent part then N = Sd, old length where S = new length . Solving for d yields ln N d = ln S

1 Exercise 1: T∞ = limn→∞ Tn is called the Seirpinski Triangle or Gasket.

1. What is the perimeter of Tn?

2. What is the area of Tn?

3. Compute the of T∞.

T0 T1 T2

Solution: 3 n 1. Pn = ( 2 ) P0. 3 n 2. An = ( 4 ) A0. ln3 3. N = 3 and S = 2, hence d = ln2 .

Exercise 2: C∞ = limn→∞ Cn is called the Seirpinski Carpet.

C0 C1 C2

1. What is the perimeter of Cn?

2. What is the area of Cn?

3. Compute the fractal dimension of C∞. Solution: 1 8 8n−1 1. Pn = P0 + 3 P0 + 32 P0 + ··· + 3n P0. 8 n 2. An = ( 9 ) A0. ln8 3. N = 8 and S = 3, hence d = ln3 .

2 Exercise 3: M∞ = limn→∞ Mn is called the Menger Sponge.

2

0 M0 2 M1 M2

1. What is the volume of Mn.

2. What is the surface area of Mn?

3. Compute the fractal dimension of M∞.

Solution: 3 3 1. V0 = 2 = 8 and Vn = 20 · (1/3) · (Vn−1). 2 2 2 2. A0 = 6 · 2 = 24 and An = 20 · (1/3) · (An−1) − 24 · (1/3) · (Atn−1) · 2 n−1 = (20/9) · Area(Cn−1) − (64/3) · (8/9) where Area(Cn−1) is the area of the n − 1 stage in the construction of the . Hence An = (8/9)n · 16 + (20/9)n · 8. ln20 3. N = 20 and S = 3, hence d = ln3 .

3 Exercise 4: Draw a fractal with dimension 2 .

Solution: 6 ...... ...... - ...... ?

Demonstrate the applet ”Fractal Dimension” at:

http://www.shodor.org/interactivate/activities/fracdim/index.html

3 Box Dimension: Box dimension is another way to measure fractal dimension, it is defined as follows: If X is a bounded subset of the Euclidean space, and ² ≥ 0. Let N(X, ²) be the minimal number of boxes in the grid of side length ² which are required to cover X. We say that X has box dimension D if the following limit exists and has value D.

ln(N(X, ²)) lim 1 ²→0+ ln( ² ) Consider for example the Seirpinski gasket:

6 ...... 1 ...... - 0 1

² N(X, ²) 1 1 1 2 3 1 4 9 . . . . 1 3n 2n

ln(4 · 3n) ln 3 Hence D = lim = n→∞ ln(2n) ln 2

Demonstrate the applet ” Dimension” at:

http://classes.yale.edu/fractals/Software/boxdim.html

4 Geometrically, if you plot the results on a graph with ln N(X, ²) on the vertical axis and ln(1/²) on the horizontal axis, then the slope of the best fit line of the data will be an approximation of Box dimension of the fractal.

6  (ln(4), ln(9)) ...... ...... (ln(2), ln(3))...... - (ln(1), ln(1))

Discuss computing the fractal dimension of a bunch of broccoli.

http://hypertextbook.com/facts/2002/broccoli.shtml

My Results:

1 1 Ball Size N ² ln( ² ) ln(N)

6x5x2.5 10 1/4.5 -1.504 2.303 4x4x2.5 19 1/3.5 -1.253 2.94 3.5x3x2 28 1/2.83 -1.04 3.33 3x2.5x2 41 1/2.5 -.916 3.71 2.5x2.5x2 64 1/2.33 -.847 4.158

Use the linear regression applet at http://math.hws.edu/javamath/ryan/Regression.html to plot the data points and find the slope of the best fit line.

Fractal dimension = slope = 2.62.

If you throw the 1st out you get fractal dimension=slope =2.82.

5 Divider Dimension: A has fractal (or divider) dimension D if its length L when measured with rods of length l is given by

L = C · l1−D C is a constant that is a certain measure of the apparent length, and the equation above must be true for several different values of l. Consider the Koch curve:

K2

l L 1 1 1 4 3 3 1 16 9 9 . . . . 1 4 n 3n ( 3 )

4 n 1 n It appears to have length L = ( 3 ) when measured with rods of length l = ( 3 ) . 4 1 Hence, ( )n = C · ( )n(1−D) 3 3 4 1 This implies that n ln 3 = ln(C) + n(1 − D) ln 3 . In order for the equation to be satisfied for all n, ln C must be zero, hence C = 1 ln 4 and so D = ln 3 .

Geometrically, if you graph ln(L) versus ln(l) the D = 1 − Slope of line.

Exercise: The west coast of Britain when measured with rods of length 10 km is 3020 km. But when measured with rods of length 100 km it is 1700 km. What is the fractal dimension of the west coast of Britain?

Demonstrate the applet ”Coastline of Hong Kong” at:

http://www.eie.polyu.edu.hk/∼cktse/movies/pheno/map.html

6 Affine transformations: An affine transformation is of the form à ! à ! à ! à ! x a b x e f( ) = · + y c d y f or à ! à ! à ! à ! x r cos(θ) −s sin(φ) x e f( ) = · + y r sin(θ) s cos(φ) y f

Where r and s are the scaling factors in the x and y directions respectively. θ and φ measure rotation of horizontal and vertical lines resp. e and f measure horizontal and vertical translations resp.

It can be easily shown that r2 = a2 + c2, s2 = b2 + d2, θ = arctan(c/a) and φ = arctan(−b/d).

6 b 6

c d φ  θ -  - a

? ?

6 B 6 B C...... C...... Similarity . . Affinity ...... B0 . . B0 C0...... C0...... - ...... - D A0 A D A0 A x0 = 1 x x0 = 3 x 0 12 0 41 y = 2 y y = 2 y

A reflection about the y-axis would be given by à ! −1 0 x0 = −x and y0 = y − − − − − − − matrix form 0 1

A reflection about the x-axis would be given by à ! 1 0 x0 = x and y0 = −y − − − − − − − matrix form 0 −1

7 Rotation is represented as follows:

0 B...... 6 6 ...... B ... . B C. C. . . . . 0 . 0 . . C ...... B. . . 0 ...... A ...... θ = 0 . ... θ = 45 ...... φ = 45 . ... φ = 0 ...... - ...... - D A D A x0 = x − √1 y x0 = √1 x 2 2 y0 = √1 y y0 = √1 x + y 2 2

à ! à ! cos(θ) − sin(φ) a b Matrixform : = sin(θ) cos(φ) c d

6 . 0 .B...... B ... C ...... 0 .. .. C ...... 0 ...... A ...... θ = 45 ...... φ = 45 ...... - D A x0 = √1 x − √1 y 2 2 y0 = √1 x + √1 y 2 2

8 Shears are represented as follows:

B0

6 6 ...... 0 ...... A ...... 0 ...... B ...... B .C 0 C. . . C. . . B ...... - ...... - D A D A x0 = x x0 = x + 2y y0 = 2x + y y0 = y Shear in the y direction Shear in the x direction

9 Iterated Function Systems: 2 An in R is a collection {F1,F2,...,Fn} of contraction 2 mappings on R .(Fi is a contraction mapping if given x, y then d(Fi(x),Fi(y)) ≤ sd(x, y) where 0 ≤ s < 1)

The Collage Theorem says that there is a unique nonempty compact subset A ⊂ R2 called the such that

A = F1(A) ∪ F2(A) ∪ ... ∪ Fn(A)

Sketch of Proof: Given a complete X, let H(X) be the collection of nonempty compact subsets of X. Given A and B in H(X) define d(A, B) to be the smallest number r such that each point of in A is within r of some point in B and vice versa. If X is complete so is H(X).

Given an IFS on X, define G : H(X) → H(X) by G(K) = F1(K) ∪ ... ∪ Fn(K). If each Fi is a contraction then so is G. The contraction mapping theorem says that a contraction mapping on a complete space has a unique fixed point. Hence there is A ∈ H(X) such that G(A) = A = F1(A) ∪ F2(A) ∪ ... ∪ Fn(A).

2 n Given K0 ⊂ R , let Kn = G (K0). Then sid(K ,G(K )) d(A, K ) ≤ 0 0 i 1 − s

Hence Ki is a very good approximation of A for large enough i.

Deterministic Algorithm: (Slow!) n Given K0, let Kn = G (K0). Now Kn → A.

Random Algorithm: (Fast!) Choose P0 ∈ K0 and let Pi+1 = Fj(Pi) where Fj is chosen at random from all of the Fi. Clearly Pi ∈ Ki and for sufficiently large i,Pi is arbitrarily close to some point in A.

10 Finding IFS Rules from Images of Points Given three non-collinear initial points p1 = (x1, y1), p2 = (x2, y2), p3 = (x3, y3) and three image points q1 = (u1, v1), q2 =Ã (u2!, v2), qÃ3 = (u3!, v3Ã) respectively.! Ã ! Find x a b x e an affine transformation T defined by T ( ) = · + such y c d y f that T (p1) = q1,T (p2) = q2, and T (P3) = q3. This gives the following six equations in six unknowns:

ax1 + by1 + e = u1

cx1 + dy1 + f = v1

ax2 + by2 + e = u2

cx2 + dy2 + f = v2

ax3 + by3 + e = u3

cx3 + dy3 + f = v3

...... 5, 0, 0,.5...... , 0,.5 ...... 5, 0, 0,.. 5,.5, 0 ...... 5, 0, 0,.5, 0, 0

The IFS for the Seirpinski triangle is {T1,T2,T2} where à ! à ! à ! à ! x .5 0 x 0 T ( ) = · + 1 y 0 .5 y 0 à ! à ! à ! à ! x .5 0 x .5 T ( ) = · + 2 y 0 .5 y 0 à ! à ! à ! à ! x .5 0 x 0 T ( ) = · + 3 y 0 .5 y .5

11 Example:

6 ...... 1 ...... VIVIIVIII...... 2 ...... 3 ...... IVV...... 1 ...... 3 ...... IIIIII...... - 0 ...... 2...... 1...... 0 3 3 1

The IFS for the Seirpinski carpet is {T1,T2,T3,T4,T5,T6,T7,T8} where à ! à ! à ! à ! x .333 0 x 0 T ( ) = · + 1 y 0 .333 y 0 à ! à ! à ! à ! x ..333 0 x .333 T ( ) = · + 2 y 0 .333 y 0 à ! à ! à ! à ! x .333 0 x .666 T ( ) = · + 3 y 0 .333 y 0 à ! à ! à ! à ! x .333 0 x 0 T ( ) = · + 4 y 0 .333 y .333 à ! à ! à ! à ! x .333 0 x .666 T ( ) = · + 5 y 0 .333 y .333 à ! à ! à ! à ! x .333 0 x 0 T ( ) = · + 6 y 0 .333 y .666 à ! à ! à ! à ! x .333 0 x .333 T ( ) = · + 7 y 0 .333 y .666 à ! à ! à ! à ! x .333 0 x .666 T ( ) = · + 8 y 0 .333 y .666

12 Example:

6 ...... , ...... 20) ...... (15,...... 20)(5 ...... 5, −.5, 5,.5...,.5, 5 ...... 5,.5, 5... , −.5,.5, 15 ...... (5, ...... 15) ...... (15, ...... 15) ...... (0, 5) . . . . . (20, 15) ...... (10,.10) ...... −10 < x < 30 ...... 0 < y < 40 ...... T runk 0, 0,.10, 0,.333, 0 ...... - (10, 0)

The IFS for the tree is {T1,T2,T2} where à ! à ! à ! à ! x .5 .5 x 5 T ( ) = · + 1 y −.5 .5 y 15 à ! à ! à ! à ! x .5 −.5 x 5 T ( ) = · + 2 y .5 .5 y 5 à ! à ! à ! à ! x 0 0 x 10 T ( ) = · + 3 y 0 .333 y 0

Download and experiment with the freeware ”IFS Construction Kit” which can be used to design and draw fractals based on iterated function systems. You can find it at:

http://ecademy.agnesscott.edu/∼lriddle/ifskit/

• Discuss the IFS for the Fern. • Discuss the IFS for the Tree. • Discuss the IFS for the mountain range. • Discuss the IFS for the Wave.

13 Mandelbrot and Julia Sets: 2 Consider the complex function Fc(z) = z + c. Given an initial point z0 define its 2 orbit under Fc to be z0, z1, z2,... where zn+1 = zn + c. Define the escape set, Ec, and the prisoner set, Pc, for for the parameter c to be:

Ec = {z0 : |zn| → ∞ as n → ∞}, and

Ec = {z0|z0 ∈/ Ec}

Now the for the parameter c, Jc, is the boundary of the escape set Ec.

2 iθ 2 2iθ For example, if c = 0 then Fc(z) = z . Now if z = re then F (z) = r e .

|z0| θ |z0| θ |z0| θ z .8 15 1 15 1.5 15 z2 .64 30 1 30 2.25 30 z4 .4096 60 1 60 5.0625 60 z8 .1678 120 1 120 25.629 120 z16 .0281 240 1 240 656.84 240 z32 .0008 120 1 120 431439.88 120

6 6 z3 z2 z2 z1 z1 z z z0  3 0-  - z4

z4

? ? |z0| < 1 |z0| = 1

Hence Ec = {z : |z| > 1}, Pc = {z : |z| ≤ 1}, and therefore J0 is the unit circle.

14 The Julia set is either connected (one piece) or totally disconnected(dust).

Now we define the to be

M = {c ∈ C : Jc is connected}

Experiment with the Java applet ”Mandelbrot and Julia Sets” at:

http://classes.yale.edu/fractals/

Download ”winfeed” at the address below and use it to plot the Julia sets for the constants c = −.5 + .5i, c = −.7454285 + 0.1130089i, and others.

http://math.exeter.edu/rparris/winfeed.html

15