Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Lecture 31
Measuring the sizes of fractal sets in Rk (cont’d)
In the previous lecture, we examined the following generator in R2:
1
3ll
1
3l
1
3l
1
3l
This generator removes the middle third of a line segment of length l and replaces it with two segments
of length l3. Starting with the set J0 = [0, 1], the unit interval on the x-axis, repeated application of
this generator produces curves Jn of increasing length which, in the limit n → ∞ converge to the “von
Koch curve” C shown below.
The von Koch curve
We showed that the von Koch curve C had infinite length and zero area. We also showed that it had
a fractal dimension,
D =ln 4
ln 3≈ 1.26 . (1)
Since 1 < D < 2, the curve C can be viewed as “thicker” than a simple curve of dimension 1 and
“thinner” than a planar area of dimension 2.
399
We now consider a generalization of the von Koch curve generator as shown below.
rll
rl
rl rl
This generator, to be denoted as Gr in order to explicitly state its dependence upon the parameter r,
replaces a line segment of length l with four shorter line segments of length rl as shown above. The
feasible range of the parameter is 1
4≤ r ≤ 1
2. To see this, note the following:
• If r < 1
4, then the four shrunken segments, each of length rl would have total length 4rl < l.
If the first segment started at the left endpoint of the original line segment, the fourth segment
could not reach the right endpoint.
• When r = 1
4, the line segment is replaced with four line segments of one-quarter its length
touching each other. The result is the original line segment. As such, the limiting curve Cr is
the original seed line segment.
• If r > 1
2, then the first and last segments would have to overlap since their combined length is
2rl > l. Otherwise, the distance between the left endpoint of the first segment and the right
endpoint of the fourth segment would be greater than l. We don’t want to allow such overlapping
since the resulting curve would have a “loop” in it.
Finally, we mention that the parameter value r = 1
3corresponds to the standard von Koch curve
discussed earlier.
We now consider the limiting set of points obtained from the iteration of Gr. Without loss of
generality, we assume that our initial “seed” set is I0 = [0, 1] from which the sequence In+1 = Gr(In)
is then generated. Each set In is a piecewise linear curve. From the action of the generator, it should
not be difficult to see that the length Ln of In is related to the length Ln+1 of In+1 as follows,
Ln+1 = 4r Ln . (2)
Since L0 = 1, it follows that
Ln = (4r)nL0 = (4r)n . (3)
400
When r = 1
4, Ln = 1 for all n ≥ 0, as discussed earlier. When r > 1
4, 4r > 1 which implies that
Ln → ∞ as n → ∞. In other words, apart from the trivial case r = 1
4, all generalized von Koch curves
have infinite length.
In the limit n → ∞, the sequence of piecewise linear curves In converges to a curve Cr. Some
limiting sets for various r values are shown on the next page. As r increases, the curves Cr demonstrate
a greater degree of jaggedness or “fractality.” In each case, Cr is self-similar and may be expressed
as a union of four contracted copies of itself:
Cr =⋃
k=1
Cr,i. (4)
Each copy Cr,k is obtained by shrinking Cr toward the origin (0,0) by a factor of r and then
rotating and translating it appropriately. Perhaps the most striking limiting “curve” Cr occurs in the
case r = 1
2. The limiting set is, in fact, the triangular region shown on the next page. Our curve Cr
is, in fact, a “space-filling” curve. The reader is encouraged to work out the first few iterates In to see
how these sets approach the limiting area. (See the book, The Fractal Geometry of Nature by Benoit
Mandelbrot, for more examples of generators that yield space-filling curves.)
The next step is to determine the fractal dimension D of the limiting curve Cr. The self-similar
nature of Cr described above will be very useful here. For an ǫ > 0, suppose that we can tile the
curve Cr with N(ǫ) circular discs of diameter ǫ. Also assume that ǫ is sufficiently small so that we
may make the approximation
LD(Cr) ≈ N(ǫ)ǫD . (5)
(This approximation may be made as closely as desired by choosing ǫ sufficiently close to 0.) We
sketch this covering below.
401
Generalized von Koch curve: r = 0.3
Generalized von Koch curve: r = 0.4
Generalized von Koch curve: r = 0.5
402
Now construct four shrunken copies of the above figure, i.e. the curve Cr as well as the N(ǫ) discs,
with contraction factor r, and arrange these copies so that the the curve Cr is reconstructed. The
resulting figure, shown below, shows curve Cr being covered with 4N(ǫ) circular discs of diameter rǫ.
The D-dimensional volume of Cr may therefore be approximated as
LD(Cr) ≈ 4N(ǫ)(rǫ)D (6)
We now equate the two length estimates,
N(ǫ)ǫD = 4N(ǫ)(rǫ)D . (7)
Dividing both sides by N(ǫ)ǫD yields the relation
4rD = 1 , (8)
which may be rewritten as
r−D = 4 =⇒
(
1
r
)D
= 4 . (9)
Solving for D yields
Dr =ln 4
ln 1
r
,1
4≤ r ≤
1
2. (10)
This is the fractal dimension of the generalized von Koch curve Cr.
We could also have derived the above result in a quick way by using a scaling result from the previous
lecture which we repeat here:
N(rǫ) = N(ǫ)r−D . (11)
403
The number of N(rǫ) balls needed to cover the set is 4 times the number of N(ǫ) balls, i.e.,
N(rǫ) = 4N(ǫ) . (12)
Substituting this into (11) yields,
4N(ǫ) = N(ǫ)r−D , (13)
which yields (8).
Special cases:
1. r = 1
4: D = 1; the generator replaces a line with itself, as discussed earlier.
2. r = 1
3: D = ln 4
ln 3; the limiting curve is the von Koch curve studied in the previous lecture.
3. r = 1
2: D = 2; the limiting set is the triangular region shown in the figure.
404
Further generalizations of the von Koch curve generator
The factor “4” appearing in the expression for the fractal dimension Dr is due to the fact that Cr is
composed of four contracted copies of itself. Now consider an even more generalized generator, shown
below, in which a line segment is replaced by n copies of itself that are contracted by a factor r.
n
l rlrl
rl rl
rl
1
Iteration of this generator will yield, in the limit, a fractal object – call it C – which can be expressed
as a union of n contracted copies of itself. From an argument that is almost identical to the one used
above, the “4” in Eq. (6) is replaced by “n” so that the fractal dimension of the attractor curve C is
given by
D(n, r) =lnn
ln 1
r
. (14)
Note the relationship between n, r and D may also be left in the following form:
nrD = 1 . (15)
Let’s now step back back and derive the results in Eq. (14) and (15) in the same way that we did
for the four-copy case. Suppose that we can cover the fractal curve with N(ǫ) circular boxes or disks of
radius ǫ. We can imagine ǫ to be sufficiently, in fact, infinitesimally, small so that the D-dimensional
measure of the fractal curve C is well approximated by (up to a multiplicative constant),
LD(C) ∼= N(ǫ)ǫD . (16)
(Here, we are ignoring the π/4 factor that gives the area of a circular disk of radius ǫ. Even if we used
it, it will eventually disappear. We could also have used rectangles with sides of length ǫ.) In fact, it
may make things a little less confusing if we simply write that
LD(C) = limǫ→0
N(ǫ)ǫD . (17)
(Although that being said, the limit itself may be infinite!)
Now recall that each component of the fractal curve C is a contracted (and rotated, translated)
copy of C. We now shrink C, along with the N(ǫ) ǫ-disks that cover it, by a factor of r. The result
405
is a shrunken copy of C that is covered with N(ǫ) disks of radii r′ = rǫ. We replace each segment
of curve C (as well as the ǫ-disks that cover it) with the shrunken copy of C with rǫ-disks. The net
result is that we have reconstructed curve C, but it is now covered with nN(ǫ) disks of radius r′ = rǫ.
The approximation to the D-dimensional measure of the curve is
LD(C) ∼= N(rǫ)(rǫ)D = nN(ǫ)(rǫ)D . (18)
But we can once again take limits,
LD(C) = limǫ→0
N(rǫ)(rǫ)D = limǫ→0
nN(ǫ)(rǫ)D . (19)
We now combine the two limiting results for LD(C),
limǫ→0
N(ǫ)ǫD = limǫ→0
nN(ǫ)(rǫ)D . (20)
Notice that we can divide out N(ǫ)ǫD from both sides to obtain
nrD = 1 , (21)
from which it follows that
D(n, r) =lnn
ln 1
r
. (22)
And if that was too confusing, just keep in mind the basic scaling result
N(rǫ) = N(ǫ)r−D , (23)
that we discussed in the previous lecture. (It’s actually an approximation - the equality holds in the
limit ǫ → 0+.)
One may generalize the above generator Gr to employ scaling factors ri that are not necessarily
equal to each other, as sketched below.
rn−1ll r1l r2l
r3l rnl
This generalization makes it possible to generate a much wider class of fractal curves. Some examples
are shown in the figure on the next page. On the left of each of the first rows is shown the generator
406
G. On the right is the resulting fractal curve. The second and third sets show that when two lines of
the generator are superimposed, tree-like patterns result. As we travel from the leftmost point of the
generator (0,0) to the rightmost point (1,0), the fractal curve always lies to our left. As such, the two
superimposed lines have different orientations, and a copy of the curve lies on each side.
In the final entry, the generator and fractal curve are shown on the same plot. The generator is
slightly more complicated, in the sense that the path from (0,0) to (1,0) is not straight. The fractal
curve is much more “cloudlike.” In fact, a slight perturbation of this result, shown in the next figure,
produces a curve which intersects back on itself infinitely often, giving rise to a more “curly” fractal
set.
A fractal set C obtained from a generalized generator will once again be self-similar, i.e., it will be
a union of n contracted copies Ci of itself. The major difference is that each copy Ci will be obtained
by contracting C by the factor ri. The fractal dimension D of these generalized curves is a more
complicated function of the scaling functions ri as compared to the homogeneous case ri = r studied
earlier. As such, we cannot use the quick formula that we derived earlier, i.e.,
D =ln (number of copies)
ln (1/contraction factor)=
lnn
ln 1
r
. (24)
Here we peform a quick derivation of the fractal dimension for the generalized attractor with contrac-
tion factors ri, 1 ≤ i ≤ n.
Once again, let us assume that ǫ is sufficiently small so that we can cover the entire curve C with
N(ǫ) circular disks of radius ǫ. The D-dimensional measure of the curve is well approximated by
LD(C) = N(ǫ)ǫD . (25)
Now make n copies of this curve, along with the ǫ-radius disks on it. Each copy, along with the ǫ-disks
will be contracted by the factor ri. Now replace each piece of the fractal curve C with the appropriate
ri-contracted copy of C with the disks. The curve C will remain the same. The first piece of C will be
covered with with N(ǫ) disks of radius r1ǫ, the second piece with N(ǫ) disks of radius r2ǫ, etc., until
we arrive at the nth piece covered with N(ǫ) disks of radius rnǫ. As a result, we now have another
estimate of the D-dimensional measure,
LD(C) = N(ǫ)(r1ǫ)D +N(ǫ)(r2ǫ)
D + · · · +N(ǫ)(rnǫ)D . (26)
If we now combine these two estimates for LD(C), and understand that they are equal in the limit
ǫ → 0+, we obtain, after cancelling the N(ǫ) and ǫD factors from both sides, the following equation
407
Some examples of generalized von Koch curves
Generator G with four copies – the result is a modified von Koch curve
Generator G with four copies – the result resembles a collection of trees
Generator G with seven copies – another tree-like scene
Rather than being dendritic, the fractal curve is cloudlike. Here we show the generator and the
curve on the same plot.
408
Generator G producing a more “curly” fractal set.
for D,
rD1 + rD2 + · · ·+ rDn = 1. (27)
Note that in the special case of a homogeneous fractal, i.e., ri = r, the above result reduces to our
earlier result, Eq. (21).
We claim that the fractal dimension D is the unique solution to this equation and leave this as
an exercise for the reader. The basic steps are as follows:
• For a fixed set of scaling factors, 0 < ri < 1 for 1 ≤ i ≤ n, n ≥ 2, define the following function
of D:
f(D) = rD1 + rD2 + · · · rDn . (28)
• Note that f(0) = n.
• Also note that f(D) → 0+ as D → ∞ since each of the ri lie between 0 and 1.
• Show that f ′(D) < 0 for D > 0, which implies that f(D) is strictly decreasing for D > 1.
• From the above information, it should follow that the graph of f(D) vs. D should intersect the
line y = 1 only once. At this value of D, Eq. (27) is satisfied.
409
The “Sierpinski triangle” or “Sierpinski gasket”
We now conclude this section with a classic fractal set in the plane, the so-called “Sierpinski triangle”.
We begin with an equilateral triangle and define a generator G that removes the middle quarter of
triangular regions (open sets) as shown below:
The action of the generator on the triangular region may also be interpreted geometrically as follows:
G produces three contracted copies of the region by shrinking in the x and y directions by a factor
of r = 1
2and then placing the three copies so that they touch at the midpoints of the triangular
boundary. The repeated action of G produces the following sets:
In the limit, the sequence of sets converges to the following fractal set S, the Sierpinski triangle, shown
in the figure below.
Sierpinski triangle
410
The set S is easily seen to be a union of three contracted copies of itself, with contraction factor
r = 1
2. A measurement procedure involving circular discs of diameter ǫn = 1
2nshows that S has zero
two-dimensional area and infinite one-dimensional length. Let us now recall the basic scaling result
for self-similar fractals, relating the number of disks needed to cover a set with fractal dimension N ,
N(rǫ) = N(ǫ)r−D . (29)
In the case of the Sierpinski triangle,
r =1
2(30)
and
N(1
2ǫ) = 3N(ǫ) , (31)
This comes from the fact that if you use N(ǫ) disks of radius ǫ to cover the entire triangle, and
then make three shrunken copies (by factor r = 1
2, you can cover each of the three subsets of the tri-
angle with N(ǫ) disks of radius 1
2ǫ. As a result, you need 3N(ǫ) disks of radius 1
2ǫ to cover the triangle.
From Eqs. (29)-(31), we have
3N(ǫ) = N(ǫ)
(
1
2
)
−D
, (32)
or
3 = 2D , (33)
which implies that
D =ln 3
ln 2∼= 1.58496 (34)
Note that 1 < D < 2 – the Sierpinski triangle, as expected, is “thicker” than a line but “thinner” than
a two-dimensional region in the plane.
Another look at fractal dimensions in terms of scaling: Let’s examine this result one more
time to see why the fractal dimension D lies between the values of 1 and 2. The Sierpinski triangle
is a union of three contracted copies of itself. Each shrunken copy is obtained by contracting the
triangle by a factor of r = 1
2in the x- and y-directions. Since the Sierpinski triangle is a union of
three contracted copies of itself, this means that the “size” of each copy is one-third the “size” of
the entire Sierpinski triangle. (By “size”, we can mean “mass” or “measure”, or whatever.)
411
Now constrast this fact with the way that “normal” Euclidean objects scale, using the scaling factor
r = 1
2that was used for the Sierpinski triangle:
1. Consider a line of length 1 in the plane: say, the interval [0, 1] on the x-axis. Let us now make
two contracted copies of this interval, namesly [0, 12] and [1
2, 1]. Both of then are contractions of
the interval [0, 1] by a factor of r = 1
2. And the length of each of these copies is one-half the
length of the interval [0, 1]. This is simple!
2. Now consider a square with sides of length 1, say the interval [0, 1]2. If we shrink the sides of
the square by factor 1
2, we obtain a square that is one-quarter the area of the square. As such,
we’ll need four of these copies to reconstruct the original square. This is simple as well.
3. But when we shrink the Sierpinski triangle in the x- and y-directions by the factor r = 1
2, we
produce a smaller triangle which is one-third of the size of the original triangle: Not one-half,
as was the case for lines, nor one-quarter, which was the case of regions, but one-third, which
lies between one-half and one-quarter. Because the Sierpinski triangle has “holes” in it, it scales
neither as a one-dimensional nor as a two-dimensional object. It scales as a D-dimensional
object, where D = ln 3/ ln 2.
412
Lecture 32
Measuring the sizes of fractal sets in Rk (cont’d)
Other fractals obtained by dissection
There are many generalizations of the Sierpinski triangle in R2 – a few of these are presented in
Problem Set No. 6. One can also extend the method to higher dimensions, i.e., a “Sierpinski gasket”
in R3. A sketch of this fractal, taken from B. Mandelbrot’s book, The Fractal Geometry of Nature, is
presented in the figure below.
Three-dimensional Sierpinski gasket, from The Fractal Geometry of Nature, by B. Mandelbrot.
The 3D Sierpinski gasket is self-similar: It may be viewed as a union of 4 contracted copies of itself.
In this case, the contraction factor is r = 1
2: Each copy is obtained from the original set by shrinking
413
it in three directions by a factor of 1
2. As such, the 3D gasket is a homogeneous fractal and we may
use the same formula used earlier for our generalized von Koch curves, i.e.,
D =ln (number of copies)
ln (1/contraction factor)=
lnn
ln 1
r
=ln 4
ln 2= 2 . (35)
In the event that you are not sufficiently comfortable with this quick result, let’s derive it by going
back to our fundamental scaling relation,
N(rǫ) = N(ǫ)r−D . (36)
Here, N(ǫ) will be the number of (3D) cubes with sides of length ǫ needed to cover the 3D Sierpinski
gasket. As mentioned above, the scaling factor is r = 1
2. If we shrink such a covering of the 3D gasket
by a factor of 1
2and place four copies of this shrunken covering at the appropriate places, we obtain a
covering of the 3D gasket with cubes with sides of length 1
2ǫ. As such, the number of cubes with sides
of length 1
2ǫ needed to cover the entire 3D gasket is
N(1
2ǫ) = 4N(ǫ) , (37)
From Eqs. (36) and (37), we then have that
4N(ǫ) = N(ǫ)
(
1
2
)
−D
. (38)
Division by N(ǫ) yields
4 = 2D , (39)
which then gives us the result for D obtained earlier, i.e.,
D =ln 4
ln 2= 2 . (40)
Isn’t this a rather pecular result. The 3D Sierpinski gasket, a set in R3 scales as a two-dimensional
object. Normally, when we think of a two-dimensional object, we think of a planar area or a surface.
414
Sierpinski carpet and Menger sponge
Consider the following generator in R2, which operates on regions in the plane. It removes the
“middle-ninth” of a square region:
G
ℓl3
Repeated application of this procedure yields, in the limit, the so-called two-dimensional “Sier-
pinski carpet,” an approximation of which is shown in the figure below.
The “Sierpinski carpet”
The Sierpinski carpet is self-similar: It may be expressed as a union of 8 copies of contracted copies of
itself. In this case, the contraction factor is r = 1
3. As such, the fractal dimension D of the Sierpinski
415
carpet is
D =lnn
ln 1
r
=ln 8
ln 3∼= 1.89279 . (41)
An illustration of a three-dimensional version of the Sierpinski carpet, known as the “Menger sponge,”
taken from Mandelbrot’s book, Fractal Geometry of Nature is shown below.
Three-dimensional “Menger sponge,” from The Fractal Geometry of Nature by B. Mandelbrot.
The Menger sponge is a union of 27−7 = 20 contracted copies of itself, with contraction factor r = 1
3.
The fractal dimension of the sponge is therefore
D =lnn
ln 1
r
=ln 20
ln 3∼= 2.727 . (42)
416
A final and interesting example: A simulation of a “strange attractor”
Consider an infinite set S of lines that is distributed in the plane as shown in the figure below. This
distribution of lines may be viewed as a simulation of a “strange attractor” – recall our brief study of
the strange attractor of the H’enon map in the plane. A line perpendicular to these lines intersects the
ensemble along a ternary Cantor set. For simplicity, we consider lines of length 1 and let the width of
the ensemble to be 1. In what follows, we shall compute the fractal dimension D of this ensemble.
ǫn
1
3n
blocks
12n
blocks
ǫn =1
3n
ǫn
Covering a Cantor set of lines with ǫ2n-boxes
First of all, the total length L of this infinite set S of lines of length 1 is ∞. We now compute the
area A of this ensemble. As was the case for the ternary Cantor set, it is convenient to consider square
blocks with sides of length ǫn =1
3n.
1. For each horizontal row of blocks covering the solid lines in the x-direction, we need 3n blocks.
2. We need 2n blocks in each vertical row to cover the Cantor set (as was the case for the one-
dimensional ternary Cantor set – there, we needed only segments of length ǫn).
We therefore need N(ǫn) = 3n × 2n = 6n blocks of area ǫ2n. This yields the following estimate, An, of
the area A:
An = N(ǫn) ǫ2n = 6n ǫ2n = 6n
(
1
3n
)2
=
(
2
3
)n
. (43)
417
Clearly,
A = limn→∞
An = 0 . (44)
The Cantor set ensemble of lines has zero area.
We now compute the fractal dimension D of this ensemble in two ways:
1. Computing the D-dimensional measure of the set and adjusting the exponent ap-
propriately to obtain a non-zero and non-infinite “size”: Once again, we employ N(ǫn)
measuring blocks with side-length ǫn. The D-dimensional measure will be given by
LD(S) = limn→∞
N(ǫn) ǫDn
= limn→∞
6n(
1
3n
)D
= limn→∞
(
6
3D
)n
. (45)
This limit is non-zero and non-infinite when
3D = 6 =⇒ D =ln 6
ln 3. (46)
2. Scaling: Suppose that we require N(ǫ) square blocks of side-length ǫ to cover the set S – for
example N(ǫn) = 3n × 2n = 6n, as found earlier. We now consider square blocks of side-length
ǫ3. In order to cover the lines horizontally, we’ll need three times the number of blocks in the
horizontal direction. In order to cover the Cantor set, we’ll ned two times the number of blocks
in the vertical direction. Therefore,
N
(
1
3ǫ
)
= 6N(ǫ) . (47)
We now employ the scaling equation,
N(rǫ) = N(ǫ)r−D , (48)
to deduce that(
1
3
)
−D
= 6 , (49)
which implies that
3D = 6 =⇒ D =ln 6
ln 3. (50)
418
Both methods yield the same result.
Let’s now examine the result for the fractal dimension D of the set S:
D =ln 6
ln 3
=ln 3 + ln 2
ln 3
= 1 +ln 2
ln 3. (51)
We see that D is the sum of the dimension D1 = 1 of the (horizontal) line and the dimension D2 =ln 2
ln 3
of the Cantor set.
We may view the set S as a kind of “product” of a one-dimensional horizontal line with a vertical
Cantor set. The dimension of the resulting set is the sum of the dimensions of the two components.
If we think of a two-dimensional region, say, [0, 1]2 as the “product” of a one-dimensional horizontal
line and a one-dimensional vertical line, then the sum of these two dimensions yields the dimension of
the product set.
419
A short note on fractal-like sets occurring in nature
Benoit Mandelbrot’s classic work, The Fractal Geometry of Nature centered, as its name suggests, on
the idea that fractal patterns occur in nature – not just here and there, but everywhere, e.g., clouds,
rock, soil, river/tributary patterns, etc..
Diffusion-limited aggregates: Fractal-like sets occurring in nature
An excerpt from the article entitled, “Diffusion-Limited Aggregation: A Model for Pattern Formation,”
by Thomas C. Halsey from the Physics Today online archive at
http://web.archive.org/web/20070405094836/http://aip.org/pt/vol-53/iss-11/p36.html
The basic concept
To understand the basics, consider colloidal particles undergoing Brownian motion in some fluid, and
let them adhere irreversibly on contact with one another. Suppose further that the density of the
colloidal particles is quite low, so one might imagine that the aggregation process occurs one particle
at a time. We are then led to the following model.
Fix a seed particle at the origin of some coordinate system. Now introduce another particle at a
large distance from the seed, and let it perform a random walk. Ultimately, that second particle will
either escape to infinity or contact the seed, to which it will stick irreversibly. Now introduce a third
particle into the system and allow it to walk randomly until it either sticks to the two-particle cluster
or escapes to infinity. Clearly, this process can be repeated to an extent limited only by the modeler’s
patience and ingenuity (the required computational resources grow rapidly with n, the number of
particles).
The clusters generated by this process are both highly branched and fractal. The cluster’s fractal
structure arises because the faster growing parts of the cluster shield the other parts, which therefore
become less accessible to incoming particles. An arriving random walker is far more likely to attach
to one of the tips of the cluster shown in the left figure (a) below than to penetrate deeply into one of
the cluster’s ”fjords” without first contacting any surface site. Thus the tips tend to screen the fjords,
a process that evidently operates on all length scales. Figure (b) at the right shows the ”equipotential
lines” of walker probability density near the cluster, confirming the unlikelihood of random walkers
penetrating the fjords.
420
A theoretical cluster obtained by a computer simulation of this aggregation process is shown below.
The fractal dimension D of both the theoretical as well as the experimental cluster in three-
dimensions is roughly D = 2.5.
421
Estimating the (global) fractal dimension D of sets/objects
Given a set S ∈ Rk, let N(ǫ) be the minimum number of k-dimensional balls of diameter ǫ in R
k
needed to “cover” S, i.e., S is contained in a union of these balls. If S has fractal dimension D, then
N(ǫ) ∼= Aǫ−D = A
(
1
ǫ
)D
as ǫ → 0+ . (52)
For mathematical objects, the approximation improves as ǫ → 0+. Now take logarithms of oth sides
of the above equation (it doesn’t matter what base you choose for the logarithm),
logN(ǫ) ∼= D log
(
1
ǫ
)
+ logA . (53)
Rearranging,
D ∼=logN(ǫ)
log 1
ǫ
−logA
log 1
ǫ
. (54)
As ǫ → 0+, 1
ǫ→ ∞ which implies that log 1
ǫ→ ∞ which, finally, implies that the second term in the
above equation goes to zero. The mathematical definition of D is therefore
D = limǫ→0+
logN(ǫ)
log 1
ǫ
, (55)
provided that the limit exists. For natural objects, one will not be able to let ǫ → 0+. As such, we
determine N(ǫ) over a range of “reasonable” ǫ-values.
Basic idea:
1. Work with a finite set of epsilon values, i.e., ǫ1 > ǫ2 > · · · ǫn, e.g.,
ǫk = rk , (56)
where 0 < r < 1 is a convenient scaling factor, possibly relevant to the problem.
On a computer, this is often done with a digital image by using dyadic squares of pixels. For
example, if our set S of concern is shown in a 512 × 512-pixel digital image, we let ǫ1 = 512,
ǫ2 = 512/2 = 256, ǫ3 = 256/2 = 128, · · · , ǫ9 = 1. In other words, a single pixel represents the
smallest ǫ-tile used to cover the set S. N(ǫ9) will be the number of pixels needed to cover S.
N(ǫ8) will be the number of (nonoverlapping) 2× 2-pixel blocks needed to cover S, and so on.
2. Let N(ǫk) denote the number of ǫk-balls (tiles) needed to cover S.
422
3. Plot logN(ǫk) vs. log1
ǫkfor 1 ≤ k ≤ n.
4. A least-squares fit to this data will produce a straight line with slope m that will be an approx-
imation to D.
We illustrate this idea with a couple of examples below.
Experiment No. 1
Shown in the figure below is a 512 × 512-pixel digital image of a modified Sierpinski triangle. (It
is obtained in the same way as before, i.e., by taking the middle-quarters. But here, we started with
a right triangle as initial “seed.”) Our fractal set S consists of all pixels which are black.
A simple computer program was written (in MATLAB) to perform “box counting” on this set using
boxsizes of ǫ = 1, 2, 4, 8, 16 and 32. (It is not very useful to use higher values of ǫ, since very few boxes
are used The numbers of tiles N(ǫ) needed to cover the set S for these ǫ-values are shown in the table
below.
423
ǫ N(ǫ)
32 81
16 243
8 729
4 2187
2 6561
1 19683
A plot of the values of N(ǫ) vs. log(1/ǫ) from the above table is shown below.
-5 -4 -3 -2 -1 0
log (1/ )
0
1
2
3
4
5
6
7
8
9
10
log
N(
)
The plot seems to indicate that the points lie very close to a straight line. Indeed, a least-squares
fitting of the data yields a slope of
D ≈ 1.5860 , (57)
which agrees extremely well with the theoretical result discussed earlier,
D =ln 3
ln 2≈ 1.5860 . (58)
424
Experiment No. 2
The result of the above experiment may seem rather contrived since we used a “perfect” fractal,
i.e., the Sierpinski gasket, even though it was a finite-dimensional representation of the gasket. Let
us now consider a more realistic example, as presented in the figure below. It is a 512 × 512 digital
image of the vasculature (blood vessels) in a tiny section of a a mouse ear obtained by a rather and
novel method of imaging being developed at UW:
http://www.photomedicinelabs.com
The computer program used in Experiment No. 1 was used once again to perform a box-counting
analysis of the mouse ear image. As before, box sizes of ǫ = 1, 2, 4, 8, 16 and 32 were used. The results
are shown below.
ǫ N(ǫ)
32 218
16 631
8 1435
4 2970
2 5657
1 9568
425
A plot of the values of N(ǫ) vs. log(1/ǫ) from the above table is shown below.
-5 -4 -3 -2 -1 0
log (1/ )
0
1
2
3
4
5
6
7
8
9
10
log
N(
)
The points could be imagined to lie roughly on a straight line. If we fit a straight line using
least-squares to all six points, the value of the slope is
D ∼= 1.16 , (59)
which suggests that the network of blood vessels is slightly thicker than a simple curve. This estimate,
however, might seem a little too low, given the complexity of the network.
If we look at the plot of N(ǫ) vs. log(1/ǫ) values, we see that it flattens out as log(1/ǫ) approaches
0, i.e., ǫ approaches 1. It may well be that using too fine a grid, i.e., boxes of lengths 2 and 1, is
detecting only the curves. One can see this effect in the table of N(ǫ) values. As ǫ decreases from 4
to 2 to 1, the values of N(ǫ) are not increasing as rapidly as they were for higher values of ǫ.
For this reason, it may be desirable to use only the larger boxes, say, ǫ = 32, 16 and 8. If we look
at only the first three points (from the left) of the plot, they seem to lie close to a line with higher
slope. Indeed, if we perform a least-squares fit on only these three points, we obtain a slope of
D ∼= 1.35 , (60)
which is a significant increase from the previous value.
426
This motivates the use of even larger box sizes. If we use ǫ = 64 and 128 sized boxes, we obtain the
following additional counts:
ǫ N(ǫ)
128 16
64 60
A plot of the logarithms of these values, along with those of the three points used earlier, is shown
below. A least-squares fit through these five points yields a line with slope,
D ∼= 1.64 . (61)
-5 -4 -3 -2 -1 0
log (1/ )
0
1
2
3
4
5
6
7
8
9
10
log
N(
)
Our box-counting method seems to be detecting a set which is thicker than a curve but thinner
than a planar area. That being said, the above analysis may seem somewhat unsettling to the reader
since a definitive result is not obtained. Is the fractal dimension D of the vasculature closer to 1.2?
Or is it closer to 1.6. It might seem that D is closer to 1.6 but we can’t be too precise. One reason is
that we don’t have enough data to answer this question. But the other point that should be made is
that the “fractal scaling” exhibited by the vasculature is dependent upon the scales that we use, i.e.,
the sizes of boxes used, in our covering. Unlike mathematical objects, we cannot go to infinitely small
scales. We have to acknowledge that the scaling properties discussed earlier for mathematical fractals
hold only over a finite range of scales for objects in the real world.
427
Iterated function systems (IFS) and the construction of fractal sets
We now discuss a very convenient and powerful method of constructing and analyzing self-similar
fractal sets – the so-called method of iterated function systems, abbreviated as IFS. The IFS
method will involve the use of a set contractive mappings on the line R, or in the plane R2 or in
3D space R3. as opposed to the generators discussed in the previous lectures. In this way, one doesn’t
have to keep track of line segments and then operating on them. A remarkable aspect of the IFS
method is that one can generate very good pictures of fractals by simply applying the maps in an IFS
in a random manner, as was discussed in Problem Set No. 5.
We’ll illustrate the idea with a simple example – the one, in fact, that was used in Problem Set
No. 5. From that example, we’ll move on to a more general discussion, and then look a little more
closely at the mathematics behind IFS.
Consider the following two maps, f1 and f2, which map the interval I = [0, 1] into itself: For any
x ∈ [0, 1], f1(x) ∈ [0, 1] and f2(x) ∈ [0, 1]:
1. f1(x) = 1
3x with fixed point x̄1 = 0. The iteration dynamics associated with f1(x) is quite
straightforward: For any x0 ∈ [0, 1], xn = fn1 (x0) =
1
3nx0 → 0 as n → ∞.
2. f2(x) =1
3x+ 2
3with fixed point x̄2 = 1. The iteration dynamics associated with f2(x) is also quite
straightforward: The distance between xn+1 = f2(xn) and the fixed point x̄2 = 1 is one-third
the distance between the point xn and x̄2. As such, xn = fn2 (x0) → 1 as n → ∞.
We now examine the (repeated) action of the maps f1 and f2 on the interval I = [0, 1]. Instead of
looking at where each map fi sends a point x ∈ [0, 1], we consider where each map fi will send sets
of points in [0,1]. It is instructive to examine the action of each of the above maps on the interval
[0,1]. To do this, let us define the following associated interval- or set-valued mappings:
Definition: For i ∈ {1, 2} and any subset S ⊆ [0, 1], we denote
f̂i(S) = {fi(x)|x ∈ S} , (62)
In other words, f̂i(S) is the set of all points obtained by applying the mapping fi(x) to all
points x ∈ S.
428
To illustrate:
1. f̂1([0, 1]) = [0, 13]. In other words, f̂1 “shrinks” the interval [0,1] to [0, 1
3].
2. f̂2([0, 1]) = [23, 1]. In other words, f̂1 “shrinks” the interval [0, 1] to [2
3, 1].
It might help to use some pictures. Let’s consider map f1 for the moment. If we let I0 = [0, 1], then
the interval I1 = f̂1(I0) = [0, 13] is sketched below. We then apply f̂1 to the set I1 to produce the set
I2 = f̂1(I1) = [0, 19].
0 1 0
f̂1
I0 I1
00
0
f̂1
f̂1
I1
I2
0
1
3
1
3
1
9
1
27
1
9
I3
I2
In general, n applications of the map f̂1 to the interval I0 produces the set
In = f̂1(I0) =
[
0,1
3n
]
. (63)
Clearly, the intervals In are shrinking in length. Moreover, they appear to be approaching a limit, i.e.,
limn→∞
In = limn→∞
[
0,1
3n
]
= {0} . (64)
They are approaching the single point {0}. Note that this point is the fixed point of f1. We may view
this single point as a set or an interval consisting of one point.
Let’s now consider the map f2. If we let I0 = [0, 1], then the interval I1 = f̂2(I0) = [23, 1] is sketched
below. We then apply f̂2 to the set I1 to produce the set I2 = f̂1(I1) = [89, 1]. This procedure is shown
graphically below.
I2
0 1
I0 I1
1
311
1
I3
8
9
126
27
I1
1
31
I2
18
9
f̂2
f̂2
f̂2
429
In general, n applications of the map f̂2 to the interval I0 produces the set
In = f̂1(I0) =
[
1−1
3n, 1
]
=
[
3n − 1
3n, 1
]
. (65)
Once again, the intervals In are shrinking in length. Moreover, they appear to be approaching a limit,
i.e.,
limn→∞
In = limn→∞
[
1−1
3n, 1
]
= {1} . (66)
They are approaching the single point {1}, which is the fixed point of f2. We may once again view
this single point as a set or an interval consisting of one point.
In summary:
1. Repeated application of the set-valued map f̂1 to the interval I = [0, 1] produces a set of intervals
In which are “shrinking” toward the fixed point x̄1 of f1.
2. Repeated application of the set-valued map f̂2 to the interval I = [0, 1] produces a set of intervals
In which are “shrinking” toward the fixed point x̄2 of f2.
Now, instead of considering the action of each of the set-valued maps f̂1 and f̂2 separately, let’s com-
bine their actions as if they were components of a “Parallel Machine”. We’ll do this as follows:
For any subset S ∈ [0, 1], define that following set-valued mapping,
f̂(S) = f̂1(S) ∪ f̂2(S) . (67)
In other words, the set-valued mapping is the union of the actions of the individual maps f̂1 and f̂2.
Let’s examine the action of f̂ on the set I0 = [0, 1]:
I1 = f̂([0, 1]) = f̂1([0, 1]) ∪ f̂2([0, 1])
=
[
0,1
3
]
∪
[
2
3, 1
]
. (68)
This is shown graphically below:
430
0 1
I0
111
30 2
3
f̂
f̂2(I0)f̂1(I0)
I1
Now apply f̂ to the set I1:
I2 = f̂(I1) = f̂1(I1) ∪ f̂2([I1)
=
([
0,1
9
]
∪
[
2
3,1
3
])
∪
([
2
3,7
9
]
∪
[
8
9, 1
])
=
[
0,1
9
]
∪
[
2
3,1
3
]
∪
[
2
3,7
9
]
∪
[
8
9, 1
]
. (69)
This is shown graphically below:
0 1
I0
1f̂
f̂2(I0)f̂1(I0)
f̂
0 1
3
2
31
I1
I1
I2
0 11
9
2
9
1
3
2
3
7
9
8
9
We see that the repeated application of the “parallel machine” f̂ performs the “middle-
thirds dissection procedure” that was employed in the construction of the ternary Cantor
set C in [0, 1]:
^ ^
I = [0,1]0
I = f ( I )1 0
2 1
C
I = f ( I )
1 0 2 0f ( I ) f ( I )
1 1 2 1f ( I ) f ( I )
1 2f ( C ) f ( C )
^
^
^ ^
^ ^
If we consider the following iteration process involving the parallel map f̂ :
In+1 = f̂(In) = f̂1(In) ∪ f̂2(In) , (70)
then it appears that
limn→∞
In = C , ternary Cantor set in [0,1] . (71)
431
But the story is not over! As shown in the figure above, the ternary Cantor set C is a “fixed
point” of the parallel operator f̂ , i.e.,
C = f̂(C) = f̂1(C) ∪ f̂2(C) . (72)
In other words, f̂ maps the set C to itself.
Recalling that the set-valued maps f̂1 and f̂2 “shrink” sets, we see that:
The ternary Cantor set C is a union of shrunken copies of itself.
We actually noticed this earlier, but we didn’t really specify the maps that produced these copies.
Now, we can identify the maps that produce the copies – the two maps f̂1 and f̂2 that comprise the
“parallel operator” f̂ .
What has been discussed above is a particular example of an iterated function system (IFS). For
the moment, we shall provide a “working definition” of an IFS in Rn. But we must first provide a
couple of other useful definitions.
Distance function/metric in Rn: Let x, y ∈ R
n. We shall let d(x, y) denote the (Euclidean)
distance between x and y. In the special case n = 1,
d(x, y) = |x− y| , x, y ∈ R . (73)
For n ≥ 1, where x = (x1, x2, · · · , xn) and y = (y1, y2, · · · , yn),
d(x, y) = ‖x− y‖2 =
[
∑
k=1
(xk − yk)2
]1/2
, x, y ∈ Rn . (74)
Here, ‖ · ‖2 denotes the Euclidean norm in Rn. (Note: Other distance functions/metrics can be used
but we’ll use the Euclidean distance for simplicity.)
Definition (Contraction Mapping): Let D ⊆ Rn and f : D → D. We say that f is a contraction
mapping on D if there exists a constant 0 ≤ C < 1 such that
d(f(x), f(y)) ≤ Cd(x, y) for all x, y ∈ D . (75)
The smallest C for which the above inequality holds is called the contraction factor of f .
432
In other words, a contraction mapping f maps any two distinct points x and y closer to each other.
Examples: Most of our discussion of IFS will be limited to R and R2, so the following examples
should be sufficient.
1. The maps f1 and f2 examined earlier are contraction mappings on R. Consider f1(x) =1
3x: For
any x, y ∈ R,
d(f1(x), f1(y)) = |f1(x)− f1(y)|
=
∣
∣
∣
∣
1
3x−
1
3y
∣
∣
∣
∣
=1
3|x− y|
=1
3d(x, y) . (76)
In other words, the distance between f1(x) and f2(y) is always one-third the distance between
x and y. The contraction factor for f1(x) =1
3x is C = 1
3.
Now consider f2(x) =1
3x+ 2
3: For any x, y ∈ R,
d(f2(x), f2(y)) = |f2(x)− f2(y)|
=
∣
∣
∣
∣
(
1
3x+
2
3
)
−
(
1
3y +
2
3
)∣
∣
∣
∣
=1
3|x− y|
=1
3d(x, y) . (77)
The contraction factor for f2(x) =1
3x+ 2
3is also C = 1
3.
It will be useful to work with smaller subsets D ⊂ R over which these maps are contractions.
With reference to the Cantor set example studied earlier, we can establish that each of the fi
maps the interval [0, 1] to itself:
(a) For x ∈ [0, 1], f1(x) =1
3x ∈ [0, 1]. Therefore, f1 maps [0,1] to itself.
(b) For x ∈ [0, 1], f2(x) =1
3x+ 2
3∈ [0, 1]. Therefore, f2 maps [0,1] to itself.
We could also use the set-valued versions of these maps to arrive at these results:
433
(a) f̂1 : [0, 1] → [0, 13] ⊂ [0, 1]. Therefore f1 maps [0,1] to itself.
(b) f̂1 : [0, 1] → [23, 1] ⊂ [0, 1]. Therefore f2 maps [0,1] to itself.
Therefore f1 and f2 are contraction maps on the set D = [0, 1].
In general, the following affine map on R,
f(x) = ax+ b , (78)
is a contraction mapping on R if |a| < 1 in which case its contraction factor is C = |a|. For all
x, y ∈ R,
|f(x)− f(y)| = |a| |x− y| , (79)
i.e., the distance between f(x) and f(y) is exactly |a| times the distance between x and y. For
nonlinear maps, such an equality will not exist and the best we can do is to find an inequality
the distances. More on this later.
That being said, in most of the examples and applications examined for the remainder of this
secction, affine maps will be employed.
2. Consider the following class of affine transformations in the plane R2,
f(x) = Ax+ b , (80)
or, in coordinate form,
f(x1, x2) =
a11 a12
a21 a22
x1
x2
+
b1
b2
. (81)
Note that for x,y ∈ R2,
f(x)− f(y) = A(x− y) . (82)
This implies that
d(f(x), f(y)) = ‖f(x)− f(y)‖2
= ‖A(x− y)‖2
≤ ‖A‖2 d(x,y) . (83)
Here, ‖A‖2 denotes the (Euclidean) matrix norm of A, which you may have encountered
in a course on linear algebra. It suffices to state here that a sufficient condition for the affine
mapping f to be contractive is if |λ1| < 1 and |λ2| < 1, where the λi are the eigenvalues of A.
434
Lecture 33
Iterated Function Systems (IFS) and the construction of fractal sets
(cont’d)
We are now in a position to formally define “iterated function systems” (IFS).
Definition (Iterated function system): Let f = {f1, f2, · · · , fN} denote a set of N contraction
mappings on a closed and bounded subset D ⊂ Rn, i.e., for each k ∈ {1, 2, · · ·N}, fk : D → D and
there exists a constant 0 ≤ Ck < such that
d(fk(x), fk(y)) ≤ Ck d(x, y) for all x, y ∈ D . (84)
Associated with this set of contraction mappings is the “parallel set-valued mapping” f̂ , defined as
follows: For any subset S ⊂ D,
f̂(S) =
n⋃
k=1
f̂k(S) , (85)
where the f̂k denote the set-valued mappings associated with the mappings fk. The set of maps f
with parallel operator f̂ define an N -map iterated function system on the set D ⊂ Rn.
We now state the main result associated regarding N -map Iterated Function Systems as defined above.
Theorem: There exists a unique set A ⊂ D which is the “fixed point” of the parallel IFS operator
f̂ , i.e.,
A = f̂(A) =
N⋃
k=1
f̂k(A) . (86)
Moreover, if you start with any set S0 ∈ D (even a single point x0 ∈ D), and form the iteration
sequence,
Sn+1 = f̂(Sn) , (87)
then the sequence of sets {Sn} converges to the fixed-point set A ⊂ D. For this reason, A is known
as the attractor of the IFS.
435
From Eq. (86) is that the set A is self-similar, i.e., A is the union of N geometrically-contracted
copies of itself. We shall be examining this property in a number of examples below.
There are actually two practical consequences of the above result, depending upon one’s perspective:
1. If you have a set of contraction maps f = {fk}Nk=1
, you can quickly construct “pictures” of the
attractor set A. We’ll discuss this in more detail a little later.
2. Given a self-similar, possibly fractal, set S, one may be able to determine the maps {fk} com-
prising the IFS f for which S is the attractor. This will then allow us to construct the “pictures”
of S mentioned in 1. above without having to use “generators.”
Comment: There may be some concern – and rightfully so – about the exact meaning of the state-
ment, “then the sequence of sets {Sn} converges to the fixed point set A ⊂ D”. Recall that whenever
we state that a sequence “converges”, we are implying that elements of the sequence are “getting
closer” to a limit. As such, a distance function, or metric, is needed. In this case, we need a distance
function, or metric, between sets. In this case, an appropriate distance function between (compact)
sets is the so-called Hausdorff metric. It will be defined in a later lecture (purely for supplementary
reasons).
Examples of IFS and their (fractal) attractors
Cantor-like sets on [0,1]
At this point, it is instructive to look at some examples. We have already shown how the Cantor set
C can be viewed as the attractor of a two-map IFS on the space D = [0, 1], namely, the two maps,
f1(x) =1
3x , f2(x) =
1
3x+
2
3. (88)
Recall that both of these maps are contraction maps on [0, 1] with contractivity factors equal to1
3.
This is due to the factor1
3which multiplies x in each map. What would happen if we changed this
factor? For example, consider the two maps,
f1(x) =1
4x , f2(x) =
1
4x+
3
4. (89)
436
Once again, we have f1(0) = 0 and f2(1) = 1. The action of the IFS parallel map f̂ composed of these
two maps on the interval I0 = [0, 1] is as follows:
f̂([0, 1]) = f̂1([0, 1])⋃
f̂2([0, 1])
=
[
0,1
4
]
⋃
[
3
4, 1
]
= I1 . (90)
The action of f̂ on an interval is to remove the middle one-half of the interval:
1
I0
1
4
1
4
I1
f̂1(I0) f̂2(I0)
An application of the IFS parallel map on I1 yields the following result,
f̂(I1) = f̂1(I1)⋃
f̂2(I1)
=
[
0,1
16
]
⋃
[
3
16,1
4
]
⋃
[
3
4,13
16
]
⋃
[
15
16, 1
]
= I2 . (91)
Repeated action of this IFS produces a nested set of sets In which, in the limit n → ∞, converges to
a Cantor-like set – we’ll call it C1/4 – that lies in [0, 1].
This limiting set is clearly not the ternary Cantor set – which would be called C1/3 to be
consistent – but it is a Cantor-like set. In fact, using the methods from the previous on fractal
dimension, it should not be too difficult to see that the fractal dimension of this set is
D =log (no. of copies)
log (1/scaling factor)=
log 2
log 4=
1
2. (92)
We may easily generalize this dissection procedure by considering the following two maps on [0, 1],
f1(x) = rx , f2(x) = r(x− 1) + 1 = rx+ (1− r) , (93)
437
where
0 < r <1
2. (94)
Note that
f1(0) = 0 , f2(1) = 1 . (95)
The action of the associated IFS parallel map f̂ on I0 = [0, 1] is as follows,
f̂([0, 1]) = f̂1([0, 1])⋃
f̂2([0, 1])
= [0, r]⋃
[1− r, 1]
= I1 . (96)
This IFS produces a dissection of [0,1] composed of two intervals of length r, as shown below.
1
I0
r r
I1
f̂1(I0) f̂2(I0)
We saw this iteration procedure earlier in the course in connection with shifted Tent Maps on [0,1].
It produces a set of nested sets In which, in the limit n → ∞, converge to a Cantor-like set Cr in
[0,1]. Once again using the methods of the previous section on fractal dimension, the dimension of
this Cantor set is found to be
D =log (no. of copies)
log 1
r
=log 2
log 1
r
. (97)
Special cases: Note that if we allow the parameter r to be 1
2, then no dissection is performed, i.e.,
f̂([0, 1]) = f̂1([0, 1])⋃
f̂2([0, 1])
=
[
0,1
2
]
⋃
[
1
2, 1
]
= [0, 1] . (98)
438
In other words, we have simply regenerated the interval [0, 1]. As such, the interval [0, 1] is the fixed
point attractor of the IFS operator f̂ . From Eq. (97), the (fractal) dimension of this set is
D =log 2
log 1
1/2
= 1 , (99)
which is consistent with the fact that the attractor is the interval [0, 1].
Let us now examine the case, 1
2< r < 1. (Note that if r = 1, the maps are no longer contractiive.)
Here, the two sets
f̂1([0, 1]) = [0, r] , f̂2([0, 1]) = [1− r, 1] , (100)
intersect. There is no dissection of the interval [0, 1]. The union of these sets produces [0, 1]. Unfor-
tunately, the formula for the fractal dimension is not applicable here since the two sets overlap. The
dimension for the attractor set [0, 1] is 1 for all 1
2≤ r < 1.
The dissection procedure discussed above can be further generalized by allowing the contraction factors
of the two maps to be independent, i.e.,
f1(x) = rx , f2(x) = s(x− 1) + 1 = sx+ (1− s) , (101)
where
0 < r < 1 , 0 < s < 1 and r + s < 1 . (102)
Note that
f1(0) = 0 , f2(1) = 1 . (103)
The action of the associated IFS parallel map f̂ on I0 = [0, 1] is as follows,
f̂([0, 1]) = f̂1([0, 1])⋃
f̂2([0, 1])
= [0, r]⋃
[1− s, 1]
= I1 . (104)
This IFS produces a dissection of [0,1] composed of two intervals, one of length r and the other of
length s as sketched below. (We also saw this iteration procedure in Lecture 22.)
439
1
I0
r s
I1
f̂1(I0) f̂2(I0)
Repeated application of this IFS map will produce a nested set of intervals In which, in the limit
n → ∞, converges to a Cantor-like set Crs ⊂ [0, 1]. From our previous discussion of the fractal
dimension, in particular, the generalized von Koch curves, the fractal dimension Drs of the Cantor-
like set Crs will be the unique solution of the equation,
rD + sD = 1 . (105)
In general, there is no closed form expression for the solution of this equation. In the special case that
0 < r = s < 1
2, however, the above equation becomes
2rD = 1 =⇒ D =log 2
log 1
r
, (106)
which is the result obtained earlier.
We don’t have to limit ourselves to two-map IFS on [0,1] to produce Cantor-like sets – we can
easily have three or more. For example, let us return to the two-map IFS examined earlier,
f1(x) =1
4x , f2(x) =
1
4x+
3
4, (107)
and add a third contractive map, f3 : [0, 1] → [0, 1], to produce the following three-map IFS,
f1(x) =1
4x , f2(x) =
1
4x+
3
4, f3(x) =
1
3x+
1
3, (108)
The map f3(x) is a contractive map with contraction factor C3 = 1
3. You can also check that it has
a fixed point in [0,1], namely, x̄3 = 1
2. The action of the IFS parallel map f̂ composed of these three
440
maps on the interval I0 = [0, 1] is as follows:
f̂([0, 1]) = f̂1([0, 1])⋃
f̂2([0, 1])⋃
f̂3([0, 1])
=
[
0,1
4
]
⋃
[
3
4, 1
]
⋃
[
1
3,2
3
]
= I1 . (109)
Graphically, the result is as follows:
1
I0
1
4
1
3
1
4
I1
f̂1(I0) f̂3(I0) f̂2(I0)
The reader may recognize this as a particular example of the “r-s-t”-type dissection procedure exam-
ined in Problem Set No. 5. Here, r = 1
4, s = 1
3and t = 1
4so that r + s + t = 5
6< 1. Here, we shall
simply state that repeated application of the IFS “parallel operator” f̂ produces a sequence of sets,
In, n ≥ 1, each of which is a union of 3n closed subintervals. (What is the total length of the set In?)
In the limit n → ∞, the sets In converge to a Cantor-like set on [0,1].
441
von Koch curve
In a previous lecture, we showed that the von Koch curve, shown below,
von Koch curve
may be produced by the repeated action of the following generator G,
1
3ll
1
3l
1
3l
1
3l
starting with the set I0 = [0, 1]. We now show how this fractal curve can be generated by an IFS. We
assume, once again, that the leftmost point of the curve is situated at (0,0) and rightmost point at (1,0).
Recall once again that the von Koch curve C is self-similar, i.e., it may be expressed as a union of
four contracted copies of itself. Each contracted copy is one-third the size of C. This self-similarity
could be seen to be built into the set from the generator G that was used to construct it.
The first copy, which starts at the point (0,0), is obtained by shrinking the von Koch curve by a factor
of 1
3toward (0,0) using the following affine map in R
2:
f1(x, y) =
1
30
0 1
3
x
y
. (110)
The second copy, which starts at the point (13, 0) and ends at (1
2,√
3
6), may be obtained by first
shrinking the von Koch curve toward (0,0) with contraction factor 1
3, then rotating it by an angle
442
π3and finally translating it in the x-direction by 1
3. All of these actions are accomplished with the
following affine map,
f2(x, y) =1
3
1
2−
√
3
2√
3
2
1
2
x
y
+
1
3
0
. (111)
The third copy of the von Koch curve, which starts at the point (12,√
3
6), may be obtained by once
again shrinking the von Koch curve toward (0,0) with contraction factor 1
3, then rotating it by angle
−π3and finally translating it to (1
2,√
3
6). all of these actions are accomplished with the following affine
map,
f3(x, y) =1
3
1
2
√
3
2
−
√
3
2
1
2
x
y
+
1
2√
3
6
. (112)
The fourth copy, which ends at (1,0) may be obtained by once again shrinking the von Koch curve
toward (0,0) with contraction factor 1
3and then simply translating it to (2
3, 0). This is accomplished
with the following affine map,
f4(x, y) =
1
30
0 1
3
x
y
+
2
3
0
. (113)
We have achieved our goal: The four contraction maps fi, 1 ≤ i ≤ 4, produce four copies f̂i(C) the
von Koch curve C such that the union of these copies reproduces C, i.e.,
C =
4⋃
i=1
f̂1(C) . (114)
The results are summarized on the next page.
443
von Koch curve
f1(x, y) =
1
30
0 1
3
x
y
+
0
0
f2(x, y) =
1
6−
√
3
6√
3
6
1
6
x
y
+
1
3
0
Contraction factor r = 1
3, rotation π/3, translation.
f3(x, y) =
1
6
√
3
6
−
√
3
6
1
6
x
y
+
1
2√
3
6
Contraction factor r = 1
3, rotation −π/3, translation.
f4(x, y) =
1
30
0 1
3
x
y
+
2
3
0
.
Contraction factor r = 1
3, translation.
444
Sierpinski gasket
The Sierpinski gasket, seen before and shown below, is a union of three copies of itself, so we shall
need three maps in the IFS. Each IFS map fi will be a 1
2contraction with no rotation. The affine
maps are quite easy to determine and are listed below.
Sierpinski gasket
f1(x, y) =
1
20
0 1
2
x
y
+
0
0
Contraction factor r = 1
2, rotation 0.
f2(x, y) =
1
20
0 1
2
x
y
+
1
4√
3
4
Contraction factor r = 1
2, rotation 0, translation.
f3(x, y) =
1
20
0 1
2
x
y
+
1
2
0
Contraction factor r = 1
2, rotation 0, translation.
445
Modified Sierpinski gasket - “Cantor tree”
If we alter the contraction factors of the three affine maps so that the first and third copies touch
the second copy, but do not touch each other, we produce the following fractal set. A horizontal line
intersecting the set will generally intersect it over a Cantor-like set.
Modified Sierpinski gasket - “Cantor tree”
f1(x, y) =
2
50
0 2
5
x
y
+
0
0
f2(x, y) =
3
50
0 3
5
x
y
+
1
5√
3
5
f3(x, y) =
2
50
0 2
5
x
y
+
3
5
0
446
Another modified Sierpinski gasket - “Cantor dust”
If the contraction factors of the three affine maps are adjusted so that there is no intersection of copies,
then the result is a “2D Cantor dust”, a set which is totally disconnected in R2.
Modified Sierpinski gasket - “2D Cantor dust”
f1(x, y) =
2
50
0 2
5
x
y
+
0
0
f2(x, y) =
2
50
0 2
5
x
y
+
3
10
3√
3
10
f3(x, y) =
2
50
0 2
5
x
y
+
3
5
0
447
And yet another modified Sierpinski gasket
The contraction factors of the three maps have now been increased beyond 1
2so that there is overlap-
ping between the copies f̂i(S). This overlapping will occur in a self-similar manner throughout the
set.
Modified Sierpinski gasket with overlap
f1(x, y) =
3
50
0 3
5
x
y
+
0
0
f2(x, y) =
3
50
0 3
5
x
y
+
1
5√
3
5
f3(x, y) =
3
50
0 3
5
x
y
+
2
5
0
448
Modified Sierpinski gasket with rotations
In the following examples, the maps have the general form,
fi(x, y) = r
cos θ − sin θ
sin θ cos θ
x
y
+
b1
b2
Modified Sierpinski gasket with one rotation map
f1(x, y) : r = 0.5 , θ =π
20.
f2(x, y) : r = 0.5 , θ = 0 .
f3(x, y) : r = 0.5 , θ = 0 .
449
Modified Sierpinski gasket with rotations
fi(x, y) = r
cos θ − sin θ
sin θ cos θ
x
y
+
b1
b2
Modified Sierpinski gasket with two rotation maps
f1(x, y) : r = 0.5 , θ =π
20.
f2(x, y) : r = 0.5 , θ = 0 .
f3(x, y) : r = 0.5 , θ =π
20.
450
Modified Sierpinski gasket with rotations
fi(x, y) = r
cos θ − sin θ
sin θ cos θ
x
y
+
b1
b2
Modified Sierpinski gasket with two rotation maps
f1(x, y) : r = 0.5 , θ =π
20.
f2(x, y) : r = 0.5 , θ = 0 .
f3(x, y) : r = 0.5 , θ = −π
20.
451
Sierpinski gasket with an additional map
We now add a fourth map to the Sierpinski gasket IFS. This fourth map is a contraction map with
fixed point at the center of the gasket. The contraction factor is 1
5– small enough to map the entire
triangle into the formerly empty space. Note that these copies are propagated to all “formerly empty”
spots.
Sierpinski gasket with extra map in middle
f1(x, y) =
1
20
0 1
2
x
y
+
0
0
f2(x, y) =
1
20
0 1
2
x
y
+
1
4√
3
4
f3(x, y) =
1
20
0 1
2
x
y
+
1
2
0
f4(x, y) =
1
50
0 1
5
x
y
+
2
5√
3
8
452
“Twin dragon” attractor in R2
This is a well-known set that is the attractor of a two-map IFS in the plane. The fixed points of the
two maps lie on the real line.
f1(x, y) =1√2
1√
2− 1
√
2
1√
2
1√
2
x
y
+
1
0
f2(x, y) =1√2
1√
2− 1
√
2
1√
2
1√
2
x
y
−
1
0
Both affine maps involve (i) a contraction of1√2and (ii) a rotation by
π
4followed by a translation.
The twin-dragon attractor tiles the plane R2. There are no holes in this set. The two copies of this set
f1(A) and f2(A) have been shaded differently so that they can be viewed more easily as contracted
(by 1/√2) and rotated (by π/4) copies of A.
453
Tree-like sets
The following 3-map IFS shows how tree-like objects can be generated. The map f3 generates the
main stem. The other two maps take the stem, translate it upwards and then rotate it in opposite
directions. Of course, these maps operate not only on the stem but on the entire set. For this reason,
the self-similar tree-like attractor set is produced.
Simple tree on [−1, 1] × [0, 2]
f1(x, y) =
0.353 −0.353
0.353 0.353
x
y
+
0.0
0.5
Contraction factor r = 0.5, rotation π/4.
f2(x, y) =
0.353 0.353
−0.353 0.353
x
y
+
0.0
0.5
Contraction factor r = 0.5, rotation −π/4.
f3(x, y) =
0.0 0.0
0.0 0.55
x
y
+
0.0
0.0
“Terminator”: Squash onto y-axis.
454
Tree-like sets (cont’d)
A slight modification of the previous IFS – the maps f1 and f2 no longer have pure rotations, but
shear transformations.
Less simple tree on [−1, 1]× [0, 2]
f1(x, y) =
0.4 −0.433
0.433 0.4
x
y
+
0.0
0.5
Shear transformation
f2(x, y) =
0.4 0.433
−0.433 0.4
x
y
+
0.0
0.5
Shear transformation
f3(x, y) =
0.0 0.0
0.0 0.47
x
y
+
0.0
0.0
“Terminator”: Squash onto y-axis.
455
The epitome of fractal attractors – at least in 1986
This is Prof. Michael Barnsley’s celebrated “spleenwort fern,” the attractor of a four-map IFS.
Barnsley’s Spleenwort Fern
f1(x, y) =
0.0 0.0
0.0 0.16
x
y
+
0.50
0.0
“Terminator”: Squash onto y-axis to make stem.
f2(x, y) =
0.20 −0.26
0.23 0.22
x
y
+
0.40
0.05
f3(x, y) =
−0.15 0.28
0.26 0.24
x
y
+
0.57
−0.12
f4(x, y) =
0.85 0.04
−0.04 0.85
x
y
+
0.08
0.18
456
In the figure below, the action of the IFS maps, denoted as wi, is shown, in order to give the reader an
idea of how the smaller and smaller copies are produced in a geometric cascade as we move upwards
toward the peak of the fern. This cascade is produced by map w4. Map w1, the “terminator”, produces
the stem. Map w2 produces the lower right copy of the fern and map w3 flips the fern and produces
the lower left copy. Some playing around of the map parameters is necessary in order to ensure that
the bottoms of the stems of the two copies produced by w2 and w3 touch the main stem – otherwise,
there would be gaps that propagate throughout the fern. For the same reason, it is important that
the upward translation produced by w4 also touch the main stem.
457
Using IFS to model the real world?
Professor Barnsley’s beautiful discovery gave rise to the question – and the tremendous amount of
research it inspired – of how well IFS could be used to generate sets that approximated real-world
objects. This eventually led to the idea of fractal image coding – a way of representing photos
and videos as attractors of special types of IFS. Early in this research (mid 1980’s and early 1990’s),
fractal image coding was shown to be an effective method of image compression, i.e., reducing the
amount of computer memory required to store a representation of an image, from which it could be
regenerated. (JPEG compression has, and continues to be, a standard method of image compression,
although much more powerful methods of compression exist today. JPEG compression, by the way,
is based on the method of Fourier series representation of functions. It is actually a version of the
discrete cosine transform for discrete – in this case, digital – data sets.)
Methods to generate fractal attractor sets of IFS
We have not yet addressed one important matter regarding IFS and their attractor sets: Once we have
a set of N contraction maps f = {f1, f2, · · · , fn}, how do we produce a picture of the attractor A of
the parallel IFS operator f̂ which they define, i.e., the set which possesses the following self-similarity
property,
A =N⋃
i=1
f̂i(A) ? (115)
In what follows, we describe briefly two principal methods that can be used to construct the fractal
attractor set A of an N -map IFS in Rn.
Random iteration algorithm: In the research literature, this method is known as the “Chaos
Game.” (See the book, Fractals Everywhere, by M.F. Barnsley.) This method, the main ideas of
which were described in a question in Problem Set No. 5, was used to generate the pictures of IFS
attractors presented earlier. We start with a seed point x0 ∈ Rn and perform the following random
iteration procedure:
xn+1 = fσn(xn) , n ≥ 0 . (116)
At each step n, the index σn is chosen randomly and independently from the set of indices {1, 2, · · · , N}.
If the seed point x0 happens to lie in A, then all future xn will also be in A. However, just to be
safe, one should wait for a sufficient number of iterations, say 10 or, better yet, 50, before plotting
458
the points xn. If x0 ∈ A, then, because of the contractivity of the fi maps, future iterates xn will be
attracted to A.
Because the maps fi are chosen at random, the iterates xn will be travelling or (or at least near)
the attractor A in a random way. It is necessary to plot a sufficiently large number of xn so that all
regions of the attractor A are visited.
There still remains the question of what probabilities to employ in the selection of the maps fi.
For many of the “standard” IFS attractors, e.g., von Koch curve, Sierpinski gasket, good results will
be obtained if the maps are chosen with equal probability, i.e., the probability pi of choosing index
i ∈ {1, 2, · · · , N} is pi = 1
N, 1 ≤ i ≤ N . For more complicated sets such as the Spleenwort fern,
however, it is necessary to employ nonuniform probabilities. To see this, note that the “terminator”
map f1 (or w1) for the Spleenwort fern maps the entire attractor A onto the tiny stem situated at the
base of the fern. On the other hand, map f4 (or w4) is responsible for generating about 90% of the
fern in terms of the geometric cascade. As such, it is important that a much higher probability be
assigned to map w4. A rough rule of thumb is that the probability pi of choosing map fi should be in
some way related to the ratio of the area of the copy fi(A) to the area of A.
The idea of probabilities pi being associated with the IFS maps leads to another important con-
cept, that of invariant measures that “live” on their attractors A. Unfortunately, there is no time
to discuss this topic in this course.
On the next page is presented a very simple MATLAB program, “ifs2d.m”, to plot the attractor
of an N -map IFS in R2. The program reads the IFS parameters, i.e., the elements of the matrix A
and vector b defining each affine IFS map, from a file – in this case, the file is called “ifs2d.dat”. A
sample data file is given below the program. Its three lines contain the components of the three maps
which define the IFS with Sierpinski gasket as attractor, given earlier. The output generated from
this data is shown on the next page.
The files ifs2d.m and ifs2d.dat have been posted at the course site on LEARN.
459
% ifs2d.m
% routine to produce plots of attractors sets of 2D
% iterated function systems with probabilities
% using the random iteration algorithm, or "Chaos Game"
% nmaps IFS maps w(i) = A(i)*x + b(i), i=1..nmaps, with probabilities p(i)
% the attractor A of an IFS is presented as a scatter plot
% in the region [xmin,xmax] X [ymin,ymax]
% (the user may have to adjust these values accordingly)
nmaps=3;
niter=20000;
xmin=0.0;
xmax=1.0;
ymin=0.0;
ymax=1.0;
kndx=zeros(1,1,’uint8’);
% these vectors will store the x and y coordinates of the points
% generated on the attractor
xx=zeros(niter,1);
yy=zeros(niter,1);
% these vectors store the IFS parameters
a11=zeros(nmaps,1);
a12=zeros(nmaps,1);
a21=zeros(nmaps,1);
a22=zeros(nmaps,1);
b1=zeros(nmaps,1);
b2=zeros(nmaps,1);
p=zeros(nmaps,1);
% input IFS parameters from a data file
[a11,a12,a21,a22,b1,b2,p] = textread(’ifs2d.dat’,’%f %f %f %f %f %f %f’,nmaps);
% start with (0,0) and iterate first IFS map until points get close to its
% fixed point (which is a point on the attractor)
x=0.0;
y=0.0;
for i=1:50
x1=a11(1)*x + a12(1)*y + b1(1);
y1=a21(1)*x + a22(1)*y + b2(1);
460
x=x1;
y=y1;
end
% now continue random iteration of IFS over points on attractor
% here, the IFS maps are chosen with equal probabilities
% this program can be modified so that the ith IFS map is chosen
% with probability p(i)
for i=1:niter
xran=rand;
kndx=round(nmaps*xran+0.5);
kk(i)=kndx;
x1=a11(kndx)*x + a12(kndx)*y + b1(kndx);
y1=a21(kndx)*x + a22(kndx)*y + b2(kndx);
x=x1;
y=y1;
xx(i)=x;
yy(i)=y;
end
% plot the attractor
figure(1)
scatter(xx,yy,’.’),xlim([xmin xmax]),ylim([ymin ymax]);
SAMPLE FILE "ifs2d.dat" (Sierpinski gasket)
0.5 0.0 0.0 0.5 0.0 0.0 0.3333
0.5 0.0 0.0 0.5 0.25 0.433 0.3333
0.5 0.0 0.0 0.5 0.5 0.0 0.3333
461
0 0.2 0.4 0.6 0.8 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Output from MATLAB program ifs2d.m using data from ifs2d.dat from previous page: TheSierpinski gasket attractor.
462
Deterministic algorithm: Recall how the IFS “parallel operator” f̂ associated with a set of N
contraction maps fi acts on sets to produce sets: For a set S ∈ D (where D ⊂ Rk is our region of
interest),
f̂(S) =
N⋃
i=1
f̂i(S) . (117)
In other words, f̂ produces N contracted copies of S. Also recall that for any S ∈ D, the iterates of
S under the action of f̂ converge to the attractor/fixed point A of the IFS:
limn→∞
f̂n(S) = A = f̂(A) =N⋃
i=1
f̂i(A) . (118)
We can start the deterministic algorithm with a seed point x0 ∈ Rn, which defines our set S0. The
action of the IFS parallel operator on S0 is to produce a set S1 consisting of N (or possibly less)
points, i.e.,
S1 = f̂(S0) = f̂(x0) =
N⋃
i=1
fi(x0) . (119)
Applying the IFS parallel operator f̂ on S1 will produce a set S2 consisting of N2 (or possibly less)
points, i.e.,
S2 = f̂(S1) =
N⋃
j=1
fj
(
N⋃
i=1
fi(x0)
)
=N⋃
j=1
N⋃
i=1
(fj ◦ fi)(x0) . (120)
The reader should see the pattern. N applications of the IFS parallel operator f̂ will produce a set
Sn consisting of (at most) Nn points,
Sn = {(fi1 ◦ fi2 ◦ · · · ◦ fin)(x0) , i1, i2, · · · , in ∈ {1, 2, · · · , N} } . (121)
If the point x0 ∈ A, the attractor of the IFS, then all points in S1, S2, etc., will lie in A. So if
you happen to know a point in A, it’s good to use it. But even if x0 is not in A, the contractivity
of the fi will bring the points in Sn closer and closer to A as n increases. What is more important,
however, is to generate a sufficient number of points to ensure that most of the set A is visited by them.
The above algorithm corresponds to taking all possible Nn paths from x0 down an N -tree to the
Nn points which comprise the set Sn. This can be done by means of a recursive calling of a subroutine,
provided that the computer language you are using supports recursion.
463