Ohrimenko+ / Barnsley. Superfractals
.pdf
60 |
Codes, metrics and topologies |
Figure 1.27 The shortest-distance function associated with a fern image is illustrated by variously coloured level curves, each corresponding to a different distance from the fern.
shortest-distance functions are found typically to be straight-line segments, as illustrated below in Exercise 1.12.6; more generally they may lie along geodesics.
E x e r c i s e 1.12.6 In R2 let L0 denote the line y = − 14 and let F denote the point (0, 14 ). Show that the level curves of DL0 F (x, y) have discontinuous gradients on the parabola P defined by y = x2, and sketch the paths of steepest descent. Notice that F is the focus of the parabola, while L0 is its directrix.
As a slightly more complicated example, we consider the shortest-distance function DP (x, y) of (part of) the parabola P in R2 arising in Exercise 1.12.6. P is defined by (x0, y0) P iff
y0 = x02. |
(1.12.1) |
1.12 The Hausdorff metric |
61 |
Figure 1.28 The level sets of a shortest-distance function provide a visually appealing way of filling up blank space in a drawing. Such patterns are used in aboriginal art. See for example Jack Jakamarra Ross et al., ‘Karrku Jukurrpa, 1996’, acrylic on canvas, shown on p. 203 in Howard Morphy, Aboriginal Art, Phaidon Press, London, 1998.
Let (x1, y1) R2 be given and let (x0, y0) be the point of P closest to (x1, y1). From elementary coordinate geometry we know that (x1, y1) lies on the normal to the
parabola at (x0, y0). At (x0, y0) P the slope of the parabola is dy/d x|(x0,y0) = 2x0, so the slope of the normal to P at (x0, y0) is −1/(2x0). It follows that
y |
− |
y |
|
−1 |
(x |
1 − |
x |
|
). |
(1.12.2) |
|
|
|
||||||||
1 |
|
0 = 2x0 |
|
0 |
|
|
||||
At the point (x1, y1) on the level set (curve) Ld we must also have |
|
|||||||||
(x1 − x0)2 + (y1 − y0)2 = d2. |
(1.12.3) |
|||||||||
We now use Equations (1.12.1), (1.12.2) and (1.12.3) to express both x1 and y1 in terms of x0 and d. We find, from consideration of the geometry, see Figure 1.29, that
x1 = x0 ± |
|
|
|
|
2x0d |
|
|
, |
|||
|
|
|
|
|
|
|
|||||
2 |
1 |
|
|
2 |
|
||||||
|
|
( |
+ |
4x0 |
|||||||
|
|
|
|
|
|
|
|
||||
|
2 |
|
|
|
|
|
d |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
y1 = x0 |
|
|
|
|
|
|
, |
||||
2 |
|
1 |
|
4x02 |
|||||||
|
|
( |
|
+ |
|
|
|
|
|||
62 |
Codes, metrics and topologies |
Figure 1.29 This illustrates the locations of points at (shortest) distance d from the point (x0, y0) on the parabola y = x 2.
where it is assumed that d ≥ 0 and that x1 and x0 are either both positive or both negative. The upper sign corresponds to points outside the parabola while the lower sign corresponds to points inside the parabola. In the latter case we find that for x1 to be positive when x0 is positive we must have
1 − |
|
|
|
2d |
|
≥ 0, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
2 |
|
+ |
2 |
|
|
|
|
|
|
|
|
||||
|
|
(1 |
4x0 |
|
√ |
|
|
|
√ |
|
|
||||
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
2 |
|
2 |
|||||
which implies that, when d ≥ 2 |
, x0 |
jumps from |
2 |
4d |
|
− 1 to − |
2 |
4d − 1 as |
|||||||
|
|
|
|||||||||||||
(x1, y1) crosses from x1 > 0 to x1 < 0. Hence, while DP (x, y) is continuous for all (x, y) R2, grad DB (x, y) is discontinuous when x = 0 and y > 12 . This discontinuity is illustrated in Figure 1.30. These different renderings of DP (x, y) show that elementary coordinate geometry may be colourful, beautiful, and mysterious.
E x e r c i s e 1.12.7 Analyze DP (x, y) when the underlying metric is
dmax((x1, y1), (x2, y2)) = max{|x1 − x2|, |y1 − y2|}.
What do the level sets look like? Show that in this case DP (x, y) has discontinuities
where |y − x |
2 |
|
2 |
|
|
|
|
|
|||
|
| = |√y − x| and make a sketch of this set of points. You will be |
||||
delighted how neatly everything works out. |
|||||
E x e r c i s e 1.12.8 |
Analyze the shortest-distance function DE (x, y) for the |
||||
ellipse E defined by (x0, y0) E iff 4x02 + y02 = 4.
1.12 The Hausdorff metric |
63 |
Figure 1.30 Approximate level sets for the shortest distance function for part of the parabola y = x 2. The exact level sets are differentiable curves close enough to the parabola. But inside the parabola, on the axis of symmetry, they have a discontinuous first derivative for y > 0.5.
The distance from one set to another
In this subsection we complete the definition of the Hausdorff metric.
D e f i n i t i o n 1.12.9 Let (X, dX ) be a metric space. Let H(X) denote the space of nonempty compact subsets of X. The distance from A H(X) to B H(X) is defined by
DB (A) := max{DB (a) : a A} for all A, B H(X).
Again, this definition makes sense because DB (x) is a continuous function of
x A and A is compact, so there must exist a point |
a A such that |
D |
B ( a ) ≥ |
DB (a) for all a A. |
& |
& |
In Figure 1.31 we illustrate a visual, ‘optical’, way of calculating and thinking about the function DB : H(X) → [0, ∞) when X = R2. The top left panel illustrates the interaction between the shortest-distance functions for a fern-like subset of R2 and a square subset. The level sets of the shortest-distance function for the fern-like subset are coloured in various intensities of turquoise. Specifically, the level set Ld is coloured according to red = 0, green = d, blue = d, for d = 0, 1, 2, . . . , 255. Superimposed upon this picture, in the red bitplane, is a picture of a square, coloured according to red = 200, green = 0, blue = 0. The result is that the brightest points on the square are those that are at the greatest distance from the fern. That is, each point &a on the square which is brightest,
64 |
Codes, metrics and topologies |
Figure 1.31 Level sets of shortest-distance functions for a fern-like set and a square set. See the main text. If each red band in the lower left panel corresponds to one unit of distance, what is (approximately) the greatest shortest distance from the fern to the square, Dsquare(fern)?
somewhere in the white part of the square, occurs where Dfern(square) = Dfern(&a ); see Figure 1.26. An optical device could in principle be used to find the brightest points.
In practice, some digital image processing effects can be seen in the top left panel of Figure 1.31; they are quantization bands associated with the printing and render this description even more approximate than it would otherwise be.
The bottom left panel in Figure 1.31 illustrates the shortest-distance functions for both the fern and the square, with the level sets of the latter represented in shades of red. See also Figure 1.33.
The following theorem provides a kind of triangle inequality for the function DB (A).
1.12 The Hausdorff metric |
65 |
T h e o r e m 1.12.10 Let (X, dX ) be a metric space and H(X) denote the nonempty compact subsets of X. Then
DB (A) ≤ DB (C) + DC (A) for all A, B, C H(X).
P r o o f For any a A we have
DB (a) = b B |
b) |
|
|
|
|
|
|
|
|||
min d(a, |
|
|
|
|
|
|
|
|
|
||
min(d(a, |
c) |
+ |
d(c, b)) |
|
for all c C, |
|
|||||
≤ b |
|
B |
|
|
|
|
|||||
= d(a, c) + b |
|
|
B d(c, b) |
|
for all c C. |
|
|||||
|
|
|
min |
|
|
|
|
|
|||
It follows that |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c) + c C b B |
|
|||||
DB (a) ≤ c C |
|
|
|
|
|||||||
|
|
min d(a, |
|
|
max min d(c, b) |
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
= DC (a) + DB (C) |
for all a A. |
|
|||||||||
Now take the maximum over a A on both sides of this equation. |
|
||||||||||
E x e r c i s e 1.12.11 Show that |
|
|
|
|
|
|
|
|
|
||
DA(B C) = max{DA(B), DA(C)} |
for all A, B, C H(X). |
|
|||||||||
Draw a picture to illustrate the content of this equation.
E x e r c i s e 1.12.12 Show that
DA B (C) ≤ min{DA(C), DB (C)} for all A, B, C H(X).
Draw a picture to illustrate the content of this equation.
Finally we are in a position to define the Hausdorff metric.
T h e o r e m 1.12.13 Let (X, dX ) be a metric space and H(X) denote the nonempty compact subsets of X. Let
dH(X)(A, B) := max{DB (A), DA(B)} for all A, B H(X).
Then (H(X), dH(X)) is a metric space.
P r o o f We write dH(X) = dH . We will demonstrate with reference to Definition 1.5.1 that dH is indeed a metric on the space H(X). (i) dH (A, B) = max{DB (A), DA(B)} = max{DA(B), DB (A)} = dH (B, A). (ii) and (iii) Notice that dH (A, B) equals either DB (A) or DA(B). Hence, using the compactness of A and B and the continuity of d(x, y), it then follows that dH (A, B) =
d(a, b ) for some a A and b B. It then follows that 0 ≤ dH (A, B) < ∞. |
||
& |
& |
& |
& |
|
|
|
= |
|
Suppose that A B. Then, without loss of generality, we can assume that |
||
there exists |
a point |
a A such that a / B. Hence DB (A) = max{DB (a) : |
a A} > 0 |
and so |
dH (A, B) > 0. (iv) From Theorem 1.12.10 we have |
66 |
Codes, metrics and topologies |
that |
DB (A) ≤ DC (A) + DB (C) and that DA(B) ≤ DA(C) + DC (B). Hence |
dH (A, B) ≤ max{DC (A) + DB (C), DA(C) + DC (B)} ≤ max{DC (A), DA(C)} +
max{DB (C), DC (B)} = dH (A, C) + dH (C, B). |
|
D e f i n i t i o n 1.12.14 The metric dH = dH(X) |
is called the Hausdorff |
metric. The quantity dH (A, B) is called the Hausdorff distance between the points A, B H(X).
We remark as an aside that it is possible to define a type of ‘distance’ between any pair of bounded subsets of a metric space by replacing the maximum and minimum operators by supremum and infimum operators, which are defined as follows. When S R is a bounded set then inf S = max{x R : x ≤ s for all s S}, and similarly sup S = min{x R : x ≥ s for all s S}. But the result is not a metric, in general. For example the ‘distance’ between an open set O and its closure O is zero but it is not true in general that O = O.
The following theorem provides a characteristic but at first sight somewhat suprising property of the Hausdorff distance. It will be most useful later on.
T h e o r e m 1.12.15 Let (X, dX ) be a metric space and H(X) denote the nonempty compact subsets of X. Then
dH (A B, C D) ≤ max{dH (A, C), dH (B, D)}
for all A, B, C, D H(X).
P r o o f First we verify the claim in Exercise 1.12.11: we have
DA(B |
C) |
= x B C a A |
|
|
|
|
|
max |
min d(a, x) |
|
|
|
|
|
|
|
|
b), |
c C a A |
c) |
|
|
= max b B a A |
||||
|
|
|
max min d(a, |
|
max min d(a, |
|
= max{DA(B), DA(C)}.
It follows that
DA B (C D) = max{DA B (C), DA B (D)}. |
(1.12.4) |
Now we verify the claim in Exercise 1.12.12: we have
DA B (C) = c C x A B |
d(c, x) |
= c C |
a A |
b B |
|
||||
≤ |
max min |
|
max min |
min d(c, a), min d(c, b) |
|
||||
min |
c C a A |
|
a), |
c C b B |
|
|
|||
|
max min d(c, |
|
max min d(c, b) |
|
|
||||
= min{DA(C), DB (C)}. |
|
|
|
|
|||||
It follows that |
|
|
|
|
|
|
|
|
|
DA B (C) ≤ DA(C) |
|
and |
DA B (D) ≤ DB (D). |
|
|||||
1.12 The Hausdorff metric |
67 |
Substituting from the latter pair of equations into the right-hand side of Equation (1.12.4) we obtain
DA B (C D) ≤ max{DA(C), DB (D)}. |
|
It follows that |
|
DC D (A B) ≤ max{DC (A), DD (B)}. |
|
Hence |
|
dH (A B, C D) = max{DA B (C D), DC D (A B)} |
|
|
≤max max{DA(C), DB (D)}, max{DC (A), DD (B)}
≤max{DA(C), DB (D), DC (A), DD (B)}
|
|
=max max{DA(C), DC (A)}, max{DD (B), DB (D)}
=max{dH (A, C), dH (B, D)}.
The metric space (H(X), dH ) inherits properties from the underlying metric space (X, d). For example, in Section 1.13, we show that if (X, d) is complete then (H(X), dH ) is complete. Also, if (X, d) is compact then (H(X), dH ) is compact and, under certain conditions, when (X, d) is connected then (H(X), dH ) is connected. The inheritance of completeness is of particular importance to us because it leads to beautiful simple proofs of the existence of many fractals and superfractals.
E x e r c i s e 1.12.16 Let A = {(x, y) R2 : x2 + y2 = 1} and B = {(x, y) R2 : y = 0, 0 ≤ x ≤ 1}. Compute dH (A, B) when the underlying metric is the euclidean metric.
E x e r c i s e 1.12.17 |
Suppose that A B. Show that dH (A, B) = DA(B). |
E x e r c i s e 1.12.18 |
Estimate the Hausdorff distance dH (A, B) between the |
two sets A and B, which look like leaves, in Figure 1.32. Assume that the
underlying metric is d |
. Mark on the figure a pair of points a, b such that |
||||
d(a, b ) = dH (A, B). |
max |
|
|
& |
& |
& & |
Let ( |
X |
, d) be a metric space and let |
|
|
E x e r c i s e 1.12.19 |
|
|
|||
d)H (A, B) = DB (A) + DA(B) for all A, B H(X).
Prove that (H(X), d)H ) is a metric space.
Dilations of sets
In this subsection we explore an alternative characterization of the Hausdorff metric that has an ‘optical’ interpretation.
68 |
Codes, metrics and topologies |
Figure 1.32 See Exercise 1.12.18: a pair of points &a,&b, one on each leaf, whose distance apart is equal to the Hausdorff distance between the leaves is to be located.
Given C H(X) and r [0, ∞] we define the set C dilated by r to be
BC (r ) = {x X : DC (x) ≤ r } = {B(x, r ) : x C}.
That is, BC (r) is obtained by taking the union of all closed balls of radius r centred at points of C. Clearly BC : [0, ∞] → S(X) (the set of subsets of X) and BC (r ) is an increasing family of subsets (i.e. r1 < r2 = BC (r1) BC (r2)) with BC (0) = C and BC (∞) = X. We refer to these subsets as dilations of C. We can characterize the Hausdorff distance in terms of dilations in the following manner.
T h e o r e m 1.12.20 Let (X, d) be a complete metric space and let (H(X), dH ) denote the corresponding space of compact nonempty subsets that has the Hausdorff metric. Then, for given C, D H(X), dH (C, D) is the minimum value of r such that the dilation of C by r contains D and the dilation of D by r contains C.
P r o o f We leave this as an exercise, or else see [9].
Notice in particular that
D BC (dH (C, D)) and C BD (dH (C, D)) for all C, D H(X). (1.12.5)
We will use this observation below in the proof of Theorem 1.13.2.
1.12 The Hausdorff metric |
69 |
One reason why we are interested in characterizing the Hausdorff distance in terms of dilations is that, at least in the case of R2 with the euclidean metric, dilations of bounded sets may be computed by means of optical algorithms; see for example [93]. In the future, it may be possible to compute rapidly Hausdorff distances between images using optical computation.
It is not suprising that optical algorithms can be used to compute dilations. If you are shortsighted then, roughly speaking, dots at a fixed distance from the eye, close to the optical axis, are blurred to become, upon the retina, small disks of some radius ρ. A viewed flat object at the same distance, in a plane perpendicular to the optical axis, treated as a collection of dots, is similarly blurred, yielding upon the retina the dilation by ρ of the object.
Indeed, suppose we represent bounded subsets of R2 as black pictures against a white background. Suppose we ‘look at’ these pictures from various distances d with eyes or a camera of fixed resolving power. Then the effective dilation ρ of the pictures becomes greater when we look at them from further away. Let d&(A, B) denote the smallest distance from the plane at which the pictures of two subsets A, B are indistinguishable. Then roughly speaking d&(A, B) = f (dH (A, B)) for all A, B H(X), where f : [0, ∞) → [0, ∞) is a monotone increasing function.
E x e r c i s e 1.12.21 Prove that BC (r) X is compact for all C H(X) and r ≥ 0.
We illustrate the application of dilations to the computation of the Hausdorff distance between pairs of compact sets with the aid of Figure 1.33. This illustrates the shortest-distance functions for three (nonempty compact) sets: a green fern, a red Sierpinski triangle and a blue square. Equivalently it represents increasing families of dilated sets. The outer boundaries of an increasing family of dilations of the green fern are illustrated in shades of green (in the green bitplane). The outer boundaries of an increasing family of dilations of the red Sierpinski triangle are illustrated in shades of red and boundaries of successive dilations of the blue square are represented in shades of blue. Figure 1.33 is the image that results when the red, green and blue bitplanes are superimposed.
Now imagine that each coloured band in Figure 1.33 represents one unit of distance. Then, by counting blue bands out from the square until the fern is engulfed, that is, reading off the minimum value of r such that Bsquare(r ) fern we find that Dsquare( fern) 8. Similarly, by counting out the green bands from the fern until the square is engulfed, we obtain Dfern(square) 3. Hence dH ( fern, square) 8. In a similar manner we find that Dsquare(Sierpinski) 4.5 and DSierpinski(square) 6.5, so that dH (square, Sierpinski) 6.5. Also, we find that Dfern(Sierpinski) 3.5, DSierpinski( fern) 9 and dH ( fern, Sierpinski) 9. The triangle inequality tells us that
dH ( fern, Sierpinski) ≤ dH ( fern, square) + dH (square, Sierpinski), which in the present case reads 9 ≤ 8 + 6.5.
