Fractals

profileJadaNelson1
Fractals.pdf

Fractals 367

© David Lippman and Melonie Rasmussen Creative Commons BY-SA

Fractals Fractals are mathematical sets, usually obtained through recursion, that exhibit interesting

dimensional properties. We’ll explore what that sentence means through the rest of the

chapter. For now, we can begin with the idea of self-similarity, a characteristic of most

fractals.

Self-similarity

A shape is self-similar when it looks essentially the same from a distance as it does

closer up.

Self-similarity can often be found in nature. In the Romanesco broccoli pictured below1, if

we zoom in on part of the image, the piece remaining looks similar to the whole.

Likewise, in the fern frond below2, one piece of the frond looks similar to the whole.

Similarly, if we zoom in on the coastline of Portugal3, each zoom reveals previously hidden

detail, and the coastline, while not identical to the view from further way, does exhibit

similar characteristics.

1 http://en.wikipedia.org/wiki/File:Cauliflower_Fractal_AVM.JPG 2 http://www.flickr.com/photos/cjewel/3261398909/ 3 Openstreetmap.org, CC-BY-SA

368

Iterated Fractals This self-similar behavior can be replicated through recursion: repeating a process over and

over.

Example 1

Suppose that we start with a filled-in triangle. We connect the midpoints of each side and

remove the middle triangle. We then repeat this process.

If we repeat this process, the shape that emerges is called the Sierpinski gasket. Notice that it

exhibits self-similarity – any piece of the gasket will look identical to the whole. In fact, we

can say that the Sierpinski gasket contains three copies of itself, each half as tall and wide as

the original. Of course, each of those copies also contains three copies of itself.

We can construct other fractals using a similar approach. To formalize this a bit, we’re going

to introduce the idea of initiators and generators.

Initiators and Generators

An initiator is a starting shape

A generator is an arranged collection of scaled copies of the initiator

Initial Step 1 Step 2

Step 3

Fractals 369

To generate fractals from initiators and generators, we follow a simple rule:

Fractal Generation Rule

At each step, replace every copy of the initiator with a scaled copy of the generator,

rotating as necessary

This process is easiest to understand through example.

Example 2

Use the initiator and generator shown to create the iterated fractal.

This tells us to, at each step, replace each line segment with the spiked shape shown in the

generator. Notice that the generator itself is made up of 4 copies of the initiator. In step 1,

the single line segment in the initiator is replaced with the generator. For step 2, each of the

four line segments of step 1 is replaced with a scaled copy of the generator:

This process is repeated to form Step 3. Again, each line segment is replaced with a scaled

copy of the generator.

Notice that since Step 0 only had 1 line segment, Step 1 only required one copy of Step 0.

Since Step 1 had 4 line segments, Step 2 required 4 copies of the generator.

Step 2 then had 16 line segments, so Step 3 required 16 copies of the generator.

Step 4, then, would require 16*4 = 64 copies of the generator.

The shape resulting from iterating this process is called the

Koch curve, named for Helge von Koch who first explored it

in 1904.

initiator generator

Step 1 Scaled copy

of generator

A scaled copy

replaces each line

segment of Step 1

Step 2

Step 2 Scaled copy

of generator Step 3

Koch curve

370

Notice that the Sierpinski gasket can also be described using the initiator-generator approach

Example 3

Use the initiator and generator below, however only iterate on the “branches.” Sketch

several steps of the iteration.

We begin by replacing the initiator with the generator. We then replace each “branch” of

Step 1 with a scaled copy of the generator to create Step 2.

We can repeat this process to create later steps. Repeating this process can create intricate

tree shapes4.

4 http://www.flickr.com/photos/visualarts/5436068969/

Initiator Generator

initiator generator

Step 1 Step 2

Step 3 Step 4 Final shape

Fractals 371

Try it Now 1

Use the initiator and generator shown to produce the next two stages

Using iteration processes like those above can create a variety of beautiful images evocative

of nature56.

More natural shapes can be created by adding in randomness to the steps.

Example 4

Create a variation on the Sierpinski gasket by randomly skewing the corner points each time

an iteration is made.

Suppose we start with the triangle below. We begin, as before, by removing the middle

triangle. We then add in some randomness.

We then repeat this process.

5 http://en.wikipedia.org/wiki/File:Fractal_tree_%28Plate_b_-_2%29.jpg 6 http://en.wikipedia.org/wiki/File:Barnsley_Fern_fractals_-_4_states.PNG

Initiator Generator

Step 0 Step 1 Step 1 with

randomnesss

372

Continuing this process can create mountain-like

structures.

The landscape to the right7 was created using fractals, then

colored and textured.

Fractal Dimension In addition to visual self-similarity, fractals exhibit other interesting properties. For example,

notice that each step of the Sierpinski gasket iteration removes one quarter of the remaining

area. If this process is continued indefinitely, we would end up essentially removing all the

area, meaning we started with a 2-dimensional area, and somehow end up with something

less than that, but seemingly more than just a 1-dimensional line.

To explore this idea, we need to discuss dimension. Something like a line is 1-dimensional;

it only has length. Any curve is 1-dimensional. Things like boxes and circles are 2-

dimensional, since they have length and width, describing an area. Objects like boxes and

cylinders have length, width, and height, describing a volume, and are 3-dimensional.

Certain rules apply for scaling objects, related to their dimension.

If I had a line with length 1, and wanted scale its length by 2, I would need two copies of the

original line. If I had a line of length 1, and wanted to scale its length by 3, I would need

three copies of the original.

7 http://en.wikipedia.org/wiki/File:FractalLandscape.jpg

Step 1 with

randomnesss

Step 2 Step 2 with

randomnesss

1-dimensional 2-dimensional 3-dimensional

1 2 3

Fractals 373

If I had a rectangle with length 2 and height 1, and wanted to scale its length and width by 2,

I would need four copies of the original rectangle. If I wanted to scale the length and width

by 3, I would need nine copies of the original rectangle.

If I had a cubical box with sides of length 1, and wanted to scale its length and width by 2, I

would need eight copies of the original cube. If I wanted to scale the length and width by 3, I

would need 27 copies of the original cube.

Notice that in the 1-dimensional case, copies needed = scale.

In the 2-dimensional case, copies needed = scale2.

In the 3-dimensional case, copies needed = scale3.

From these examples, we might infer a pattern.

Scaling-Dimension Relation

To scale a D-dimensional shape by a scaling factor S, the number of copies C of the

original shape needed will be given by:

Copies = ScaleDimension , or C = SD

Example 5

Use the scaling-dimension relation to determine the dimension of the Sierpinski gasket.

Suppose we define the original gasket to have side

length 1. The larger gasket shown is twice as wide

and twice as tall, so has been scaled by a factor of 2.

Notice that to construct the larger gasket, 3 copies of

the original gasket are needed.

Using the scaling-dimension relation C = SD, we obtain the equation 3 = 2D.

Since 21 = 2 and 22 = 4, we can immediately see that D is somewhere between 1 and 2; the

gasket is more than a 1-dimensional shape, but we’ve taken away so much area its now less

than 2-dimensional.

1

4 6 2

2 3

1 2

3 1 1 2 2

3

3

1 2

374

Solving the equation 3 = 2D requires logarithms. If you studied logarithms earlier, you may

recall how to solve this equation (if not, just skip to the box below and use that formula):

3 2D= Take the logarithm of both sides

( )log(3) log 2D= Use the exponent property of logs

( )log(3) log 2D= Divide by log(2)

( )log 3 1.585

log(2) D =  The dimension of the gasket is about 1.585

Scaling-Dimension Relation, to find Dimension

To find the dimension D of a fractal, determine the scaling factor S and the number of

copies C of the original shape needed, then use the formula

( )log

log( )

C D

S =

Try it Now 2

Determine the fractal dimension of the fractal produced using the initiator and generator

We will now turn our attention to another type of fractal, defined by a different type of

recursion. To understand this type, we are first going to need to discuss complex numbers.

Complex Numbers8 The numbers you are most familiar with are called real numbers. These include numbers

like 4, 275, -200, 10.7, ½, π, and so forth. All these real numbers can be plotted on a number

line. For example, if we wanted to show the number 3, we plot a point:

To solve certain problems like x2 = –4, it became necessary to introduce imaginary

numbers.

8 Portions of this section are remixed from Precalculus: An Investigation of Functions by David Lippman and Melonie Rasmussen. CC-BY-SA

Initiator Generator

Fractals 375

Imaginary Number i

The imaginary number i is defined to be 1i = − .

Any real multiple of i, like 5i, is also an imaginary number.

Example 6

Simplify 9− .

We can separate 9− as 9 1− . We can take the square root of 9, and write the square

root of -1 as i.

9− = 9 1 3i− =

A complex number is the sum of a real number and an imaginary number.

Complex Number

A complex number is a number z a bi= + , where a and b are real numbers

a is the real part of the complex number

b is the imaginary part of the complex number

To plot a complex number like 3 4i− , we need more than just a number line since there are

two components to the number. To plot this number, we need two number lines, crossed to

form a complex plane.

Complex Plane

In the complex plane, the horizontal axis is the

real axis and the vertical axis is the imaginary axis.

Example 7

Plot the number 3 4i− on the complex plane.

The real part of this number is 3, and the imaginary part is -4.

To plot this, we draw a point 3 units to the right of the origin in

the horizontal direction and 4 units down in the vertical

direction.

real

imaginary

real

imaginary

376

Because this is analogous to the Cartesian coordinate system for plotting points, we can think

about plotting our complex number z a bi= + as if we were plotting the point (a, b) in

Cartesian coordinates. Sometimes people write complex numbers as z x yi= + to highlight

this relation.

Arithmetic on Complex Numbers

Before we dive into the more complicated uses of complex numbers, let’s make sure we

remember the basic arithmetic involved. To add or subtract complex numbers, we simply

add the like terms, combining the real parts and combining the imaginary parts.

Example 8

Add 3 4i− and 2 5i+ .

Adding ( ) ( )3 4 2 5i i− + + , we add the real parts and the imaginary parts

3 2 4 5i i+ − +

5 i+

Try it Now 3

Subtract 2 5i+ from 3 4i−

When we add complex numbers, we can visualize the addition as a shift, or translation, of a

point in the complex plane.

Example 9

Visualize the addition 3 4i− and 1 5i− + .

The initial point is 3 4i− . When we add 1 3i− + , we add -1

to the real part, moving the point 1 units to the left, and we

add 5 to the imaginary part, moving the point 5 units

vertically. This shifts the point 3 4i− to 2 1i+

We can also multiply complex numbers by a real number, or multiply two complex numbers.

imaginary

real

3 – 4i

2 + 1i

Fractals 377

Example 10

Multiply: ( )4 2 5i+ .

To multiply the complex number by a real number, we simply distribute as we would when

multiplying polynomials.

( )4 2 5i+ Distribute

= 4 2 4 5i +  Simplify

8 20i= +

Example 11

Multiply: ( )( )2 5 4i i+ + .

( )( )2 5 4i i+ + Expand

28 20 2 5i i i= + + + Since 1i = − , 2 1i = −

( )8 20 2 5 1i i= + + + − Simplify

3 22i= +

Try it Now 4

Multiply 3 4i− and 2 3i+ .

To understand the effect of multiplication visually, we’ll explore three examples.

Example 12

Visualize the product ( )2 1 2i+

Multiplying we’d get

2 1 2 2i + 

2 4i= +

Notice both the real and imaginary parts have been

scaled by 2. Visually, this will stretch the point

outwards, away from the origin.

imaginary

real

2 +4i

1 + 2i

378

Example 13

Visualize the product ( )1 2i i+

Multiplying, we’d get

1 2i i i +  22i i= +

( )2 1i= + −

2 i= − +

In this case, the distance from the origin has not

changed, but the point has been rotated about the

origin, 90° counter-clockwise.

Example 14

Visualize the result of multiplying 1 2i+ by 1 i+ . Then show the result of multiplying by

1 i+ again.

Multiplying 1 2i+ by 1 i+ ,

( ) ( )1 2 1i i+ +

21 2 2i i i= + + +

( )1 3 2 1i= + + −

1 3i= − +

Multiplying by 1 + i again,

( )( )1 3 1i i− + +

21 3 3i i i= − − + +

( )1 2 3 1i= − + + −

4 2i= − +

If we multiplied by 1+i again, we’d get –6–2i. Plotting these numbers in the complex plane,

you may notice that each point gets both further from the origin, and rotates

counterclockwise, in this case by 45°.

In general, multiplication by a complex number can be thought of as a scaling, changing the

distance from the origin, combined with a rotation about the origin.

Complex Recursive Sequences We will now explore recursively defined sequences of complex numbers.

imaginary

real

–2 + i 1 + 2i

imaginary

real

–1+3i 1+2i

–6 – 2i

-4+2i

Fractals 379

Recursive Sequence

A recursive relationship is a formula which relates the next value, 1nz + , in a sequence

to the previous value, nz . In addition to the formula, we need an initial value,

0z .

The sequence of values produced is the recursive sequence.

Example 15

Given the recursive relationship 1 02, 4n nz z z+ = + = , generate several terms of the recursive

sequence.

We are given the starting value, 0 4z = . The recursive formula holds for any value of n, so

if n = 0, then 1 2n nz z+ = + would tell us

0 1 0 2z z+ = + , or more simply, 1 0 2z z= + .

Notice this defines 1z in terms of the known

0z , so we can compute the value:

1 0 2 4 2 6z z= + = + = .

Now letting n = 1, the formula tells us 1 1 1 2z z+ = + , or 2 1 2z z= + . Again, the formula gives

the next value in the sequence in terms of the previous value.

2 1 2 6 2 8z z= + = + =

Continuing,

3 2 2 8 2 10z z= + = + =

4 3 2 10 2 12z z= + = + =

The previous example generated a basic linear sequence of real numbers. The same process

can be used with complex numbers.

Example 16

Given the recursive relationship ( )1 01 , 4n nz z i i z+ =  + − = , generate several terms of the

recursive sequence.

We are given 0 4z = . Using the recursive formula:

( ) ( )1 0 1 4 1 1 3z z i i i i i=  + − =  + − = +

( ) ( ) ( ) ( ) ( )2

2 1 1 1 3 1 3 1 3 1 2z z i i i i i i i i i i=  + − = +  + − = + + − = − + − = −

( ) ( ) ( ) ( )3 2 1 2 1 2 1 1 3z z i i i i i i i=  + − = −  + − = − + − = −

( ) ( ) ( ) ( ) ( )2

4 3 1 1 3 1 3 1 3 1 4z z i i i i i i i i i i=  + − = −  + − = − + − = + + − =

( ) ( )5 4 1 4 1 1 3z z i i i i i=  + − =  + − = +

Notice this sequence is exhibiting an interesting pattern – it began to repeat itself.

380

Mandelbrot Set The Mandelbrot Set is a set of numbers defined based on recursive sequences

Mandelbrot Set

For any complex number c, define the sequence 2

1 0, 0n nz z c z+ = + =

If this sequence always stays close to the origin (within 2 units), then the number c is

part of the Mandelbrot Set. If the sequence gets far from the origin, then the number c

is not part of the set.

Example 17

Determine if c = 1 + i is part of the Mandelbrot set.

We start with 0 0z = . We continue, omitting some detail of the calculations 2

1 0 1 0 1 1z z i i i= + + = + + = + 2 2

2 1 1 (1 ) 1 1 3z z i i i i= + + = + + + = + 2 2

3 2 1 (1 3 ) 1 7 7z z i i i i= + + = + + + = − +

2 2

4 3 1 ( 7 7 ) 1 1 97z z i i i i= + + = − + + + = −

We can already see that these values are getting quite large. It does not appear that c = 1 + i

is part of the Mandelbrot set.

Example 18

Determine if c = 0.5i is part of the Mandelbrot set.

We start with 0 0z = . We continue, omitting some detail of the calculations 2

1 0 0.5 0 0.5 0.5z z i i i= + = + =

2 2

2 1 0.5 (0.5 ) 0.5 0.25 0.5z z i i i i= + = + = − + 2 2

3 2 0.5 ( 0.25 0.5 ) 0.5 0.1875 0.25z z i i i i= + = − + + = − + 2 2

4 3 0.5 ( 0.1875 0.25 ) 0.5 0.02734 0.40625z z i i i i= + = − + + = − +

While not definitive with this few iterations, it does appear that this value is remaining small,

suggesting that 0.5i is part of the Mandelbrot set.

Try it Now 5

Determine if c = 0.4 + 0.3i is part of the Mandelbrot set.

Fractals 381

If all complex numbers are tested, and we plot each

number that is in the Mandelbrot set on the

complex plane, we obtain the shape to the right9.

The boundary of this shape exhibits quasi-self-

similarity, in that portions look very similar to the

whole.

In addition to coloring the Mandelbrot set itself

black, it is common to the color the points in the

complex plane surrounding the set. To create a meaningful coloring, often people count the

number of iterations of the recursive sequence that are required for a point to get further than

2 units away from the origin. For example, using c = 1 + i above, the sequence was distance

2 from the origin after only two recursions.

For some other numbers, it may take tens or hundreds of iterations for the sequence to get far

from the origin. Numbers that get big fast are colored one shade, while colors that are slow

to grow are colored another shade. For example, in the image below10, light blue is used for

numbers that get large quickly, while darker shades are used for numbers that grow more

slowly. Greens, reds, and purples can be seen when we zoom in – those are used for

numbers that grow very slowly.

The Mandelbrot set, for having such a simple definition, exhibits immense complexity.

Zooming in on other portions of the set yields fascinating swirling shapes.

9 http://en.wikipedia.org/wiki/File:Mandelset_hires.png 10 This series was generated using Scott’s Mandelbrot Set Explorer

382

Try it Now Answers

1.

2.

Scaling the fractal by a factor of 3 requires 5 copies of the original. ( )log 5

1.465 log(3)

D = 

3. ( ) ( )3 4 2 5 1 9i i i− − + = −

4. Multiply ( )( ) ( )23 4 2 3 6 9 8 12 6 12 1 18i i i i i i i− + = + − − = + − − = +

5. 2

1 0 0.4 0.3 0 0.4 0.3 0.4 0.3z z i i i= + + = + + = +

2 2

2 1 0.4 0.3 (0.4 0.3 ) 0.4 0.3z z i i i= + + = + + + =

2 2

3 2 0.5 ( 0.25 0.5 ) 0.5 0.1875 0.25z z i i i i= + = − + + = − +

2 2

4 3 0.5 ( 0.1875 0.25 ) 0.5 0.02734 0.40625z z i i i i= + = − + + = − +

Additional Resources A much more extensive coverage of fractals can be found on the Fractal Geometry site. This

site includes links to several Java software programs for exploring fractals.

The Mandelbrot Explorer site, provides more details on the Mandelbrot set, including a nice

visualization of Mandelbrot sequences.

Step 2 Step 3

1 3

Fractals 383

Exercises

Iterated Fractals

Using the initiator and generator shown, draw the next two stages of the iterated fractal.

1. 2.

3. 4.

5. 6.

7. Create your own version of Sierpinski gasket with added randomness.

8. Create a version of the branching tree fractal from example #3 with added randomness.

Fractal Dimension

9. Determine the fractal dimension of the Koch curve.

10. Determine the fractal dimension of the curve generated in exercise #1

11. Determine the fractal dimension of the Sierpinski carpet generated in exercise #5

12. Determine the fractal dimension of the Cantor set generated in exercise #4

Complex Numbers

13. Plot each number in the complex plane: a) 4 b) –3i c) – 2 + 3i d) 2 + i

14. Plot each number in the complex plane: a) – 2 b) 4i c) 1 + 2i d) – 1 – i

initiator generator initiator generator

initiator generator initiator generator

initiator generator initiator generator

384

15. Compute: a) (2 + 3i) + (3 – 4i) b) (3 – 5i) – (–2 – i)

16. Compute: a) (1 – i) + (2 + 4i) b) (–2 – 3i) – (4 – 2i)

17. Multiply: a) ( )3 2 4i+ b) ( ) ( )2 1 5i i− − c) ( )( )2 4 1 3i i− +

18. Multiply: a) ( )2 1 3i− + b) ( )( )3 2 6i i− c) ( )( )1 2 5i i− +

19. Plot the number 2 3i+ . Does multiplying by 1 i− move the point closer to or further

from the origin? Does it rotate the point, and if so which direction?

20. Plot the number 2 3i+ . Does multiplying by 0.75 0.5i+ move the point closer to or

further from the origin? Does it rotate the point, and if so which direction?

Recursive Sequences

21. Given the recursive relationship 1 01, 2n nz iz z+ = + = , generate the next 3 terms of the

recursive sequence.

22. Given the recursive relationship 1 02 , 3 2n nz z i z i+ = + = − , generate the next 3 terms of

the recursive sequence.

23. Using c = –0.25, calculate the first 4 terms of the Mandelbrot sequence.

24. Using c = 1 – i, calculate the first 4 terms of the Mandelbrot sequence.

For a given value of c, the Mandelbrot sequence can be described as escaping (growing

large), a attracted (it approaches a fixed value), or periodic (it jumps between several fixed

values). A periodic cycle is typically described the number if values it jumps between; a 2-

cycle jumps between 2 values, and a 4-cycle jumps between 4 values.

For questions 25 – 30, you’ll want to use a calculator that can compute with complex

numbers, or use an online calculator which can compute a Mandelbrot sequence. For each

value of c, examine the Mandelbrot sequence and determine if the value appears to be

escaping, attracted, or periodic?

25. 0.5 0.25c i= − + . 26. 0.25 0.25c i= + .

27. 1.2c = − . 28. c i= .

29. 0.5 0.25c i= + . 30. 0.5 0.5c i= − + .

31. 0.12 0.75c i= − + . 32. 0.5 0.5c i= − + .

Fractals 385

Exploration

The Julia Set for c is another fractal, related to the Mandelbrot set. The Julia Set for c uses

the recursive sequence: 2

1 0,n nz z c z d+ = + = , where c is constant for any particular Julia

set, and d is the number being tested. A value d is part of the Julia Set for c if the sequence

does not grow large.

For example, the Julia Set for -2 would be defined by 2

1 02,n nz z z d+ = − = . We then pick

values for d, and test each to determine if it is part of the Julia Set for -2. If so, we color

black the point in the complex plane corresponding with the number d. If not, we can color

the point d based on how fast it grows, like we did with the Mandelbrot Set.

For questions 33-34, you will probably want to use the online calculator again.

33. Determine which of these numbers are in the Julia Set at 0.12 0.75c i i= − +

a) 0.25i b) 0.1 c) 0.25 0.25i+

34. Determine which of these numbers are in the Julia Set at 0.75c = −

a) 0.5i b) 1 c) 0.5 0.25i−

You can find many images online of various Julia Sets11.

35. Explain why no point with initial distance from the origin greater than 2 will be part of

the Mandelbrot sequence

11 For example, http://www.jcu.edu/math/faculty/spitz/juliaset/juliaset.htm,

386

  • Fractals
    • Iterated Fractals
    • Fractal Dimension
    • Complex Numbers
      • Arithmetic on Complex Numbers
    • Complex Recursive Sequences
    • Mandelbrot Set
    • Additional Resources
    • Exercises
      • Iterated Fractals
      • Fractal Dimension
      • Complex Numbers
      • Recursive Sequences
      • Exploration