ITERATION ALGORITHM TO CREATE FRACTALS UNIVERSITY OF MARYLAND - - PowerPoint PPT Presentation

iteration algorithm
SMART_READER_LITE
LIVE PREVIEW

ITERATION ALGORITHM TO CREATE FRACTALS UNIVERSITY OF MARYLAND - - PowerPoint PPT Presentation

USING THE RANDOM ITERATION ALGORITHM TO CREATE FRACTALS UNIVERSITY OF MARYLAND DIRECTED READING PROGRAM FALL 2015 BY ADAM ANDERSON THE SIERPINSKI GASKET 2 Stage 1: Stage 0: Stage 2: Stage n: 2 2 2 1 3 1 2 A 0 = 2 3 3 2 A n


slide-1
SLIDE 1

USING THE RANDOM ITERATION ALGORITHM TO CREATE FRACTALS

BY ADAM ANDERSON UNIVERSITY OF MARYLAND DIRECTED READING PROGRAM FALL 2015

slide-2
SLIDE 2
slide-3
SLIDE 3

THE SIERPINSKI GASKET

Stage 0: A0 =

1 2

2

2

A0 =1 Stage 1: A1 = 1 −

1 2 2 2 2

= 1 −

1 4

A1 =

3 4

2 Stage 2: A2 =

3 4 − 3 2 2 4 2

=

3 4 − 3 16 = 9 16

A2 =

3 4 2

Stage n: An =

3 4 𝑜

lim

𝑜→∞ 3 4 𝑜

= 0 Sierpinski Gasket has zero area?

slide-4
SLIDE 4

CAPACITY DIMENSION AND FRACTALS

Let S ⊆ ℝ𝑜 where n = 1, 2, or 3 n-dimensional box

  • n = 1: Closed interval
  • n = 2: Square
  • n = 3: Cube

Let N(ε) = smallest number of n-dimensional boxes of side length ε necessary to cover S

y x z

slide-5
SLIDE 5

CAPACITY DIMENSION AND FRACTALS

n = 1

Boxes of length ε to cover line

  • f length L:

Length = L ε

If L = 10cm and ε = 1cm, it takes 10 boxes to cover L If ε = 0.5cm, it takes 20 boxes to cover L … N(ε) ∝

1

ε

slide-6
SLIDE 6

CAPACITY DIMENSION AND FRACTALS

n = 2

Boxes of length ε to cover square S of side length L

ε

If L = 20cm, area of S = 400cm2

  • ε = 2cm: each box has area 4cm2

It will take 100 boxes to cover S

  • ε = 1cm: each box has area 1cm2

It will take 400 boxes to cover S N(ε) ∝

1

ε2

slide-7
SLIDE 7

CAPACITY DIMENSION AND FRACTALS

N(ε) = 𝐷

1 𝜁 𝐸

ln (N(ε)) = D ln

1 𝜁 + ln(𝐷)

D =

ln 𝑂 𝜁 −ln 𝐷 ln 1

𝜁

C just depends on scaling of S Capacity Dimension: dimcS = lim

𝜁→0+ ln 𝑂 𝜁 ln 1

𝜁

slide-8
SLIDE 8

CAPACITY DIMENSION AND FRACTALS

Stage 1: If ε =

1 2 , N 𝜁 = 3

1

lim

𝜁→0+ ln 𝑂 𝜁 ln 1

𝜁

= lim

𝜁→0+ ln 3𝑜 ln 2𝑜 = 𝑜 ln 3 𝑜 ln 2 = ln 3 ln 2 ≈ 1.5849625

ε =

1 2

Stage 2: If ε =

1 4 , N 𝜁 = 9

Stage n: If ε =

1 2𝑜 , N 𝜁 = 3𝑜 1 𝜁 = 2𝑜

slide-9
SLIDE 9

The Sierpinski Gasket is ≈ 1.585 dimensional A set with non-integer capacity dimension is called a fractal.

slide-10
SLIDE 10

ITERATED FUNCTION SYSTEMS

An Iterated Function System (IFS) F is the union of the contractions T1, T2 … Tn THEOREM: Let F be an iterated function system of contractions in ℝ2. Then there exists a unique compact subset 𝐵F in ℝ2 such that for any compact set B, the sequence of iterates 𝐺𝑜 𝐶

𝑜=1 ∞

converges in the Hausdorff metric to 𝐵F 𝐵F is called the attractor of F. This means that if we iterate any compact set in ℝ2 under F, we will

  • btain a unique attractor (attractor depends on the contractions in F)
slide-11
SLIDE 11

ITERATED FUNCTION SYSTEMS

A function T : ℝ2→ ℝ2 is affine if it is in the form f 𝑦 𝑧 = a b c d 𝑦 𝑧 + e f = a𝑦 + b𝑧 + e c𝑦 + d𝑧 + f (linear function followed by translation) We will deal with iterated function systems of affine contractions.

slide-12
SLIDE 12

RANDOM ITERATION ALGORITHM

Drawing an attractor of IFS F:

  • 1. Choose an arbitrary initial point

𝑤 ∈ ℝ2

  • 2. Randomly select one of the contractions Tn in F
  • 3. Plot the point Tn(

𝑤)

  • 4. Let Tn(

𝑤) be the new 𝑤

  • 5. Repeat steps 2-4 to obtain a representation of 𝐵F

1000 Iterations 5000 Iterations 20,000 Iterations

slide-13
SLIDE 13

LET’S DRAW SOME FRACTALS!

slide-14
SLIDE 14

ITERATIONS AND FIXED POINTS

Iterating = repeating the same procedure Let 𝑔(𝑦) be a function. 𝑔 𝑔 𝑦 = 𝑔2 𝑦 is the second iterate of x under 𝑔. 𝑔 𝑔(𝑔( 𝑦 ) = 𝑔3 𝑦 is the third iterate of x under 𝑔 Example: 𝑔 𝑦 = 𝑦2 + 1 𝑔 5 = 26 𝑔 𝑔 5 = 𝑔2 5 = 𝑔 26 = 677

𝑔2 𝑦 = (𝑦2+1)2 + 1 𝑔 𝑦 = 𝑦2 + 1

slide-15
SLIDE 15

ITERATIONS AND FIXED POINTS

A point p is a fixed point for a function f if its iterate is itself 𝑔 𝑞 = 𝑞 Example: 𝑔 𝑦 = 𝑦2 𝑔 0 = 0 𝑔 𝑔 0 = 𝑔2 0 = 𝑔 0 =0 Therefore 0 is a fixed point of f

𝑔 𝑦 = 𝑦2

slide-16
SLIDE 16

METRIC SPACES

Let S be a set. A metric is a distance function d 𝑦, 𝑧 that satisfies 4 axioms ∀ 𝑦, 𝑧 ∈ S

  • 1. d 𝑦, 𝑧 ≥ 0
  • 2. d 𝑦, 𝑧 = 0 if and only if 𝑦 = 𝑧
  • 3. d 𝑦, 𝑧 = d 𝑧, 𝑦
  • 4. d 𝑦, 𝑨 ≤ d 𝑦, 𝑧 + d 𝑧, 𝑨

Example: Absolute Value ℝ d 𝑦, 𝑧 = 𝑦 − 𝑧 ℝ, d is a metric space

d 𝑦, 𝑧 = 𝑦 − 𝑧 x y

slide-17
SLIDE 17

METRIC SPACES

Let S, d be a metric space. A sequence 𝑦𝑜 𝑜=1

in S converges to x ∈ S if lim

𝑜→∞ d 𝑦𝑜, 𝑦 = 0

This means that terms of the sequence approach a value s A sequence is Cauchy if for all 𝜁 > 0 there exists a positive integer N such that whenever n, m ≥ N, d 𝑦𝑜, 𝑦𝑛 < 𝜁 This means that terms of the sequence get closer together S, d is a complete metric space if every Cauchy sequence in S converges to a member of S

slide-18
SLIDE 18

CONTRACTION MAPPING THEOREM

Let S, d be a metric space. A function T: S→S is a contraction if ∃ 𝑟 ∈ 0,1 such that d T(𝑦), T(𝑧) ≤ q ∗ d(𝑦, 𝑧)

d 𝑦, 𝑧 d T(𝑦), T(𝑧) = q ∗ d(𝑦, 𝑧) T

slide-19
SLIDE 19

CONTRACTION MAPPING THEOREM

Contraction Mapping Theorem: If S, d is a complete metric space, and T is a contraction, then as n → ∞, T𝑜 𝑦 → unique fixed point 𝑦∗ ∀ 𝑦 ∈ S

T T

slide-20
SLIDE 20

HAUSDORFF METRIC

A set S is closed if whenever x is the limit of a sequence of members

  • f T, x actually is in T.

A set S is bounded if it there exists x ∈ S and r > 0 such that ∀ 𝑡 ∈ S, d x, 𝑡 < r Means S is contained by a “ball” of finite radius A set S ⊆ ℝ𝑜 is compact if it is closed and bounded Let K denote all compact subsets of ℝ2

slide-21
SLIDE 21

HAUSDORFF METRIC

If B is a nonempty member of K, and 𝑤 is any point in ℝ2, the distance from 𝑤 to B is d 𝑤, 𝐶 = minimum value of 𝑤 − 𝑐 ∀ 𝑐 ∈ 𝐶 (distance from point to a compact set)

B 𝑤 d 𝑤, 𝐶

slide-22
SLIDE 22

HAUSDORFF METRIC

If A and B are members of K, then the distance from A to B is d 𝐵, 𝐶 = maximum value of d 𝑏, 𝐶 for 𝑏 ∈ 𝐵 (distance between compact sets) Means we take the point in A that is most distant from any point in B and find the minimum distance between it an any point in B

A d 𝐵, 𝐶 B 𝑏

slide-23
SLIDE 23

HAUSDORFF METRIC

The Hausdorff metric on K is defined as: D 𝐵, 𝐶 =maximum of d 𝐵, 𝐶 and d 𝐶, 𝐵

B A 𝑐 𝑏 d 𝐵, 𝐶 d 𝐶, 𝐵 d 𝐵, 𝐶 d 𝐶, 𝐵

D 𝐵, 𝐶 = d 𝐶, 𝐵

slide-24
SLIDE 24

Iterated Function System:

𝑔

1

𝑦 𝑧 = 1 2 − 1 2 1 2 1 2 𝑦 𝑧 𝑔

2

𝑦 𝑧 = − 1 2 − 1 2 1 2 − 1 2 𝑦 𝑧 + 1

Render Details:

Point size: 1px # of iterations: 100,000

slide-25
SLIDE 25

Iterated Function System:

𝑔

1

𝑦 𝑧 = 1 2 1 2 𝑦 𝑧 𝑔

2

𝑦 𝑧 = 1 2 1 2 𝑦 𝑧 + 1 2 𝑔

3

𝑦 𝑧 = −1/2 1/2 𝑦 𝑧 + 1 1/2

Render Details:

Point size: 1px # of iterations: 100,000

slide-26
SLIDE 26

Iterated Function System:

𝑔

1

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + 2/3 2/3 𝑔

2

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + 2/3 −2/3 𝑔

3

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + −2/3 2/3 𝑔

4

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + −2/3 −2/3 𝑔

5

𝑦 𝑧 = 13 40 13 40 −13 40 13 40 𝑦 𝑧

Render Details:

Point size: 1px # of iterations: 100,000

slide-27
SLIDE 27

Iterated Function System:

𝑔

1

𝑦 𝑧 = 0 .16 𝑦 𝑧 𝑔

2

𝑦 𝑧 = .85 .04 −.04 .85 𝑦 𝑧 + 1.6 𝑔

3

𝑦 𝑧 = .2 −.26 .23 .22 𝑦 𝑧 + 1.6 𝑔

4

𝑦 𝑧 = −.15 .28 .26 .24 𝑦 𝑧 + .44

Probabilities:

f1: 1% f2: 85% f3: 7% f4: 7%

slide-28
SLIDE 28

Iterated Function System:

𝑔

1

𝑦 𝑧 = 1 2 − 3 6 3 6 1 2 𝑦 𝑧 𝑔

2

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + 1/ 3 1/3 𝑔

3

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + 1/ 3 −1/3 𝑔

4

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + −1/ 3 1/3 𝑔

5

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + −1/ 3 −1/3 𝑔

6

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + 2/3 𝑔

7

𝑦 𝑧 = 1 3 1 3 𝑦 𝑧 + −2/3

slide-29
SLIDE 29

THANKS

Mentor – Kasun Fernando Author and Book Provider – Denny Gulick Some IFS Formulas from Agnes Scott College Graphs Created with Desmos Graphing Calculator