USING THE RANDOM ITERATION ALGORITHM TO CREATE FRACTALS
BY ADAM ANDERSON UNIVERSITY OF MARYLAND DIRECTED READING PROGRAM FALL 2015
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
BY ADAM ANDERSON UNIVERSITY OF MARYLAND DIRECTED READING PROGRAM FALL 2015
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?
CAPACITY DIMENSION AND FRACTALS
Let S ⊆ ℝ𝑜 where n = 1, 2, or 3 n-dimensional box
Let N(ε) = smallest number of n-dimensional boxes of side length ε necessary to cover S
y x z
CAPACITY DIMENSION AND FRACTALS
n = 1
Boxes of length ε to cover line
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
ε
CAPACITY DIMENSION AND FRACTALS
n = 2
Boxes of length ε to cover square S of side length L
ε
If L = 20cm, area of S = 400cm2
It will take 100 boxes to cover S
It will take 400 boxes to cover S N(ε) ∝
1
ε2
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
𝜁
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𝑜
The Sierpinski Gasket is ≈ 1.585 dimensional A set with non-integer capacity dimension is called a fractal.
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
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.
RANDOM ITERATION ALGORITHM
Drawing an attractor of IFS F:
𝑤 ∈ ℝ2
𝑤)
𝑤) be the new 𝑤
1000 Iterations 5000 Iterations 20,000 Iterations
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
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
METRIC SPACES
Let S be a set. A metric is a distance function d 𝑦, 𝑧 that satisfies 4 axioms ∀ 𝑦, 𝑧 ∈ S
Example: Absolute Value ℝ d 𝑦, 𝑧 = 𝑦 − 𝑧 ℝ, d is a metric space
d 𝑦, 𝑧 = 𝑦 − 𝑧 x y
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
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
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
HAUSDORFF METRIC
A set S is closed if whenever x is the limit of a sequence of members
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
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 𝑤, 𝐶
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 𝑏
HAUSDORFF METRIC
The Hausdorff metric on K is defined as: D 𝐵, 𝐶 =maximum of d 𝐵, 𝐶 and d 𝐶, 𝐵
B A 𝑐 𝑏 d 𝐵, 𝐶 d 𝐶, 𝐵 d 𝐵, 𝐶 d 𝐶, 𝐵
D 𝐵, 𝐶 = d 𝐶, 𝐵
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
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
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
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%
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
THANKS
Mentor – Kasun Fernando Author and Book Provider – Denny Gulick Some IFS Formulas from Agnes Scott College Graphs Created with Desmos Graphing Calculator