21.02.2015 Views

Iterated Function Systems and Fractals - SUNY Cortland

Iterated Function Systems and Fractals - SUNY Cortland

Iterated Function Systems and Fractals - SUNY Cortland

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Iterated</strong> <strong>Function</strong> <strong>Systems</strong> <strong>and</strong> <strong>Fractals</strong><br />

by<br />

Isa S. Jubran<br />

<strong>SUNY</strong> College at Cortl<strong>and</strong><br />

Abstract: The study of fractals arising as attractors of IFS’s became an<br />

area of practical importance thanks to M<strong>and</strong>elbrot’s fundamental insight<br />

that many natural objects have some self similarity <strong>and</strong> Barnsley’s insight<br />

that it is possible to begin with a shape <strong>and</strong> determine an IFS whose<br />

attractor converges onto that shape . A number of artificial as well as<br />

natural fractals <strong>and</strong> their possible IFS’s will be investigated using java<br />

applets that are freely available on the Web.


Affine transformations:<br />

An affine transformation is of the form<br />

⎛<br />

f(<br />

x ⎝<br />

y<br />

⎞ ⎛<br />

⎠) =<br />

⎝ a<br />

b<br />

c d<br />

⎞<br />

or<br />

⎠ ·<br />

⎛<br />

⎝ x y<br />

⎞ ⎛<br />

⎠ +<br />

⎝ e f<br />

⎞<br />

⎠<br />

⎛<br />

f(<br />

x ⎝<br />

y<br />

⎞ ⎛<br />

⎠) = ⎝<br />

r cos(θ) −s sin(φ)<br />

r sin(θ) s cos(φ)<br />

⎞<br />

⎠ ·<br />

⎛<br />

⎝ x y<br />

⎞ ⎛<br />

⎠ +<br />

⎝ e f<br />

⎞<br />

⎠<br />

• r <strong>and</strong> s are the scaling factors in the x <strong>and</strong> y directions resp.<br />

• θ <strong>and</strong> φ measure rotation of horizontal <strong>and</strong> vertical lines resp.<br />

• e <strong>and</strong> f measure horizontal <strong>and</strong> vertical translations resp.<br />

It can be easily shown that:<br />

• r 2 = a 2 + c 2 ,<br />

• s 2 = b 2 + d 2 ,<br />

• θ = arctan(c/a), <strong>and</strong><br />

• φ = arctan(−b/d).<br />

✻<br />

b<br />

✻<br />

✛<br />

θ<br />

a<br />

c<br />

✲<br />

✛<br />

d<br />

φ<br />

✲<br />

❄<br />

❄<br />

2


For example, shears are represented as follows:<br />

B ′ A ′<br />

✻<br />

.....................<br />

.....................<br />

✻<br />

.....................<br />

.....................<br />

..................... B<br />

..................... B C<br />

C<br />

C<br />

..................... .....................<br />

✲<br />

..................... .....................<br />

′<br />

✲<br />

D<br />

A<br />

D<br />

A<br />

x ′ = x<br />

y ′ = 2x + y<br />

Shear in the y direction<br />

x ′ = x + 2y<br />

y ′ = y<br />

Shear in the x direction<br />

B ′<br />

⎛<br />

a ⎝<br />

b<br />

c d<br />

⎞<br />

⎠ =<br />

⎛<br />

⎝ 1 0<br />

2 1<br />

⎞<br />

⎠<br />

⎛<br />

a ⎝<br />

b<br />

c d<br />

⎞<br />

⎠ =<br />

⎛<br />

⎝ 1 2<br />

0 1<br />

⎞<br />

⎠<br />

r = √ 5, s = 1 r = 1, s = √ 5<br />

θ = 63.435, φ = 0 θ = 0, φ = −63.435<br />

3


Finding IFS Rules from Images of Points<br />

Given three non-collinear initial points p 1 = (x 1 , y 1 ), p 2 = (x 2 , y 2 ), p 3 =<br />

(x 3 , y 3 ) <strong>and</strong> three image points q 1 = (u 1 , v 1 ), q 2 = (u 2 , v 2 ), q 3 = (u 3 , v 3 ) respectively.<br />

Find an affine transformation T such that T (p 1 ) = q 1 , T (p 2 ) =<br />

q 2 , <strong>and</strong> T (p 3 ) = q 3 .<br />

Recall that,<br />

⎛<br />

T (<br />

x ⎝<br />

y<br />

⎞ ⎛<br />

⎠) =<br />

⎝ a<br />

b<br />

c d<br />

⎞ ⎛<br />

⎠ ·<br />

⎝ x y<br />

⎞ ⎛<br />

⎠ +<br />

⎝ e f<br />

⎞<br />

⎠<br />

Now Using p 1 , p 2 , p 3 <strong>and</strong> their images we arrive at the following six equations<br />

in six unknowns:<br />

ax 1 + by 1 + e = u 1<br />

cx 1 + dy 1 + f = v 1<br />

ax 2 + by 2 + e = u 2<br />

cx 2 + dy 2 + f = v 2<br />

ax 3 + by 3 + e = u 3<br />

cx 3 + dy 3 + f = v 3<br />

This system has a unique solution if <strong>and</strong> only if the points p 1 , p 2 , <strong>and</strong> p 3<br />

are noncollinear.<br />

4


Example: The Seirpinski Triangle<br />

1 .....................<br />

.........................................<br />

.........................................<br />

.5, 0, 0, .5, .........................................<br />

0, .5<br />

.....................<br />

.....................<br />

.....................<br />

.....................<br />

.........................................<br />

.........................................<br />

.5, 0, 0, .5, .5, 0<br />

.........................................<br />

.........................................<br />

.....................<br />

0<br />

.5, 0, 0, .5, 0, 0<br />

1<br />

The IFS for the Seirpinski triangle is {T 1 , T 2 , T 2 } where<br />

⎛<br />

T 1 (<br />

x ⎝<br />

y<br />

⎛<br />

T 2 (<br />

x ⎝<br />

y<br />

⎛<br />

T 3 (<br />

x ⎝<br />

y<br />

⎞ ⎛<br />

⎠) =<br />

.5 0 ⎝<br />

0 .5<br />

⎞ ⎛<br />

⎠) =<br />

.5 0 ⎝<br />

0 .5<br />

⎞ ⎛<br />

⎠) =<br />

.5 0 ⎝<br />

0 .5<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎞<br />

⎠ +<br />

⎞<br />

⎠ +<br />

⎞<br />

⎠ +<br />

⎛<br />

⎝ 0 0<br />

⎛<br />

⎝ .5 0<br />

⎛<br />

⎝ 0<br />

.5<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

http://smccd.net/accounts/hasson/fract.html<br />

5


Example: The Seirpinski Carpet<br />

2<br />

3<br />

1<br />

3<br />

✻<br />

1 . . V I V II V III<br />

.....................<br />

.....................<br />

.....................<br />

IV<br />

V<br />

.....................<br />

.....................<br />

.....................<br />

I II III<br />

0 .....................<br />

.....................<br />

.....................<br />

0<br />

1<br />

1<br />

3<br />

2<br />

3<br />

✲<br />

The IFS for the Seirpinski carpet is {T 1 , T 2 , T 3 , T 4 , T 5 , T 6 , T 7 , T 8 } where<br />

⎛<br />

T 1 (<br />

x ⎝<br />

y<br />

⎛<br />

T 2 (<br />

x ⎝<br />

y<br />

⎛<br />

T 3 (<br />

x ⎝<br />

y<br />

⎛<br />

T 4 (<br />

x ⎝<br />

y<br />

⎛<br />

T 5 (<br />

x ⎝<br />

y<br />

⎛<br />

T 6 (<br />

x ⎝<br />

y<br />

⎛<br />

T 7 (<br />

x ⎝<br />

y<br />

⎛<br />

T 8 (<br />

x ⎝<br />

y<br />

⎞ ⎛<br />

⎠) =<br />

.333 0<br />

⎝<br />

0 .333<br />

⎞ ⎛<br />

⎠) =<br />

..333 0<br />

⎝<br />

0 .333<br />

⎞ ⎛<br />

⎠) =<br />

.333 0<br />

⎝<br />

0 .333<br />

⎞ ⎛<br />

⎠) =<br />

.333 0<br />

⎝<br />

0 .333<br />

⎞ ⎛<br />

⎠) =<br />

.333 0<br />

⎝<br />

0 .333<br />

⎞ ⎛<br />

⎠) =<br />

.333 0<br />

⎝<br />

0 .333<br />

⎞ ⎛<br />

⎠) =<br />

.333 0<br />

⎝<br />

0 .333<br />

⎞ ⎛<br />

⎠) =<br />

.333 0<br />

⎝<br />

0 .333<br />

⎞<br />

⎞<br />

⎠ ·<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎛<br />

⎛<br />

⎝ x y<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎞<br />

⎞<br />

⎠ +<br />

⎠ +<br />

⎞<br />

⎠ +<br />

⎞<br />

⎛<br />

⎛<br />

⎝ 0 0<br />

⎞<br />

⎠<br />

⎝ .333 0<br />

⎛<br />

⎠ + ⎝<br />

⎞<br />

⎠ +<br />

⎞<br />

⎝ .666 0<br />

⎛<br />

⎛<br />

⎠ + ⎝<br />

⎞<br />

⎠ +<br />

⎞<br />

⎠ +<br />

0<br />

.333<br />

⎝ .666<br />

.333<br />

⎛<br />

⎛<br />

0<br />

.666<br />

⎝ .333<br />

.666<br />

⎛<br />

⎝ .666<br />

.666<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

6


Example: A simple tree<br />

✻<br />

........... (5,...........<br />

20)<br />

...........<br />

...........<br />

(15, ...........<br />

20)<br />

...........<br />

.<br />

.5, −.5, .5, .5, . 5, 5<br />

...........<br />

.<br />

...........<br />

. . .5, .5, −.5, . .5, 5, 15<br />

(5, 15) (15, 15)<br />

(0, 15)<br />

........... ...........<br />

...........<br />

...........<br />

...........<br />

...........<br />

.<br />

(20, 15)<br />

.<br />

...........<br />

.<br />

...........<br />

. . .<br />

........... ...........<br />

...........<br />

...........<br />

...........<br />

...........<br />

.<br />

(10, 10)<br />

.<br />

...........<br />

.<br />

...........<br />

. . . −10 < x < 30<br />

0 < y < 40<br />

........... ...........<br />

...........<br />

...........<br />

...........<br />

...........<br />

.<br />

.<br />

...........<br />

.<br />

...........<br />

. . .<br />

T runk 0, 0, 0, .333, 10, 0<br />

........... ...................<br />

...................... ..........<br />

........... ..........<br />

✲<br />

(10, 0)<br />

The IFS for the tree is {T 1 , T 2 , T 2 } where<br />

⎛<br />

T 1 (<br />

x ⎝<br />

y<br />

⎛<br />

T 2 (<br />

x ⎝<br />

y<br />

⎛<br />

T 3 (<br />

x ⎝<br />

y<br />

⎞ ⎛<br />

⎠) = ⎝<br />

⎞ ⎛<br />

⎠) = ⎝<br />

.5 .5<br />

−.5 .5<br />

.5 −.5<br />

.5 .5<br />

⎞ ⎛<br />

⎠) =<br />

0 0<br />

⎝<br />

0 .333<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎞<br />

⎠ ·<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎛<br />

⎝ x y<br />

⎞<br />

⎠ +<br />

⎞<br />

⎠ +<br />

⎞<br />

⎠ +<br />

⎛<br />

⎝ 5<br />

15<br />

⎛<br />

⎝ 5 5<br />

⎛<br />

⎝ 10 0<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

http://alumnus.caltech.edu/ chamness/equation/equation.html<br />

http://smccd.net/accounts/hasson/fract.html<br />

7


Demonstrate some of the java applets at<br />

http://classes.yale.edu/fractals/Software/Software.html<br />

Discuss the IFS for the Fern.<br />

Discuss the IFS for the mountain range.<br />

Discuss the IFS for the Wave.<br />

8


<strong>Iterated</strong> <strong>Function</strong> <strong>Systems</strong>:<br />

An <strong>Iterated</strong> <strong>Function</strong> System in R 2 is a collection {F 1 , F 2 , . . . , F N } of contraction<br />

mappings on R 2 . (F i is a contraction mapping if given x, y then<br />

d(F i (x), F i (y)) ≤ s d(x, y) where 0 ≤ s < 1)<br />

The Collage Theorem says that there is a unique nonempty compact<br />

subset A ⊂ R 2 called the attractor such that<br />

A = F 1 (A) ∪ F 2 (A) ∪ . . . ∪ F N (A)<br />

Sketch of Proof:<br />

Given a complete metric space X, let H(X) be the collection of nonempty<br />

compact subsets of X. Given A <strong>and</strong> B in H(X) define d(A, B) to be the<br />

smallest number r such that each point of in A is within r of some point<br />

in B <strong>and</strong> vice versa. If X is complete so is H(X).<br />

A = [0, 3]<br />

B = [2, 4]<br />

2 3 4<br />

0 1 2 3<br />

d(A, B) = 2<br />

Given an IFS on X, define G : H(X) → H(X) by<br />

G(K) = F 1 (K) ∪ . . . ∪ F N (K)<br />

If each F i is a contraction then so is G. The contraction mapping theorem<br />

says that a contraction mapping on a complete space has a unique fixed<br />

point. Hence there is A ∈ H(X) such that<br />

G(A) = A = F 1 (A) ∪ F 2 (A) ∪ . . . ∪ F N (A)<br />

Given K 0 ⊂ R 2 , let K n = G n (K 0 ). Then<br />

d(A, K n ) ≤ sn d(K 0 , G(K 0 ))<br />

1 − s<br />

Hence K n is a very good approximation of A for large enough n.<br />

9


To underst<strong>and</strong> the previous result note that:<br />

d(A, K 0 ) = d( n→∞<br />

lim K n , K 0 )<br />

= n→∞<br />

lim d(K n , K 0 )<br />

≤ n→∞<br />

lim d(K 0 , K 1 ) + d(K 1 , K 2 ) + · · · + d(K n−1 , K n )<br />

≤ n→∞<br />

lim d(K 0 , K 1 ) + sd(K 0 , K 1 ) + · · · + s n−1 d(K 0 , K 1 )<br />

1<br />

≤<br />

1 − s d(K 0, K 1 )<br />

Hence,<br />

d(A, K 1 ) ≤ 1<br />

1 − s d(K 1, K 2 ) ≤ s<br />

1 − s d(K 0, K 1 )<br />

d(A, K 2 ) ≤ 1<br />

1 − s d(K 2, K 3 ) ≤ s2<br />

1 − s d(K 0, K 1 )<br />

.<br />

Deterministic Algorithm: (Slow!)<br />

Given K 0 , let K n = G n (K 0 ). Now K n → A <strong>and</strong> n → ∞.<br />

R<strong>and</strong>om Algorithm: (Fast!)<br />

Given Q 0 ∈ K 0 , let Q i+1 = F j (Q i ) where F j is chosen with probability<br />

p j from all of the F i . Clearly Q i ∈ K i <strong>and</strong> for sufficiently large i, Q i is<br />

arbitrarily close to some point in A.<br />

Choose p i ∼ |detA i|<br />

N∑<br />

|detA i |<br />

i=1<br />

= |a id i − b i c i |<br />

N∑<br />

|a i d i − b i c i |<br />

i=1<br />

Geometrically, choose p i “proportional to F i .”<br />

.<br />

10


How do these algorithms work:<br />

3 33<br />

3 21<br />

3 22<br />

3 31<br />

3 32<br />

3 13<br />

3 23<br />

3 11<br />

3 12<br />

1 33<br />

11<br />

2 33<br />

1 31<br />

1 32<br />

2 31<br />

2 32<br />

1 13<br />

1 21<br />

1 2<br />

2 11<br />

2 12<br />

1 23<br />

2 13<br />

2 23<br />

1 11<br />

1 12<br />

2<br />

2 21<br />

2 22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!