# Handbook of Computational Geometry

##### This Page Intentionally Left Blank HANDBOOK OF C O M PU TAT I O NAL GEOMETRY E d i t e d by J.-R. Sack Carleton U

2,018 959 44MB

Pages 1087 Page size 468 x 684 pts Year 2010

##### Citation preview

HANDBOOK OF COMPUTATIONAL GEOMETRY

HANDBOOK OF C O M PU TAT I O NAL GEOMETRY

E d i t e d by

J.-R. Sack Carleton University, Ottawa, Canada

J. Urrutia Universidad Nacional Aut6noma de M~xico, M(xico

N 2000 ELSEVIER Amsterdam

• Lausanne

• New

York

• Oxford

• Shannon

• Singapore

• Tokyo

E L S E V I E R S C I E N C E B.V. S a r a B u r g e r h a r t s t r a a t 25 P.O. B o x 211, 1000 A E A m s t e r d a m , T h e N e t h e r l a n d s

2000 Elsevier Science B.V.

A l l rights r e s e r v e d .

First e d i t i o n

2000

Library of Congress Cataloging-in-Publication Data A c a t a l o g r e c o r d f r o m the L i b r a r y o f C o n g r e s s has b e e n a p p l i e d for.

ISBN: 0 444 82537 1

G T h e p a p e r u s e d in this p u b l i c a t i o n m e e t s the r e q u i r e m e n t s o f A N S I / N I S O Z 3 9 . 4 8 - 1 9 9 2 ( P e r m a n e n c e o f Paper). P r i n t e d in T h e N e t h e r l a n d s

Computational Geometry is a young and vibrant field of Computer Science born in the early 1970’s. Since its beginning, Computational Geometry has attracted the interest of a large number of researchers, due to its numerous and strong interactions with various fields of Science and Engineering such as Algorithms and Data Structures, Combinatorial Mathematics, Euclidean Geometry, and Optimization. Recently the demand for efficient geometric computing in a variety of areas of applied sciences such as Geographical Information Systems, Visualization, Robotics, Computer Graphics, and CAD has further fueled research in Computational Geometry. This has resulted in a wealth of powerful techniques and results of interest to researchers and practitioners. The need for a comprehensive source of information on the fundamental techniques and tools developed in Computational Geometry is evident. This handbook will be an important source of information for all of us interested in one way or another in Computational Geometry. Readers whose objectives are to use a method for their applications will be able to find and choose different approaches and techniques to solve a large number of problems, most of them described in a comprehensive and concise manner. Researchers interested in theoretical results will find this handbook an invaluable and comprehensive source of information in which most of the results, tools and techniques available in our field are to he tound. This handbook presents chapters which survey in detail most of the research available to date in this field. The handbook contains survey papers in the following fundamental topics: Arrangements, Voronoi Diagrams, Geometric Data Structures (incl. point location, convex hulls, etc.), Spatial Data Structures, Polygon Decomposition, Randomized Algorithms, Derandomization, Parallel Computational Geometry (deterministic and randomized). Visibility, Art Gallery and Illumination Problems, Closest Point Problems, Link Distance Problems. Similarity of Geometric Objects. Davenport-Schinzel Sequences, and Spanning Trees and Spanners. There are also three chapters devoted to applications of Computational Geometry to other fields of science: Geographical Information Systems, Geometric Shortest Paths and Network Optimization, and Mesh Generation. In addition, there is a chapter devoted to robustness and numerical issues, and chapters on Animation and Graph Drawing. We would like to thank for the enthusiasm shown by all the contributors to this handbook, as well as express our gratitude to the numerous anonymous referees whose invaluable contributions made this project possible. We are grateful to Arjen Sevenster of Elsevier Science for his enthusiastic support which made this handbook a reality. Finally, we thank Anil Maheshwari for his help. J.-R. Sack J. Urrutia

List of Contributors Agarwal, P.K., Duke University, Durham, NC (Chs. 1 , 2 ) Alt, H., Freie Univer.sitat Berlin, Berlin (Ch. 3) Asano, T., Japan Advanced Institute ofscience and Technology, Ishikawu (Ch. 19) Atallah, M.J., Purdue University, West Lafayetre, IN (Ch. 4) Aurenhammer, F., Technische Universitat Grae, Graz (Ch. 5 ) Bern, M., Xerox Palo Alto Research Center; Pa10 Alto, CA (Ch. 6 ) Chen, D.Z., University of Notre Dame, Notre Dame, IN (Ch. 4) De Floriani, L., Universita di Genova, Genova (Ch. 7 ) Djidjev, H.N., University cf Wanvick, Coventry (Ch. 12) Dobkin, D.P., Princeton University, Princeton, NJ (Ch. 8) Eppstein, D., University of California, Iwine, CA (Ch. 9) Ghosh, S.K., Tutu Institute qf Fundcimental Research, Bombay (Ch. 19) Goodrich, M.T., Johns Hopkins University, Baltimore, M D (Ch. 10) Guibas, L.J., Stanford University Stcmti,rd. CA (Ch. 3 ) Hausner, A,, Princeton Universitj: Princeton. NJ (Ch, 8 Kzil, J.M., Utiitzer,sitvc!f’Sa.skutc,hc~varr, Suskutonn. SK (Ch. i 1 ) Klein, K., F p t n Universitiit Hugen, f f u g r n (Ch. S 1 Magillo, P., I h ~ r r . s i t idi~ G m m u Grrrow (CII.7 ) Mahebhwari, A,, Carieron University, Ottawa, ON (Ch. 12j MatouSek, J., Charles Universiq, Prtiha (Ch. 13) Mitchell, J.S.B.. State Universiq ($New York, Stony Brook, NY (Ch. 15) Mulmuley, K., The University of Chicago, Chicago, IL, and l.l.i?,Bombay (Ch. 16) Nievergelt, J., ETH Zurich, Zurich (Ch. 17) Plassmann, P., Pennsylvnnia State University, University Park, PA (Ch. 6 ) Puppo, E., Universitu di Genova, Genova (Ch. 7 ) Ramaiyer, K., Infbrmix Sfhvare, Oakland, CA (Ch. 10) Reif, J.H., Duke University, Durham, NC (Ch. 18) Sack, J.-R., Carleton University, Ottawa, ON (Ch. 12) Schirra, S., ~ ~ i x - p l ~ i t i c k - l n s t i t uInfiirmatik, tfur Saarbrucken (Ch. 14) Sen, S., Indian Institute of Technology, New Delhi (Ch. IS) Sharir, M., Tel Aviv University, Tel Aviv, and New York University, New York, NY (Chs. 1,2) Shermer, T.C., Simon Fruser University, Burnaby, BC (Ch. 19) Smid, M., University ofMagdeburg, Magdeburg (Ch. 20) Tamassia, R., Brown UniversiQ, Providence, RI (Ch. 21) Urrutia, J., Universidad Nacional Autcinonza de MPxico, MPxico (Ch. 22) Widmayer, P., ETH Zurich, Zurich (Ch. 17) vii This Page Intentionally Left Blank Contents Preface List of Contributors V vii 1. Davenport-Schinzel sequences and their geometric applications l? K. Aganval and M. Sharir 2. Arrangements and their applications l? K. Aganval and M. Sharir 3. Discrete geometric shapes: M a h i n g , interpolation, and approximation H . Alt and L.J. Guibas 4. Deterministic parallel computational geometry M.J. Atallah and D.Z. Chen 5 . Voronoi diagrams E Aurenhammer and R. Klein 6. Mesh generation M. Bern and P. Plassmann 7. Applications of computational geometry to geographic information systems L. de Floriani, l? Magillo and E. Puppo 8. Making geometry visible: An introduction to the animation of geometric algorithms A. Hausner and D.P. Dobkin 9. Spanning trees and spanners D. Eppste in 10. Geometric data structures M. 7: Goodrich and K. Ramaiyer 1 1. Polygon decomposition J.M. Keil 12. Link distance problems A. Maheshwari, J.-R. Sack and H.N. Djidjev 13. Derandomization in computational geometry J. Matoufek 14. Robustness and precision issues in geometric computation S. Schirra 15. Geometric shortest paths and network optimization J.S. B. Mitchell 16. Randomized algorithms in computational geometry K. Mulmuley ix 1 49 121 155 20 1 29 1 333 389 425 463 49 1 519 559 597 633 703 x Contents 17. Spatial data structures: Concepts and design choices 725 J. Nievergelt and P. Widmayer 18. Parallel computational geometry: An approach using randomization 765 J.H. Reif and S. Sen 19. Visibility in the plane 829 T. Asano, S.K. Ghosh and T.C. Shermer 20. Closest-point problems in computational geometry 877 M. Smid 21. Graph drawing 937 R. Tamassia 22. Art gallery and illumination problems 973 J. Urrutia Author Index Subject Index I-1 1-35 CHAPTER 1 Davenport-Schinzel Sequences and Their Geometric Applications* Pankaj K. Agarwal Center for Geometric Computing, Department of Computer Science, Box 90129, Duke University, Durham, NC 27708-0129, USA E-mail:[email protected] Micha Shark School of Mathematical Sciences, Tel Aviv University, Tel Aviv 69978, Israel, and Courant Institute of Mathematical Sciences, New York University, New York, NY 10012, USA E-mail: [email protected] tau. ac. il Contents 1. Introduction 2. Davenport-Schinzel sequences and lower envelopes 2.1. Lower envelopes of totally defined functions 2.2. Lower envelopes of partially defined functions 2.3. Constructing lower envelopes 3. Simple bounds and variants 4. Sharp upper bounds on A^ («) 4.1. Ackermann's function — A review 4.2. The upper bound for A.3(«) 4.3. Upper bounds onXgin) 5. Lower bounds on A^Cn) 6. Davenport-Schinzel sequences and arrangements 6.1. Complexity of a single face 6.2. Computing a single face 6.3. Zones 6.4. Levels in arrangements . . . . . , 3 4 4 7 8 9 11 11 12 16 16 20 21 23 27 28 *Both authors have been supported by a grant from the U.S.-Israeli Binational Science Foundation. Pankaj Agarwal has also been supported by a National Science Foundation Grant CCR-93-01259, by an Army Research Office MURI grant DAAH04-96-1-0013, by a Sloan fellowship, and by an NYI award and matching funds from Xerox Corporation. Micha Sharir has also been supported by NSF Grants CCR-91-22103 and CCR-93-11127, by a Max-Planck Research Award, and the Israel Science Fund administered by the IsraeU Academy of Sciences, and the G.I.F., the German-Israeli Foundation for Scientific Research and Development. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved 1 2 RK. Agarwal and M. Sharir 7. Miscellaneous applications 7.1. Applications of D5(n, 2)-sequences 7.2. Motion planning 7.3. Shortest paths 7.4. Transversals of planar objects 7.5. Dynamic geometry 7.6. Hausdorff distance and Voronoi surfaces 7.7. Visibility problems 7.8. Union of Jordan regions 7.9. Extremal {0, l}-matrices 8. Concluding remarks References Abstract An {n,s) Davenport-Schinzel sequence, for positive integers n and 5, is a sequence composed of n distinct symbols with the properties that no two adjacent elements are equal, and that it does not contain, as a (possibly non-contiguous) subsequence, any altemation a- -b-' a- • b- " of length s -\-2 between two distinct symbols a and b. The close relationship between Davenport-Schinzel sequences and the combinatorial structure of lower envelopes of collections of functions make the sequences very attractive because a variety of geometric problems can be formulated in terms of lower envelopes. A near-linear bound on the maximum length of Davenport-Schinzel sequences enable us to derive sharp bounds on the combinatorial structure underlying various geometric problems, which in turn yields efficient algorithms for these problems. 29 30 31 34 35 36 37 38 39 40 41 41 Davenport-Schinzel sequences and their geometric applications 3 1. Introduction Davenport-Schinzel sequences, introduced by H. Davenport and A. Schinzel in the 1960s, are interesting and powerful combinatorial structures that arise in the analysis and construction of the lower (or upper) envelope of collections of univariate functions, and therefore have applications in a variety of geometric problems that can be reduced to computing such an envelope. In addition, Davenport-Schinzel sequences play a central role in many related geometric problems involving arrangements of curves and surfaces. For these reasons, they have become one of the major tools in the analysis of combinatorial and algorithmic problems in geometry. DEFINITION 1.1. Let n and s be two positive integers. A sequence U = {u\,.. ..Um) of integers is an {n,s) Davenport-Schinzel sequence (a DS(n, s)-sequence for short) if it satisfies the following conditions: (i) I ^Ui ^n for each / < m, (ii) Ui 7^ M/+1 for each / < m, and (iii) there do not exist 5* + 2 indices 1 ^ /i < 12 < • " 1, there exists a polynomial Cs (q) o f degree at most s - 1, such that ~-2s+l (n) 4. The first superlinear bound on )vs (n) was obtained by Hart and Sharir [80], who proved that )v3(n) = ; 2 ( n ~ ( n ) ) . Their original proof transforms DS(n, 3)-sequences into certain path compression schemes on rooted trees. A more direct proof for the lower bound on )~3(n) was given by Wiernik and Sharir [154] they describe an explicit recursive scheme for constructing a DS(n, 3)-sequence of length £2 ( n a ( n ) ) . See also [ 100] Davenport-Schinzel sequences and their geometric applications 17 for another proof of the same lower bound. We sketch Wiernik and Sharir's construction, omitting many details, which can be found in [142,154]. Let [Ck{m)]k^\ be a sequence of functions from N to itself, defined by C$$m) = I, Q ( l ) = 2Q_i(2), Ck(m) = Ck(m- l)-Ck-\{Ck(m- 1)), m ^ 1, k^2, k^2,m^2. It can be shown that, for all /: > 4, m ^ 1, Ak-i(m) ^ Ck(m) ^ Akim + 3). (5.1) In what follows, let /x = Q ( m — 1), y — Ck-\ (Ck(m — 1)), and y = fx - v. For each k,m^ 1, we construct a sequence Sk(m) that satisfies the following two properties: (PI) Sk(m) is composed of Nk(m) = m • Ckim) distinct symbols. These symbols are named (d,l),ford= I,.. .,m, I = 1 , . . . , y, and are ordered in lexicographical order, so that (d, I) < (d\ /O if I < I' or 1 = 1' and d < d\ (P2) Sk(jn) contains y fans of size m, where each fan is a contiguous subsequence of the form ((1, /)(2, /) • • • (m, /)), for / == 1 , . . . , y. Since fans are pairwise disjoint, by definition, the naming scheme of the symbols of Sk(m) can be interpreted as assigning to each symbol the index / of the fan in which it appears, and its index d within that fan. The construction of Skim) proceeds by double induction on k and m, as follows. 1. k=l: The sequence is a single fan of size m: S\{m) — ((1, 1)(2, 1) • • (m, 1)). Properties (PI) and (P2) clearly hold here (Ci (m) = 1). 2. k = 2: The sequence contains a pair of disjoint fans of size m, with a block of elements following each of these fans. Specifically, S2(m) = ((1, 1) (2, 1) •. • (m - 1, 1) (m, 1) (m - 1, 1) • • • (1, 1) (1,2)(2,2)-.- ( m - l , 2 ) ( m , 2 ) ( m - 1 , 2 ) ••• (1,2)>. Indeed, S2(m) contains C2(m) = 2 fans and is composed of 2m distinct symbols. 3. k^3,m = I: The sequence is identical to the sequence for ^^ = ^ — 1 and m' = 2, except for renaming of its symbols and fans: Sk-\(2) contains Q_i(2) = ^Ck(l) fans, each of which consists of two symbols; the symbol renaming in Sk(l) causes each of these two elements to become a 1-element fan. Properties (PI) and (P2) clearly hold. 4. The general case k^3,m> 1: (i) Generate inductively the sequence S' = Sk(m — I); by induction, it contains /x fans of size m — 1 each and is composed of (m — I) - /JL symbols. (ii) Create v copies of S' whose sets of symbols are pairwise disjoint. For each j ^ V, rename the symbols in the jth copy 5y of S' as (d,i, j) where I ^d ^m — I is the index of the symbol in the fan of S'- containing it, and 1 ^ / < /x is the index of this fan in S'-. RK. Agarwal and M. Sharir 18 fan I fan^ fan^ SL S'2 S[ 5* fan^ faru^ fan^ Fig. 5. Lower bound construction: merging the subsequences. (iii) Generate inductively the sequence S* = Sk-\iiJi) whose set of symbols is disjoint from that of any S'-; by induction, it contains v fans of size fi each. Rename the symbols of S* as (m, /, /) (where / is the index of that symbol within its fan, and j is the index of that fan in 5*). Duplicate the last element (m, /x, j) in each of the y fans of S*. (iv) For each 1 ^ / ^ //, 1 ig / ^ y, extend the /th fan of S'- by duplicating its last element (m — 1, /, y), and by inserting the corresponding symbol (m, /, j) of S* between these duplicated appearances of (m — \,i, j). This process extends the (m — l)-fans of S'- into m-fans and adds a new element after each extended fan. (v) Finally construct the desired sequence Sk{m) by merging the v copies S^- of S' with the sequence S*. This is done by replacing, for each 1 ^ y ^ y, the jih fan of S* by the corresponding copy 5" of S\ as modified in (iv) above. Note that the duplicated copy of the last element in each fan of S* (formed in step (iii) above) appears now after the copy S'- that replaces this fan; see Figure 5 for an illustration of this process. It is easily checked that S^ (m) consists of Nk{m) = v(m - l)/x-f MQ-I(M) =mCk{m) symbols, and it can also be shown that Sk (m) is a DS(Nk (m), 3)-sequence satisfying properties (PI) and (P2). If we let a^ (m) denote the length of Sk(m), then a\(m) = m, (72 ( m ) = 4 m — 2, Davenport-Schinzel sequences and their geometric applications 19 o^^(l) = ^^-l(2), Gkim) = vak{m-$$ + ak-\{ix) + v{ii + \). The third term in the last equation is due to the duphcation of the rightmost symbol of each fan of 5'* and of each S'- (see Steps 4(iii)-(iv)). Using a double induction on k and m, one can prove that (Jk(m) > (km — 2)Ck(m) + 1. THEOREM PROOF. 5.1 ([80,154]). X3(n) = ^(na(n)). Choose mk = Q + i (^ - 3). Then nk = Nk(mk) = Ck-^iik-2)^Ak+i(k-^l), where the last inequality follows from (5.1). Therefore a(nk) ^k -\- 1, and hence >^3(nk) ^ cfkimk) ^ krik - 2Ck(mk) ^ (k - 2)nk ^ nk{a(nk) - 3). As shown in [142], this bound can be extended to any integer n, to prove that A-3(«) = D Q(na(n)). Generalizing the above construction and using induction on s — basically replacing each chain of the sequence Sk{m) by a DS{n, s — 2)~sequence, which, in turn, is constaicted recursively ~— Sharir [138] proved that A2^ + i(/i) — QCnainY). Later Agarwal et al. [11] proved that the upper bounds slated in Theorem 4.5 are almost optimal. In particular, using a rather mvolved doubly-mductive scheme, they constructed a DS{n, 4)-sequence of length i2(n2^^^"'). Then, by recurring on s, they generalized their construction of DSin, 4)sequences to higher-order sequences. The following theorem summarizes their result. THEOREM 5.2 ([11]). (i) k4(n)--=:Q(n'2''^''^). (ii) For ^ > 1, there exists a polynomial Qsiq) of degree at most s — I, such that OPEN PROBLEM 1. Obtain tights bounds on Xsin) for ^ > 4, especially for odd values ofs. Wiemik and Sharir [154] proved that the DS{n, 3)-sequence Sk(m) constructed above can be realized as the lower envelope sequence of a set of n segments, w^hich leads to the following fairly surprising result: 5.3 ([154]). The lower envelope ofn segments can have Q (na(n)) breakpoints in the worst case. THEOREM 20 RK. Agarwal and M. Sharir Shor [145] gave a simpler example of n segments whose lower envelope also has Q (na(n)) breakpoints. These results also yield an ^{na(n)) lower bound on many other unrelated problems, including searching in totally monotone matrices [94] and counting the number of distinct edges in the convex hull of a planar point set as the points are being updated dynamically [151]. Shor has also shown that there exists a set of n degree-4 polynomials whose lower envelope has Q{na(n)) breakpoints [146] (which is somewhat weak, because the upper bound for this quantity is X4(n) = 0(n • 2"^^^^)). We conclude this section by mentioning another open problem, which we believe is one of the most challenging and interesting problems related to Davenport-Schinzel sequences. OPEN PROBLEM 2. Is there a natural geometric realization of higher order sequences? For example, can the lower envelope ofn conic sections have f2(n2^^^^) breakpoints! 6. Davenpoiit-Srhinzel sequences and arrangements In this section we consider certain geometric and topological structures induced by a family of arcs in the plane, where Davenport-Schinzel sequences play a major role in their analysis. Specifically, let T = {yi,..., y,;} be a collection of n Jordan arcs in the plane, each pair of which intersect in at most .v points, for some fixed constant s.^ DEFINITION 6.1. The arrangement AiF) of F is the planar subdivision induced by the arcs of JT; that is, AiF) is a planar map whose vertices are the endpoints of the arcs of F and their pairwise intersection points, whose edges are maximal (relatively open) connected portions of the y, 's that do not contain a vertex, and whose/ac-^5' are the connected components of R^ — (J T. The combinatorial complexity of a face is the number of vertices (or edges) on its boundary, and the combinatorial complexity of A(F) is the total complexity of all of its faces. The maximum combinatorial complexity of ^4(7") is clearly &(sn^) = 0(n^), and A(F) can be computed in time 0(n^ log«), under an appropriate model of computation, using the sweep-line algorithm of Bentley and Ottmann [29]. A slightly faster algorithm, with running time 0(nks-^2(f^)), is mentioned in Section 6.3. Many applications, however, need to compute only a small portion of the arrangement, such as a single face, a few faces, or some other substructures that we will consider shortly. Using D^-sequences, one can show that the combinatorial complexity of these substructures is substantially smaller than that of the entire arrangement. This fact is then exploited in the design of efficient algorithms, whose running time is close to the bound on the complexity of the substructures that these algorithms aim to construct. In this section we review combinatorial and algorithmic results related to these substructures, in which Z)5-sequences play a crucial role. ^ A Jordan arc is an image of the closed unit interval under a continuous bijective mapping. Similarly, a closed Jordan curve is an image of the unit circle under a similar mapping, and an unbounded Jordan curve is an image of the open unit interval (or of the entire real line) that separates the plane. Davenport-Schinzel sequences and their geometric applications 21 '75 73 ,77 "74 S ~ + ;- + + ~- ;+ - - + ~ - ~ - - " ~ + ~4- - ~ 2/ - - \ 31 2 Fig. 6. A single face and its associated boundary sequence; all arcs are positively oriented from left to right. 6.1. Complexi~ o f a single face It is well known that the complexity of a single face in an arrangement of n lines is at most n [124], and a linear bound on the complexity of a face in an arrangement of rays is also known (see Alevizos et al~ [14,15]). The result of Wiernik and Sharir [154] on the lower envelopes of segments implies that the unbounded face in an arrangement of n line segments has Kg(n~(n)) vertices in the worst case. A matching upper bound was proved by Pollack et al. [123], which was later extended by Guibas et al. [75] to general Jordan arcs. The case of closed or unbounded Jordan curves was treated in [135]. THEOREM 6.2 ([75,135]). Let F be a set of n Jordan arcs in the plane, each pair of which intersect in at most s points, f o r some fixed constant s. Then the combinatorial complexity of any single face in ,,4(/-') is O(~,s+2(n)). I f each arc in Y' is a Jordan curve (closed or unbounded), then the complexity of a single face is at most/,s (n). PROOF (Sketch). We only consider the first part of the theorem; the proof of the second part is simpler, and can be found in [135,142]. Let f be a given face in A ( F ) , and let C be a connected component of its boundary. We can assume that C is the only connected component of Of. Otherwise, we repeat the following analysis for each connected component and sum their complexities. Since each arc appears in at most one connected component, the bound follows. For each arc Yi, let ui and vi be its endpoints, and let yi+ (respectively, y/-) be the directed arc yi oriented from u i to vi (respectively, from vi to u i). Without loss of generality, assume that C is the exterior boundary component of f . Traverse C in counterclockwise direction (so that f lies to our left) and let S = (sl, s2 . . . . . st) be the circular sequence of oriented arcs in F in the order in which they appear along C 22 RK. Agarwal and M. Sharir (if C is unbounded, 5 is a linear, rather than circular, sequence). More precisely, if during our traversal of C we encounter an arc yi and follow it in the direction from «/ to vi (respectively, from Vi to w/) then we add y^ (respectively, yf) to S. See Figure 6 for an illustration. Note that in this example both sides of an arc yi belong to the outer connected component. Let § 1 , . . . , ?2n denote the oriented arcs of F. For each §/ we denote by |$/1 the nonoriented arc yj coinciding with ^/. For the purpose of the proof, we transform each arc yt into a very thin closed Jordan curve y^ by taking two nonintersecting copies of yi lying very close to one another, and by joining them at their endpoints. This will perturb the face / slightly but can always be done in such a way that the combinatorial complexity of C does not decrease. Note that this transformation allows a natural identification of one of the two sides of y* with y^ and the other side with yf. It can be shown (see [75,142]) that the portions of each arc §/ appear in 5 in a circular order that is consistent with their order along the oriented ^/. In particular, there exists a starting point in S (which depends on ^/) so that if we read S in circular order starting from that point, we encounter these portions of f, in their order along ^/. For each directed arc 5,, consider the linear sequence V, of all appearances of f/ in 5, arranged in the order they appear along $/. Let )[X/ and y/ denote respectively the index in S of the first and of the last element of V/. Consider S = {s\,.. .,St) SLS s. linear, rather than a circular, sequence (this change is not needed if C is unbounded). For each arc §,, if /x, > v, we split the symbol §/ into two distinct symbols ^/1, §,2, and replace all appearances of §/ in S between the places fjii and t (respectively, between 1 and y,) by §,1 (respectively, by f/2). Note that the above claim implies that we can actually split the arc ^/ into two connected subarcs, so that all appearances of §n in the resulting sequence represent portions of the first subarc, whereas all appearances of ^,2 represent portions of the second subarc. This splitting produces a sequence S^, of the same length as S, composed of at most 4n symbols. With all these modifications, one can then prove that 5* is a DS{4n, s -j- 2)-sequence. This is done by showing that each quadruple of the form (a • "b- • -a- • -b) in S* corresponds, in a unique manner, to an intersection point between the two arcs of F that a and b represent. See [75,142] for more details. This completes the proof of the first part of the theorem. D Theorem 6.2 has the following interesting consequence. Let T = {yi,...,}/,,} be a set of n closed Jordan curves, each pair of which intersects in at most s points. Let K = conv(r) be the convex hull of the curves in F. Divide the boundary of K into a minimum number of subarcs, ai, ^ 2 , . . . , a^?, such that the relative interior of each a/ has a nonempty intersection with exactly one of the curves yj. Then the number m of such arcs is at most Xs(n); see [135] for a proof. Recently, Arkin et al. [20] showed that the complexity of a single face in an arrangement of line segments with h distinct endpoints is only 0(h logh) (even though the number of segments can be &(h^)). A matching lower bound is proved is by Matousek and Valtr [106]. The upper bound by Arkin et al. does not extend to general arcs. Har-Peled [78] has also obtained improved bounds on the complexity of a single face in many special cases. Davenport-Schinzel sequences and their geometric applications 23 6.2. Computing a single face Let r be a collection of n Jordan arcs, as above, and let x be a point that does not lie on any arc of F. We wish to compute the face of A{r) that contains x. We assume that each arc in F has at most a constant number of points of vertical tangency, so that we can break it into 0(1) X-monotone Jordan arcs. We assume a model of computation allowing infinite-precision real arithmetic, in which certain primitive operations involving one or two arcs (e.g., computing the intersection points of a pair of arcs, the points of vertical tangency of an arc, the intersections of an arc with a vertical line, etc.) are assumed to take constant time. If /" is a set of n lines, or a set of n rays, then a single face can be computed in time 0{n log^). In the case of lines, this is done by dualizing the lines to points and using any optimal convex hull algorithm [124]; the case of rays is somewhat more involved, and is described in [14,15]. However, these techniques do not extend to arrangements of more general Jordan arcs. Pollack et al. [123] presented an 0{na{n) log^n)-time algorithm for computing the unbounded face in certain arrangements of line segments, but the first algorithm that works for general arcs was given by Guibas et al. [75]. Later, several other efficient algorithms — both randomized and deterministic — have been proposed. We first present randomized (Las Vegas) algorithms^ for computing a single face, and then review the deterministic solution of [75], and mention some other related results. Randomized algorithms have recently been designed for many geometric problems; see, e.g., [45,115, 136]. They are often much simpler than their deterministic counterparts, and are sometimes more efficient, as the present case will demonstrate. The efficiency of a Las Vegas randomized algorithm will be measured by its expected running time in the worst case, where the expectation is taken with respect to the internal randomizations performed by the algorithm. Randomized algorithms. The randomized algorithms that we will describe actually compute the so-called vertical decomposition of / . This decomposition, which we denote by / , is obtained by drawing a vertical segment from each vertex and from each point of vertical tangency of the boundary of / in both directions, and extend it until it meets another edge of / , or else all the way to ±oo. The vertical decomposition partitions / into "pseudo-trapezoidal" cells, each bounded by at most two arcs of F and at most two vertical segments. To simplify the presentation, we will refer to these cells simply as trapezoids; see Figure 7 for an illustration. We first present a rather simple randomized divide-and-conquer algorithm due to Clarkson [42] (see also [142]). The basic idea of the algorithm is as follows: Randomly choose a subset F\ assuming that yo intersects every arc of F in at most some constant number of points. P R O O F . Split every arc y G F into two subarcs at each intersection point of y and yo, and leave sufficiently small gaps between these pieces. In this manner all faces in the zone of yo are merged into one face, at the cost of increasing the number of arcs from n to 0(n). Now we can apply Theorem 6.2 to conclude the proof. D If F is a set of n lines and yo is also a line, then after splitting each line of F at their intersection points with yo we obtain a collection of 2n rays, and therefore the complexity of the unbounded face is 0 ( n ) . In fact, in this case one can show that the edges of the zone form a DS(4n, 2) sequence, thereby obtaining an upper bound of 8n — 1 on the complexity of the zone. Applying a more careful analysis, Bern et al. [31] proved the following theorem. T H E O R E M 6.8 ([31]). The complexity of the zone of a line in an arrangement ofn lines is at most 5.5/1, and this bound is tight within an additive constant term, in the worst case. See [14,31,37,56] for other results and applications of zones of arcs. An immediate consequence of Theorem 6.7 is an efficient algorithm for computing the arrangement A{F). Suppose we add the arcs of F one by one and maintain the arrangement of the arcs added so far. Let Ft be the set of arcs added in the first / stages, and let y/+i 28 P.K. Agarwal and M. Sharir be the next arc to be added. Then in the (/ + l)st stage one has to update only those faces of AiPi) which He in the zone of yz+i, and this can easily be done in time proportional to the complexity of the zone; see Edelsbrunner et al. [56] for details. By Theorem 6.7, the total running time of the algorithm is 0{nXs+2(n)), and, by Theorem 6.8, the arrangement of a set of n lines can be computed in 0{n^) time. If the arcs of F are added in a random order, then the expected running time of the above algorithm is 0{n \ogn + k), where k is the number of vertices in A{r) [35,46,115], which is at most quadratic in n. The latter time bound is worst-case optimal. Theorem 6.7 can also be used to obtain an upper bound on the complexity of any m faces of A{r). Specifically, let {/i,..., /^} be a subset of m distinct faces in A{r), and let Uf denote the number of vertices in a face / of A{r). Then, using the Cauchy-Schwarz inequahty, 1/2 i=\ ^ i ^ / X 1/2 ^feA(r) ^ where kj is the number of arcs in F that appear along the boundary of / . It is easily verified that X! '^/^Z ^Y^ feAif) yer Y^ ^f = C)(nAs+2(«)). fe7.oneiy,r\{y}) Hence, we obtain the following result. 6.9 ([56,78]). Let F be a set ofn arcs satisfying the conditions stated earlier. The maximum number of edges bounding any m distinct faces ofA(F) is 0(m' ^'^)^s-\-2(n)). THEOREM It should be noted that Theorem 6.9 is weaker than the best bounds known for the complexity of m distinct faces in arrangements of several special types of arcs, such as lines, segments, and circles (see [21,33,43]), but it applies to arrangements of more general arcs. 6.4. Levels in arrangements Let F be a. set of n jc-monotone, unbounded Jordan curves, each pair of which intersects in at most s points. The level of a point p eE? in A(F) is the number of curves of F lying strictly below p, and the level of an edge e e AiF) is the common level of all the points lying in the relative interior of e. For a nonnegative integer k 0, his algorithm constructs a graph G^, whose nodes are points in R^, and whose edges connect some pairs of these points by straight segments. The size of Ge is 0(n^ \oginp) + n^Xs{n)/e^), where ^ is a fixed constant and p is the ratio of the length of the longest edge in O to the (straight) distance between p and q. He then reduces the problem to that of constructing a shortest path in Ge (where the weight of an edge is its Euclidean length), and shows that the ratio between the length of the path obtained in this manner and the actual collision-free shortest path between p and q is at most 1+6:. The running time of his algorithm is 0{{n^Xs{n)/e'^) \og{n/s) + n^ \og{np) \og{n log/))). A special case of shortest paths in 3-space, which has been widely studied, is when O consists of a single convex poly tope and p,q lie on its surface (see, for example, [38, 109,143]). A shortest path on the surface of a convex poly tope can be represented by the sequence of edges that it crosses, and we refer to such a sequence of edges as a shortestpath edge sequence. It is known that there are 6)(n'*) shortest path edge-sequences [111, 133]. Agarwal et al. [4] have shown that the exact set of all shortest-path edge sequences can be computed in time 0{n^Xs (n) \ogn), for some constant ^ > 0, improving a previous algorithm by Schevon and O'Rourke [134]. Baltsan and Sharir [28] considered the special case where O consists of two disjoint convex poly topes (and p and q lie anywhere in the free space). Using Davenport-Schinzel sequences to bound the number of candidate paths that one has to consider, they presented an algorithm with running time 0{n?''k\Q{n)\ogn) to find an exact collision-free shortest path between p and q. Davenport-Schinzel sequences and their geometric applications 35 If the moving object is not a point and the object is allowed to rotate, the problem of computing a shortest path becomes significantly more difficult, even in the planar case. (In fact, even the notion of shortest path becomes much vaguer now.) Suppose we want to compute an optimal path for moving a line segment y =: pq (allowing both translations and rotations) amid polygonal obstacles with a total of n edges. Assume that the cost of a path is defined as the total distance traveled by one of its endpoints, say, /?, and restrict the problem further by requiring that p moves along polygonal paths that can bend only at obstacle vertices. This rather restricted version of the problem was studied by Papadimitriou and Silverberg [120], who gave an 0(n^ logn)-time algorithm for computing a shortest path in the above setting. Sharir [139] improved the running time to 0(n^a(n)\og^n), using Davenport-Schinzel sequences and planar arrangements. 7.4. Transversals ofplanar objects Let S = {Si, S2,..., Sn}hea collection of n compact convex sets in the plane. A line that intersects all sets of S is called a transversal (or a stabber) of S. Note that a line intersects a set if and only if it intersects its convex hull, so convexity is usually not a real restriction. For each set Si e S, let S* denote the set of points dual to the lines that intersect St, using a standard duality transform [54]. Sf is bounded from above by a convex x-monotone curve Ai and from below by a concave x-monotone curve Bf; see Figure 9. The stabbing region of S (or the space of all transversals) is the intersection 5* = 0/^=1 ^f- ^ ^ definition, 0, there exists a (d + /?)-variate polynomial g(x, a) = V^o(a) + V^i(a)^i(x) + V^2(a)^2(x) + h i/k-$$sL)(pk-i(x) + ^^^(x), forxG R^,a e E^, so that, for each 1 < / < n, we have Qi(x) = g(x,ai) for some a/ e W. Here each V^y(a), for 0 ^ j ^ /:, is a /7-variate polynomial, and each (pj(x), for 1 < j < ^ + 1, is a J-variate polynomial. It is easily seen that such a polynomial representation always exists for p < d^'^^ — let the ^'s be the monomials that appear in at least one of the polynomials of Q, and let x/fj (a) = aj (where we think of a as the vector of coefficients of the monomials). We define a transform ^ : M*^ ^- M^ that maps each point in M.^ to the point ^(x) = {(pi(x), (p2(x),..., (pk(x)); 64 RK. Agarwal and M. Sharir the image (p(Er) is a J-dimensional algebraic surface 17 in R'^. For each function Qt (x) = g(x, a/), we define a A:-variate Hnear function hi (y) = iAo(a/) + TAI (a/) ji + • • • + i/^jt-i (aOy^^-i + jk. Let / / = {/i/ = 0 I 1 ^ / ^ n} be a set of n hyperplanes in R^. Let § be a vertex of L{r). If § is incident to y i , . . . , y j , then Q\{^) = ••• = Qd{^) = 0 and 2 J + I ( § ) O ^ J + I O , . . . , Qn(^)crnO, where cr, G {>, 0. 4. Single cells Lower envelopes are closely related to other substructures in arrangements, notably cells and zones. The lower envelope is a portion of the boundary of the bottommost cell of the arrangement, though the worst-case complexity of L{r) can be larger than that of the bottommost cell of A{r). In two dimensions, it was shown in [206] that the complexity of a single face in an arrangement of n arcs, each pair of which intersect in at most s points, is 0(Xs+2(w))» and so has the same asymptotic bound as the complexity of the lower envelope of such a collection of arcs. This suggest that the complexity of a single cell in an arrangement of n surface patches in E^ satisfying the Assumptions (Al) and (A2) is close to 0{n^~^). The Upper Bound Theorem impfies that the complexity of a single cell in arrangement of hyperplanes in R^ is 0{n^^f^^), and the linearization technique described in Section 3 implies that the complexity of a single cell in an arrangement of n spheres is 0(«^^/^^). However, the lower-bound construction for lower envelopes implies a lower bound of Q (n^~ ^«(«)) for the complexity of a single cell for arrangements of simplices. Fig. 5. A single cell in an arrangement of segments. Pach and Sharir [295] were the first to prove a subcubic upper bound on the complexity of a single cell in arrangements of triangles in R-^. This bound was improved by Aronov and Sharir [52] to 0(n^/^), and subsequendy to 0(n^ log n) [54]. The latter approach extends to higher dimensions; that is, the complexity of a single cell in an arrangement ofn (d — 1)simplices in R^ is 0(n^~^ log«). A simpler proof was given by Tagansky [342]. These approaches, however, do not extend to nonlinear surfaces even in R^. Halperin [211,212] proved near-quadratic bounds on the complexity of a single cell in arrangement of certain classes of n bivariate surface patches, which arise in motionplanning applications. Halperin and Sharir [221] proved a near-quadratic bound on the Arrangements and their applications 67 complexity of a single cell in an arrangement of the contact surfaces that arise in a rigid motion of a simple polygon amid polygonal obstacles in the plane, i.e., the surfaces that represent the placements of the polygon at which it touches one of the obstacles. The proof borrows ideas from the proof of Theorem 3.1. A near-optimal bound on the complexity of a single cell in the arrangement of an arbitrary collection of surface patches in R-^ satisfying Assumptions (Al) and (A2) was finally proved by Halperin and Sharir [219]: THEOREM 4.1 (Halperin and Sharir [219]). Let F be a set of surface patches in E^ satisfying Assumptions (Al) and (A2). For any £ > 0, the complexity of a single cell in A(F) IS 0(n^^')Jor any s > 0, where the constant of proportionality depends on s and on the maximum degree of the surface patches and of their boundaries. The proof proceeds along the same lines as the proof of Theorem 3.1. However, they establish the following two additional results to "bootstrap" the recurrences that the proof derives. Let C be the cell of A(F) whose complexity we want to bound. (a) There are only O(n^) vertices v of the cell C that are locally x-extreme (that is, there is a neighborhood N of v and a connected component C^ of the intersection of A^ with the interior of C, such that v lies to the left (in the x-direction) of all points of C\ or v lies to the right of all these points). (b) There are only 0(n^+^) vertices on popular faces of C, that is, 2-faces / for which C lies locally near / on both sides of / . Property (a) is proved by an appropriate decomposition of C into 0(n^) subcells, in the style of a Morse decomposition of C (see [281]), so that each subcell has at most two points that are locally x-extreme in C. Property (b) is proved by applying the machinery of the proof of Theorem 3.1, where the quantity to be analyzed is the number of vertices of popular faces of C, rather than all inner vertices. Once these two results are available, the proof of Theorem 3.1 can be carried through, with appropriate modifications, to yield a recurrence for the number of vertices of C, whose solution is 0(n^+^). We refer the reader to the original paper for more details. To extend the above proof to higher dimension appropriate extensions of both properties (a) and (b) have to be established. The extension of (a) requires topological considerations related to Morse theory, and the extension of (b) requires an inductive argument, in which bounds on the number of vertices of popular faces of all dimensions need to be derived, using induction on the dimension of the faces. Recently, Basu [67] showed that the topological complexity, i.e., the sum of the Betti numbers, of a single cell in an arrangement of n surface patches satisfying Assumptions (A1)-(A2) is 0(n^~^). Using this result and the ideas in [219], he showed that the combinatorial complexity of a set of n surface patches in W^ satisfying Assumptions (Al) and (A2) is 0(n^~^~^^). He also showed that under certain geometric assumptions on surface patches the combinatorial complexity of a single cell is alsoO(n^-i). The linearization technique in the previous section can be extended to bound the complexity of a cell as well, namely, one can prove the following. 68 RK. Agarwal and M. Sharir THEOREM 4.2. Let r be a collection of n hypersurfaces in M^, of constant maximum degree b. If F admits a linearization of dimension k, then the combinatorial complexity of a cell ofA(r) is 0(n^^^'^^), where the constant ofproportionality depends on k, d, and b. 5. Zones Let F be a set of n surfaces in R^. The zone of a variety a (not belonging to F), denoted as zone(a; T), is defined to be the set of J-dimensional cells in A(r) that intersect a. The complexity of zone(a; F) is defined to be the sum of complexities of the cells of A(F) that belong to zone(a; F), where the complexity of a cell in A(F) is the number of faces of all dimensions that are contained in the closure of the cell. The complexity of a zone was first studied by Edelsbrunner et al. [157]; see also [110]. The "classical" zone theorem [142,159] asserts that the maximum complexity of the zone of a hyperplane in an arrangement of n hyperplanes in W^ is 0(n^~^), where the constant of proportionality depends on d. The original proof given by Edelsbrunner et al. [157] had some technical problems. A correct, and simpler, proof was given by Edelsbrunner et al. [159]. Their technique is actually quite general and can also be applied to obtain several other interesting combinatorial bounds involving arrangements. For example, the proof by Aronov and Sharir for the complexity of a single cell in arrangements of simphces [54] used a similar approach. Other results based on this technique can be found in [4,50,51]. We therefore describe the technique, as applied in the proof of the zone theorem: THEOREM 5.1 (Edelsbrunner, Seidel and Sharir [159]). The maximum complexity of the zone of a hyperplane in an arrangement of n hyperplanes This result is easy to prove for d = 2; see Chapter 1. For a set F of n hyperplanes in R*^ and another hyperplane b, let r^ (b; F) denote the total number of ^-faces contained on the boundary of cells in zone(b; F); each such /:-face is counted once for each cell that it bounds. Let Ti^(n,d) = maxr^(b\ F), where the maximum is taken over all hyperplanes b and all sets F of n hyperplanes in R^. The maximum complexity of zone(b; F) is at most Ylk=o ^^ (^' ^)- Thus the following lemma immediately implies the upper bound in Theorem 5.1. LEMMA 5.2. For each d and O^k ^d, Tk(n,d) = 0{n'^-^), where the constants ofproportionality depend on d and k. PROOF. We use induction on d. As just noted, the claim holds for d = 2. Assume that the claim holds for all 3, the same application of the zone theorem yields only Ylc l^l/c = 0(«^), where fc is the number of hyperplanes of F meeting the boundary of C. Using the same induction scheme as in the proof of Theorem 5.1, Aronov et al. [50] showed that J2 |C|2 = 0(n^logLfJ-^). CeAiF) It is believed that the right bound is 0(n^). Note that such a result does not hold for arrangements of simplices or of surfaces because the complexity of single cell can be Q{n^~^). The zone theorem for hyperplane arrangements can be extended as follows. THEOREM 5.3 (Aronov, Pellegrini and Sharir [51]). Let F be a set ofn hyperplanes in W^. Let a be a p-dimensional algebraic variety of some fixed degree, or the relative boundary of any convex set with affine dimension /? + 1, for 0 ^ p ^ d. The complexity of the Zone(a; F) is 0(n^^^~^^^^^^ log^n), where ^ = d -\- p (mod 2), and the bound is almost tight (up to the logarithmic factor) in the worst case. In particular, for p = J — 1, the complexity of the zone is 0(n^~^ logn), which is almost the same as the complexity of the zone of a hyperplane in such an arrangement. Arrangements and their applications 71 The proof proceeds along the same lines of the inductive proof of Theorem 5.1. However, the removal and re-insertion of a hyperplane y e F splits a face / of zone (a; F \ {y}) into two subfaces, both lying in zone (a; F), the charging scheme used in the proof of Theorem 5.1 becomes inadequate, because f C\ y need not belong to the zone of cr Pi y in the {d — 1)-dimensional cross-section of A{F) along y. What is true, however, is that / n y is a face incident to a popular facet of zone {a \ F) along y, that is, a facet g ^ y whose two incident cells belong to the zone. Thus the induction proceeds not by decreasing the dimension of the arrangement (as was done in the proof of Theorem 5.1), but by reapplying the same machinery to bound the number of vertices of popular facets of the original zone (a; F). This in turn requires similar bounds on the number of vertices of lower-dimensional popular faces. We refer the reader to Aronov et al. [51] for more details. In general, the zone of a surface in an arrangement of n surfaces in W^ can be transformed to a single cell in another arrangement of 0(n) surface patches in M^. For example. Let 7^ be a set of n (d— l)-simplices in R^, and let cr be a hyperplane. We split each y e F into two polyhedra at the intersection of A and a (if the intersection is nonempty), push these two polyhedra slightly away from each other, and, if necessary, retriangulate each polyhedron into a constant number of simplices. In this manner, we obtain a collection F^ of 0(n) simplices, and all cells of the zone of a in A(F) now fuse into a single cell of A(F^). Moreover, by the general position assumption, the complexity of the zone of cr in F is easily seen to be dominated by the complexity of the new single cell of A(F^). (The same technique has been used earlier in [150], to obtain a near-linear bound on the complexity of the zone of an arc in a two-dimensional arrangement of arcs.) Hence, the following theorem is an easy consequence of the result by Aronov and Sharir [54]. 5.4. The complexity of the zone of a hyperplane in an arrangement of n (d —$$-simplices in R^ is 0(n^~^ logn). THEOREM Using a similar argument one can prove the following. THEOREM 5.5 (Basu [67]; Halperin and Sharir [219]). Let F be a collection ofn surface patches in M.^, satisfying Assumptions (Al) and (A2). The combinatorial complexity of the zone in A{F) of an algebraic surface a of some fixed degree is 0{n^~^^^), for any £ > 0, where the constant of proportionality depends on e, on the dimension on the maximum degree of the given surfaces and their boundaries, and on the degree of a. Once the bound on the complexity of a single cell in an arrangement of general algebraic surfaces is extended to higher dimensions, it should immediately yield, using the same machinery, to a similar bound for the zone of a surface in such an arrangement. 6. Levels The level of a point p eW^ m an arrangement A{F) of a set F of surface patches satisfying (A1)-(A3) is the number of surfaces of F lying vertically below p. For 0 < A: < n, we define k-level (resp. 0. The bound was improved by Aronov et al. [46] and Eppstein [173] to OC/i^/"^ poly log /i), and then by Dey and Edelsbrunner [135] to 0(«^/^). The best bound known, due to Agarwal et al. [8], is 0{n{k -\- 1)^/-^). They also proved a bound on the complexity of the A:-level for arrangements of triangles in M^. A nontrivial bound on the complexity of the /c-level in an arrangement of n hyperplanes in J > 3 dimensions, of the form 0(n^~^''), for some constant Sd that decreases exponentially with d, was obtained in [36,352]. This has later been slightly improved to 0(n^^^'^^k^^^'^^~^'^) in [8]. Table 1 summarizes the known upper bounds on /:-levels. 7. Many cells and incidences In the previous two sections we bounded the complexity of families of J-dimensional cells in A(r) that satisfied certain conditions (e.g., cells intersected by a surface, the cells of level at most k). We can ask a more general question: What is the complexity of any m distinct cells in AiF)! A single cell in an arrangement of lines in the plane can have n Arrangements and their applications 11 Table 2 Complexity of many cells Objects Complexity Source Lines in M^ Segments in M^ Unit circles in M^ 0{m^l^n^l^ +n) Q^^2/3^2/3 _|_ ^^^^^^ _^ ^ logm) Oim^^^n^^^a^^^in)+n) [121] [48] [121] Circles in M^ Q(^^3/5^4/54Q'(«)/5 _^ ^>, Arcs in M^ Planes in M^ Hyperplanes in M^, J ^ 4 0(^Xq (n)) 0{m^/^n + n^) 0(m ^/^^^/^ log/^«) ;6 = ( L ^ / 2 J - l ) / 2 ^21] [150] [7] [50] edges, but can the total complexity of m cells in an arrangement of lines be f2(mn)l This is certainly false for m = Q{n^). We can also formulate the above problem as follows: Let P be a set of m points and F a set of n surfaces in W^ satisfying Assumptions (Al) and (A2). Define C(P, F) to be the set of cells in A(F) that contain at least one point of P. Define /x(P, F) = Y1CGC(P r) 1^1 and fji(m,n,G) = max/x(P, F), where the maximum is taken over all sets P of m points and over all sets F of n surfaces in a given class G. Let L be the set of all lines in the plane. Canham [89] proved that /x(m,fi,L) = 0(m^ + n), from which it easily follows that /x(m, n, L) = 0{m^ -{-n). Although this bound is optimal for m ^ ^ , it is weak for larger values of m. Clarkson et al. [121] proved that iji(m,n,lj) = &(m^^^n^^^ + n). Their technique, based on random sampling, is general and constructive. It has led to several important combinatorial and algorithmic results on arrangements [121,204,205]. For example, following a similar, but considerably more involved, approach, Aronov et al. [48] proved that /x(m, n, E) = 0(m^/^n^/^ + m logn + na(n)), where E is the set of all line segments in the plane. An improved bound can be attained if the number of vertices in the arrangement of segments is small. Hershberger and Snoeyink [232] proved an 0(m^/^n^/-^ + n) upper bound on the complexity of m distinct cells in the arrangements of n segments in the plane where the segments satisfy certain additional conditions. Although Clarkson et al. [121] proved nontrivial bounds on the complexity of m distinct cells in arrangements of circles (see Table 2 above), no tight bound is known. OPEN PROBLEM 4. What is the maximum complexity of m distinct cells in an arrangement ofn circles in the planel Complexity of many cells in hyperplane arrangements in higher dimensions was first studied by Edelsbrunner and Haussler [155]. Let H be the set of all hyperplanes in M^. They proved that the maximum number of (d — 1)-dimensional faces in m distinct cells in an arrangement of n hyperplanes in W^ is 0(m^^^n^^^ + n^~^). Refining an argument by Edelsbrunner et al. [153], Agarwal and Aronov [7] improved this bound to 0{m^^^n^/^ + n^~^). By a result of Edelsbrunner and Haussler [155], this bound is tight in the worst case. 78 RK. Agarwal and M. Sharir Aronov et al. [50] proved that /x(m,n,H) = OCm^/^n^/^log^n), where ^ = ([d/l] l)/2. They also proved several lower bounds on /x(m,n,H): For odd values of d and m ^n, />6(m,n,H) = ©(m^L^/^J); for m of the form 6)(n^-2^) where 0 < i^ < [d/2i is an integer, /x(m, n, H) = ^(m^/^n^^/^^); and for arbitrary values of m, /x(m,«, H) = -^(m^/^n^/^-i/4). Agarwal [4], Guibas et al. [201], and Halperin and Sharir [217] obtained bounds on "special" subsets of cells in hyperplane arrangements. A problem closely related to, but somewhat simpler than, the many-cells problem is the incidence problem. Here is a simple instance of this problem: Let 7" be a set of n lines and P a. set of m points in the plane. Define X(P, F) = ^Z^er 1^ f^ ^h set T(m, n) = max J ( P , F), where the maximum is taken over all sets P of m distinct points and over all sets F of n distinct lines in the plane. Of course, this problem is interesting only when the lines in F are in highly degenerate position. If n = m^ -\-m-i-1, then a finite projective plane of order m has n points and n lines and each line contains m-\-l = Q (n^/^) points, so the number of incidences between n points and n lines is Q(n^^^). Szemeredi and Trotter [339] proved that such a construction is infeasible in R^. In a subsequent paper, Szemeredi and Trotter [340] proved that l(m, n) = 0{ni^f^n^f^ -\-m-\-n). Their proof is, however, quite intricate, and an astronomic constant is hidden in the big-O notation. Their bound is asymptotically tight in the worst case, as shown in [165]. A considerably simpler proof, with a small constant of proportionality in the bound, was given by Clarkson et al. [121], based on the random-sampling technique. In fact, the bound on many cells in arrangements of lines immediately yields a similar bound on X(m, n) [121], but the proof can be somewhat simplified for the incidence problem. Here we present an even more elegant and simpler proof, due to Szekely [338], for the bound on J(m, n) using Lemma 6.4: THEOREM 7.1 (Szemeredi and Trotter [340]). Let F be a set ofn lines and P a set ofm points in the plane. Then X(P, F) = 0(n?l^n^l^ + m -h «). PROOF. We construct a geometric graph G = (V, £) whose vertices are the points of P. We connect two vertices /?, ^ by an edge if the points p and q are consecutive along a line in F. Each edge of G is a portion of a line of F, and no two edges overlap. Therefore at most (2) pairs of edges cross each other. Note that X(P, F) ^ \E\-\-n. \f\E\^ 4m, there is nothing to prove. Otherwise, by Lemma 6.4, 0 n\ \E\^ 1 \3 which implies that J ( P , F) = 0(m^l^n^l^ + «). D Valtr [348] has studied the incidence problem and its generalization for dense point sets, where the ratio of the maximum and the minimum distances in P is at most O(v^). The incidence problem has been studied for other curves as well. Of particular interest is the number of incidences between points and unit circles in the plane [121,335] because of its close relationship with the following major open problem in combinatorial geometry. Arrangements and their applications 79 which was originally introduced by Erdos in 1946 [175]: Let S be a set ofn points in the plane. How many pairs of points in S are at distance 1? Spencer et al. [335] had proved, by modifying the proof of Szemeredi and Trotter [340], that the number of incidences between m points and n unit circles is Oim^^^n^^^ -\- m -\- n). The proofs by Clarkson et al. [121] and by Szekely [338] have been extended to this case. The incidence bound implies that the number of unit distances between the points of S is 0(/i^/^). However, the best known lower bound on the number of unit distances is only ^i+^((iogiog^)/iog") [175] (see also [294]). OPEN PROBLEM 5. How many pairs of points in a given planar set of points are at dis- tance 1? Furedi [188] showed that if points in S are in convex position, then the number of pairs at distance 1 is 0{n log^); the best known lower bound is 7n — 12 by Edelsbrunner and Hajnal [154]. The best known upper bound on the unit distances in R^ is 0{n^^^) [121]. Let 5* be a set of n points in M^ so that no four points of P lie on a circle, then the number of pairs of points in S at unit distance is 0{n^^^^) [204]. We can state the incidence problem in higher dimensions. If we do not make any additional assumptions on points and surfaces, the maximum number of incidences between m points and n planes is obviously mn: Take a set of n planes passing through a common line and place m points on this line. Agarwal and Aronov [7] proved that if F is a set of n planes and P is a set of m points in M^ so that no three points in P are colinear, then 1{P, F) = 0{m^^^n'^^^ -\-m-\-n). Edelsbrunner and Sharir [160] showed that if /" is a set of n unit spheres in R^ and P is a set of m points so that none of the points in P lies in the interior of any sphere, then X{P, F) = 0{m^/^n^'^ -\-m-\-n). See [204,297] for other results on incidences in higher dimensions. 8. Generalized Voronoi diagrams An interesting application of the new bounds on the complexity of lower envelopes is to generalized Voronoi diagrams in higher dimensions. Let 5 be a set of n pairwise-disjoint convex objects in R^, each of constant description complexity, and let p be some metric. For a point x G R^, let ^(x) denote the set of objects nearest to x, i.e., 0(x) = {seS\ p(x, s) < p{x, s') W e S}. The Voronoi diagram Yorp(S) of S under the metric p (sometimes also simply denoted as Yor(S)) is a partition of R'^ into maximal connected regions C of various dimensions, so that the set 0(x) is the same for all x € C. Let yt be the graph of the function x^+i = p(x, Si). Set F = {yt \ 1 ^ / ^n}. Edelsbrunner and Seidel [158] observed that Vorp(5) is the minimization diagram of F. In the classical case, in which p is the Euclidean metric and the objects in S are singletons (points), the graphs of these distance functions can be replaced by a collection of n hyperplanes in R^+^, using the linearization technique, without affecting the minimization 80 P.K. Agarwal and M. Sharir diagram. Hence the maximum possible complexity of Vor(5) is 0{n 1^^/^^), which actually can be achieved (see, e.g., [248,322]). In more general settings, though, this reduction is not possible. Nevertheless, the bounds on the complexity of lower envelopes imply that, under reasonable assumption on p and on the objects in 5, the complexity of the diagram is 0(n^+^), for any e >0. While this bound is nontrivial, it is conjectured to be too weak. For example, this bound is near-quadratic for planar Voronoi diagrams, but the complexity of almost every planar Voronoi diagram is only 0(n), although there are certain distance functions for which the corresponding planar Voronoi diagram can have quadratic complexity [59]. In three dimensions, the above-mentioned bound for point sites and Euclidean metric is 0(n^). It has been a long-standing open problem to determine whether a similar quadratic or near-quadratic bound holds in E^ for more general objects and metrics (here the new results on lower envelopes only give an upper bound of 0(n^~^^)). The problem stated above calls for improving this bound by roughly another factor of n. Since we are aiming for a bound that is two orders of magnitude better than the complexity of A(r), it appears to be a considerably more difficult problem than that of lower envelopes. The only hope of making progress here is to exploit the special structure of the distance functions p(x,s). Fortunately, some progress on this problem was made recently. It was shown by Chew et al. [115] that the complexity of the Voronoi diagram is 0(n^a(n)\ogn) for the case in which the objects of S are lines in E? and the metric p is a convex distance function induced by a convex polytope with a constant number of facets (see [115] for more details). Note that such a distance function is not necessarily a metric, because it will fail to be symmetric if the defining polytope is not centrally symmetric. The L i and Loo metrics are special cases of such distance functions. The best known lower bound for the complexity of the diagram in this special case is ^{n^a(n)). Dwyer [140] has shown that the expected complexity of the Voronoi diagram of a set of n random lines in R'^ is 0(n^^^). In another recent paper [80], it is shown that the maximum complexity of the Li-Voronoi diagram of a set of n points in R^ is G(n^). Finally, it is shown in [341] that the complexity of the three-dimensional Voronoi diagram of point sites under a general polyhedral convex distance function (induced by a polytope with 0(1) facets) is 0(«^ log«). OPEN PROBLEM 6. (i) Is the complexity of the Voronoi diagram of a set S ofn lines under the Euclidean metric in R? close to n^l (ii) Is the complexity of the Voronoi diagram of a set S ofpairwise disjoint convex polyhedra in M^, with a total ofn vertices, close to n^ under the polyhedral convex distance functions! An interesting special case of these problems involves dynamic Voronoi diagrams for moving points in the plane. Let 5 be a set ofn points in the plane, each moving along some line at some fixed velocity. The goal is to bound the number of combinatorial changes of the Euclidean Vor(5) over time. This dynamic Voronoi diagram can easily be transformed into a three-dimensional Voronoi diagram, by adding the time f as a third coordinate. The points become lines in M^, and the metric is a distance function induced by a horizontal disk (that is, the distance from a point pixQ, yo, to) to a line i is the Euclidean distance from p to the point of intersection of i with the horizontal plane ^ = ^o)- Here too the open Arrangements and their applications 81 problem is to derive a near-quadratic bound on the complexity of the diagram. Cubic or near-cubic bounds are known for this problem, even under more general settings [184,203, 328], but subcubic bounds are known only in some very special cases [114]. Next, consider the problem of bounding the complexity of generalized Voronoi diagrams in higher dimensions. As mentioned above, when the objects in S are n points in R^ and the metric is Euclidean, the complexity of Vor(5) is 0(n'^^/^^). As d increases, this becomes significantly smaller than the naive 0{n^^^) bound or the improved bound, 0(n^+^), obtained by viewing the Voronoi diagram as a lower envelope in IR^+^. The same bound of Q^^r^/21^ has recently been obtained in [80] for the complexity of the Loo-diagram of n points in W^ (it was also shown that this bound is tight in the worst case). It is thus tempting to conjecture that the maximum complexity of generalized Voronoi diagrams in higher dimensions is close to this bound. Unfortunately, this was recently shown by Aronov to be false [44], by presenting a lower bound of Q{n^~^). The sites used in this construction are convex polytopes, and the distance is either Euclidean or a polyhedral convex distance function. For d = 3, this lower bound does not contradict the conjecture made above, that the complexity of generalized Voronoi diagrams should be at most near-quadratic in this case. Also, in higher dimensions, the conjecture mentioned above is still not refuted when the sites are singleton points. Finally, for the general case, the construction by Aronov still leaves a gap of roughly a factor of n between the known upper and lower bounds. 9. Union of geometric objects Let /C = {^1,..., ^„} be a set of n connected J-dimensional sets in M^. In this section, we want to study the complexity of ^ = U/^=i ^i • Most of the work to date on this problem has been in two or three dimensions. Union of planar objects. Let us assume that each Ki is a Jordan region, bounded by a closed Jordan curve yi. Kedem et al. [241] have proved that if any two boundaries yi intersect in at most two points, then dK contains at most 6n ~ 12 intersection points (provided n ^ 3), and that this bound is tight in the worst case. An immediate corollary of their result is that the number of intersection points on the boundary of the union of a collection of homothets of some fixed convex set is linear, because the boundaries of any two such homothetic copies in general position can intersect in at most two points. The bound also holds when the homothets are not in general position. On the other hand, if pairs of boundaries may intersect in four or more points, then dK may contain Q{n^) intersection points in the worst case; see Figure 9. This raises the question of what happens if any two boundaries intersect in at most three points. Notice that in general this question is meaningless, since any two closed curves must intersect in an even number of points (assuming nondegenerate configurations). To make the problem interesting, let T be a collection of n Jordan arcs, such that both endpoints of each arc yt e F lie on the ;c-axis, and such that Ki is the region between yt and the X-axis. Edelsbrunner et al. [149] have shown that the maximum combinatorial complexity of the union K is G{na{n)). The upper bound requires a rather sophisticated analysis of the topological structure of K, and the lower bound follows from the construction by Wiemik and Sharir for lower envelopes of segments [357]. 82 PK. Agarwal and M. Sharir Fig. 9. Union of Jordan regions. Next, consider the case when earh v io . • , . arbitrary, then a simple modTficTtiontf J . I . % " ^ ' ' ' " * ' P'^"^' ^^ * ^ trianglesear may have quadratic L ^ e x ^ nTwor^^^^^^^^ ' " ^'^"^^ ' ^^'^-'^^t K be "thin," that is, some of thefr anglesTr^v^^^^^^^ '^tT'^ * ^ « - g l e s have to that if the given triangles are all i f m e a n i r t h r l f T ! ' ' '' ''• ^'"'1 ^^^^ ^^ow n fixed constant ^o, then their u n i o n l ^ a s onfv . ' u ' ' ' ' " ' ' ' ' ' ' '^ '"^^^ ^'^"^ ^ components of R2 y ^ . .™ . l ^ "^'"' ""•"''^'" "^ ''«'^* (ie., connected constants Of p r o p o ^ . l ^ a m y ^ : i % r ; ^ ^ ^ ^ ^ ^ ^ ^ complexity of the union of « fat wedgesTs 0 ^ ; ? T T^'^.i^' '' "'• ^^^^ P^^^^'l *at the un:on Of fat Objects. M. Bern asJ d l h T f l ' : : ; ^ ^ ^el^^^^^ OPEN PROBLEM 7. Let A = (A, A \ h the aspect ratio of the smallest rctangle i l ' l l l " ^ V " " " ' ' . ^ " " ' " ' '''"''• ^ ^ «'' ^^ ?/ie complexity o / U L , 4 , ? ^«^to««5 4 , . Suppose £ « ^ , a, ^ 0(n). What is //cr^;e"rii^:^^^^^^ r H -^'" ^ -^ ^ -"---« constant number . of points He e f ^ n e ' 1 . t u " ' ' ' " ' ' '"^''"^^^^'" ^' "^^'^ «ome t " '"^^^ ' '^°"^*^"^ « ^^^^ that for each object of S the^atio bet "eerthe ,^^^ .nscribed disk is at most a. T h e r Z w e d th ' I ' ' ' " " " ' ' " ^ '"^"^ ^"'^ *^^ l^^g^^t for any . > 0, where the constLt of 1 I 'complexity of the union K is 0(„i+^) 167] for sHghtly improved rltsnson^^^^^^^^^ ^'^T^' ^" ^' ^' -^^ «^ - « [166! requires as an imtial but import ntsubs^P n a . '''''l''^'^^ '^ ^^' objects. Their proo the union: these are vertice^ o f X . Z l ^ u " ' " ^ ' • ^ ° ' '*^^ """^ber of regular vertices of exactly twice. In fact, the a n a l y r b X a t a n d T h f " ' '\'"° ' " " " ' ' " ' ^ ^ '^at intersect vertices of the union. Nevertheli m^^^L?. K ! " " " ' ' " ^^^ ""'"^'^ ^^^''^^ '^' i^^8"l^ shown that, for an arbitrary coltSoTo^^^^^^^^ ' P™'''™' ''^'^•' '^"'^ ^^arir [296] have cross in a constant number of l^ronehar/;';^^^^^^^^ the number of regular (resp. irregular) vertices o n l ^ h H " ' " ' ^ ' " ' ^ ^^^^P' ^) ^^ --eenusedmn70]toobtamtLrL::l;^rnrre7hel^^^^^^^^^^^^^^^ Arrangements and their applications 83 interesting in their own right, and some additional results concerning them have recently been obtained by Aronov et al. [49]. First, if there are only regular vertices (i.e., every pair of boundaries intersect at most twice), then the inequality obtained by [296] implies that the complexity of the union in this case is at most 6^ — 12, so the result by Pach and Sharir extends the older results of Kedem et al. [241]. In general, though, / can be quadratic, so the above inequality only yields a quadratic upper bound on the number of regular vertices of the union. However, it was shown in [49] that in many cases R is subquadratic. This is the case when the given regions are such that every pair of boundaries cross at most a constant number of times. If in addition all the regions are convex, the upper bound is close toO(«^/2). Aronov and Sharir [55] proved that the complexity of the union of n convex polygons in M^ with a total of s vertices is 0(n^ + sain)). Union in three and higher dimensions. Little is known about the complexity of the union in higher dimensions. It was recently shown in [80] that the maximum complexity of the union of n axis-parallel hypercubes in M^ is 6)(n^^/^^), and this improves to 0{n^^/^^) if all the hypercubes have the same size. However, the following problem remains open. OPEN PROBLEM 8. What is the complexity of the union ofn congruent cubes in M?l Aronov and Sharir [53] proved that the complexity of the union of n convex polyhedra in R^ with a total of s faces is 0{n^ + sn log^ n). The bound was improved by Aronov et al. [57] to 0{n^ +sn\ogs). Unions of objects also arise as subproblems in the study of generalized Voronoi diagrams, as follows. Let S and p be as in the previous section (say, for the 3-dimensional case). Let K denote the region consisting of all points x G R^ whose smallest distance from a site in S is at most r, for some fixed parameter r > 0. Then K = \^^^^ B(s,r), where B(s,r) = {x eM? \ p(x,s) ^r}. We thus face the problem of bounding the combinatorial complexity of the union of n objects in R^ (of some special type). For example, if 5 is a set of lines and p is the Euclidean distance, the objects are n congruent infinite cylinders in R-^. In general, if the metric p is a distance function induced by some convex body P, the resulting objects are the Minkowski sums s 0 (—rP), for s e S, where A^B = {x-\-y\xeA, y e B]. Of course, this problem can also be stated in any higher dimension. Since it has been conjectured that the complexity of the whole Voronoi diagram in M? should be near-quadratic, the same conjecture should apply to the (simpler) structure K (whose boundary can be regarded as a level curve of the diagram at height r; it does indeed correspond to the cross-section at height r of the lower envelope in R^ that represents the diagram). Recently, this conjecture was confirmed by Aronov and Sharir in [56], in the special case where both P and the objects of S are convex polyhedra. They specialized their analysis of the union of convex polytopes to obtain an improved bound in the special case in which the polyhedra in question are Minkowski sums of the form /?/ 0 P, where the Ri 's are fz pairwise-disjoint convex polyhedra, P is a convex polyhedron, and the total number of faces of these Minkowski sums is s. The improved bounds are 0(ns logn) and ^{nsa(n)). If P is a cube, then the complexity of the Minkowski sum is 0(n^a(n)) [223]. 84 P.K. Agarwal and M. Sharir Agarwal and Sharir [26] showed that if 5 is a set of n Hnes and P is a sphere in M^, i.e., /C is a set of n congruent cyhnders, then the complexity of K is 0(n^/^"^^), for any ^ > 0. This bound was later improved and extended in [27]. They proved that the complexity of the Minkowski sum of a ball with a set of n triangles in M^ is 0{n^^^). OPEN PROBLEM 9. What is the complexity of the union ofn infinite cylinders of different radii in M? ? 10. Decomposition of arrangements Many applications call for decomposing each cell of the arrangement into constant size cells; see Sections 12 and 13 for a sample of such applications. In this section we describe a few general schemes that have been proposed for decomposition of arrangements. 10.1. Triangulating hyperplane arrangements Each /:-dimensional cell in an arrangement of hyperplanes is a convex polyhedron, so we can triangulate it into /:-simplices. If the cell is unbounded, some of the simplices in the triangulation will be unbounded. A commonly used scheme to triangulate a convex polytope V is the so-called bottom-vertex triangulation, denoted 7^^. It recursively triangulates every face of 7^ as follows. An edge is a one-dimensional simplex, so there is nothing to do. Suppose we have triangulated all 7-dimensional cells of 7^ for j < k. We now triangulate a A:-dimensional cell C as follows. Let v be the vertex of C with the minimum A:j-coordinate. For each (k — 1)-dimensional simplex A lying on the boundary of C but not containing v (A was constructed while triangulating a (/: — 1)-dimensional cell incident to C), we extend A to a /:-dimensional simplex by taking the convex hull of A and v; see Figure 10(i). (Unbounded cells require some care in this definition; see [117].) The number of simplices in P ^ is proportional to the number of vertices in V. If we want to triangulate the entire arrangement or more than one of its cells, we compute the bottom-vertex triangulation / ^ for each face / in the increasing order of their dimension. Let A^^ (F) denote the bottom-vertex triangulation of A(r). A useful property of A^iF) is that each simplex A e A^ (F) is defined by a set D(A) of at most d(d + 3)/2 hyperplanes of F , in the sense that A e A'^iDiA)). Moreover, if IC(A) c r is the subset of hyperplanes intersecting Z\, then A e A^(R), for a subset R ^ F, if and only if D(A) c R and IC(A) Pi /? = 0. A disadvantage of bottom-vertex triangulation is that some vertices may have large degree. Methods for obtaining low-degree triangulations have been proposed in two and three dimensions [137]. 10.2. Vertical decomposition Unfortunately, the bottom-vertex triangulation scheme does not work for arrangements of surfaces. Collins [124] described a general decomposition scheme, called cylindrical Arrangements and their applications 85 Fig. 10. (i) Bottom vertex triangulation of a convex polygon; (ii) vertical decomposition of a cell in an arrangement of segments. algebraic decomposition, that decomposes A(r) into (bn)^ cells, each semialgebraic of constant description complexity (however, the maximum algebraic degree involved in defining a cell grows exponentially with d) and homeomorphic to a ball of the appropriate dimension. Moreover, his algorithm produces a cell complex, i.e., closures of any two cells are either disjoint or their intersection is the closure of another lower-dimensional cell of the decomposition. This bound is quite far from the known trivial lower bound of Q(n^), which is a lower bound on the size of the arrangement. A significantly better scheme for decomposing arrangements of general surfaces is their vertical decomposition. Although vertical decompositions of polygons in the plane have been in use for a long time, it was extended to higher dimensions only in the late 1980s. We describe this method briefly. Let C be a 3; for J = 3 the two bounds nearly coincide. Improving the upper bound appears to be very challenging. This problem has been open since 1989; it seems difficult enough to preempt, at the present state of knowledge, any specific conjecture on the true maximum complexity of the vertical decomposition of arrangements in J > 3 dimensions. OPEN PROBLEM 10. What is the complexity of the vertical decomposition of the arrangement ofn surfaces in M^ satisfying Assumptions (A1)-(A2)? The bound stated above applies to the vertical decomposition of an entire arrangement of surfaces. In many applications, however, one is interested in the vertical decomposition of only a portion of the arrangement, e.g., a single cell, the lower envelope, the zone of some surface, a specific collection of cells of the arrangement, etc. Since, in general, the complexity of such a portion is known (or conjectured) to be smaller than the complexity of the entire arrangement, one would like to conjecture that a similar phenomenon applies to vertical decompositions. Schwarzkopf and Sharir [320] showed that the complexity of the vertical decomposition of a single cell in an arrangement of n surface patches in R^, as above, is 0(«^"^^), for any 6: > 0. A similar near-quadratic bound has been obtained by Agarwal et al. [9] for the vertical decomposition of the region enclosed between the envelope and the upper envelope of two sets of bivariate surface patches. Another recent result by Agarwal et al. [14] gives a bound on the complexity of the vertical decomposition of A^k{F) for a set F of surfaces in M^, which is only slightly larger that the worst-case complexity of A^k (F). OPEN PROBLEM 11. What is the complexity of the vertical decomposition of the minimization diagram ofn surfaces in W^ satisfying Assumptions (A1)-(A2)? Agarwal and Sharir [25] proved a near-cubic upper bound on the complexity of the vertical decomposition in the special case when the surfaces are graphs of trivariate polynomials and the intersection surface of any pair of surfaces is jc}^-monotone. In fact, their bound holds for a more general setting; see the original paper for details. An interesting special case of vertical decomposition is that of hyperplanes. For such arrangements, the vertical decomposition is a too cumbersome construct, because, as described above, one can use the bottom-vertex triangulation (or any other triangulation) to decompose the arrangement into 0(n^) simplices. Still, it is probably a useful exercise to understand the complexity of the vertical decomposition of an arrangement of n hyperplanes in M^. A result by Guibas et al. [202] gives an almost tight bound of 0(n^logn) for this quantity in R^, but nothing significantly better than the general bound is known for d > 4. Another interesting special case is that of triangles in 3-space. This has been studied by [130,342], where almost tight bounds were obtained for the case of a single Arrangements and their applications 87 Table 3 Combinatorial bounds on the maximum complexity of the vertical decomposition of n surfaces. In the second row, K is the combinatorial complexity of the arrangement Objects Bound Source SurfacesinR^, J > 3 Triangles in R Surfaces in R^, single cell Triangles in M , zone w.r.t. an algebraic surface Surfaces in M^, (^ i^)-level Hyperplanes in M"^ 0(«2^-4x^(«)) 0(n^a(n)\ogn-hK) 0(n^+^) 0(n^log^n) [103,330] [130,342] [320] [342] 0(n'^+'k) 0(n logn) [14] [202] cell (0(n^log^n)), and for the entire arrangement (0(n^a(n) logn + K)), where K is the complexity of the undecomposed arrangement). The first bound is slightly better than the general bound of [320] mentioned above. Tagansky [342] also derives sharp complexity bounds for the vertical decomposition of many cells in an arrangement of simplices, including the case of all nonconvex cells. 10.3. Other decomposition schemes Linearization, defined in Section 3, can be used to decompose the cells of the arrangement A{r) into cells of constant description complexity as follows. Suppose F admits a Hnearization of dimension k, i.e., there is a transformation ^ :M^ -> M^ that maps each point X G M^ to a point ^(x) e E^, each surface yt G T to a hyperplane hi C M^, and E^ to a J-dimensional surface U c E^. Let H = {hi \ I ^ i ^ n). We compute the bottomvertex triangulation J^ {H) of A{H). For each simplex A e A^(H), let Z = Z^ Pi T, and let zl* = (p~^(A) be the back projection of A onto E^; Z\* is a semialgebraic cell of constant description complexity. Set E = {A"" \ A e A'^(H)}. S is a decomposition of A(r) into cells of constant description complexity. If a simplex A G A ^ (H) intersects U, then A lies in the triangulation of a cell in zone(U; H). Therefore, by Theorem 5.3, \S\ = 0(n^(^~^^^^^^ log^ n), where y = (d -\-k) (mod 2). Hence, we can conclude the following. THEOREM 10.2. Let F be a set of hypersurfaces in M.^ of degree at most b. If F admits a linearization of dimension k, then A{F) can be decomposed into 0(nL^^+^^/^J log^ n) cells of constant description complexity, where y = d -\- k (mod 2). As shown in Section 3, spheres in E^ admit a linearization of dimension J + 1 ; therefore, the arrangement of n spheres in E^ can be decomposed into 0(n^ logn) cells of constant description complexity. Aronov and Sharir [52] proposed another scheme for decomposing arrangements of triangles in E^ by combining vertical decomposition and triangulation. They first decompose 88 RK. Agarwal and M. Sharir each three-dimensional cell of the arrangement into convex polyhedron, using an incremental procedure, and then they compute a bottom-vertex triangulation of each polyhedron. Other specialized decomposition schemes in M^ have been proposed in [221,271]. 10.4. Cuttings All the decomposition schemes described in this section decompose M^ into cells of constant description complexity, so that each cell lies entirely in a single face of A{r). In many applications, however, it suffices to decompose M^ into cells of constant description complexity so that each cell intersects only a few surfaces of F. Such a decomposition lies at the heart of divide-and-conquer algorithms for numerous geometric problems. Let r be a set of n surfaces in R^ satisfying Assumptions (A1)-(A2). For a parameter r ^ n, a family E = {A\,..., As) of cells of constant description complexity with pairwise disjoint interiors is called a {\/r)-cutting of A{r) if the interior of each cell in E is crossed by at most n/r surfaces of F and E covers R^. If F is a set of hyperplanes, then E is typically a set of simplices. Cuttings have led to efficient algorithms for a wide range of geometric problems and to improved bounds for several combinatorial problems. For example, the proof by Clarkson et al. [121] on the complexity of m distinct cells in arrangements of lines uses cuttings; see the survey papers [3,265] for a sample of applications of cuttings. Clarkson [116] proved that a (l/r)-cutting of size 0(r^ log^ r) exists for a set of hyperplanes in R^. The bound was improved by Chazelle and Friedman [108] to O(r^); see also [1,259,263]. An easy counting argument shows that this bound is optimal for any nondegenerate arrangement. There has been considerable work on computing optimal (1/r)cuttings efficiently [1,100,224,259,263]. Chazelle [100] showed that a (l/r)-cutting for a set of n hyperplanes in R^ can be computed in time 0(nr^~^). Using Haussler and Welzl's result on ^-nets [227], one can show that if, for any subset /? c r , there exists a canonical decomposition of A(R) into at most g(\R\) cells of constant description complexity, then there exists a (l/r)-cutting of A(F) of size 0(^(rlogr)). By the result of Chazelle et al. [103] on the vertical decomposition of A(F), there exists a (l/r)-cutting of size 0((r logr)^'^~'^+^) of A(F). On the other hand, if F admits a linearization of dimension k, then there exists a (l/r)-cutting of size 0((rlogr)L(^+^)/2Jlogr). 11. Representation of arrangements Before we begin to present algorithms for computing arrangements and their substructures, we need to describe how we represent arrangements and their substructures. Planar arrangements of fines can be represented using any standard data structure for representing planar graphs such as quad-edge, winged-edge, and half-edge data structures [207, 244,354]. However, representation of arrangements in higher dimensions is challenging because the topology of ceUs may be rather complex. Exactly how an arrangement is represented largely depends on the specific application for which we need to compute it. For Arrangements and their applications 89 example, representations may range from simply computing a representative point within each cell, or the vertices of the arrangement, to storing various spatial relationships between cells. We first review representations of hyperplane arrangements and then discuss surface arrangements. Hyperplane arrangements. A simple way to represent a hyperplane arrangement A{r) is by storing its l-skeleton [141]. That is, we construct a graph (V, E) whose nodes are the vertices of the arrangement. There is an edge between two nodes vi, Vj if they are endpoints of an edge of the arrangement. Using the l-skeleton of A{r), we can traverse the entire arrangement in a systematic way. The incidence relationship of various cells in A{r) can be represented using a data structure called incidence graph. A /^-dimensional cell C is called a subcell of a (/: + 1)-dimensional cell C if C lies on the boundary of C\ C is called the supercell of C. We assume that the empty set is a (—1)-dimensional cell of v4(r), which is a subcell of all vertices of A{r)\ and M^ is a (J + 1)-dimensional cell, which is the supercell of all J-dimensional cells of A{r). The incidence graph of A{r) has a node for each cell of A{r), including the (— 1)-dimensional and {d + 1)-dimensional cells. There is a (directed) arc from a node C to another node O if C is a subcell of C^; see Figure 11. Note that the incidence graph forms a lattice. Many algorithms for computing the arrangement construct the incidence graph of the arrangement. A disadvantage of 1-skeletons and incidence graphs is that they do not encode ordering information of cells. For examples, in planar arrangements of lines or segments, there is a natural ordering of edges incident to a vertex or of the edges incident to a twodimensional face. The quad-edge data structure encodes this information for planar arrangements. Dobkin and Laszlo [138] extended the quad-edge data structure to M^, which was later extended to higher dimensions [83,255,256]. Dobkin et al. [136] described an algorithm for representing a simple polygon as a short Boolean formula, which can be used to store faces of segment arrangements to answer various queries efficiently. Surface arrangements. Representing arrangements of surface patches is considerably more challenging than representing hyperplane arrangements because of the complex topology that cells in such an arrangement can have. A very simple representation of A{r) is to store a representative point from each cell of A{r) or to store the vertices of A{r). An even coarser representation of arrangements of graphs of polynomials is to store all realizable sign sequences. It turns out that this simple representation is sufficient for some applications [35,77]. The notion of l-skeleton can be generalized to arrangements of surfaces. However, all the connectivity information cannot be encoded by simply storing vertices and edges of the arrangement. Instead we need a finer one-dimensional structure, known as the roadmap. Roadmaps were originally introduced by Canny [90,92] to determine whether two points lie in the same connected component of a semialgebraic set; see also [195,197,230]. They were subsequently used for computing a semialgebraic description of connected components of a semialgebraic set [71,94,231]. We can extend the notion of roadmaps to entire arrangements. Roughly speaking, a roadmap 7l{r) of A{r) is a one-dimensional semialgebraic set that satisfies the following two conditions. (Rl) For every cell C in A{r), C Pi lZ{r) is nonempty and connected. 90 RK. Agarwal and M. Sharir (R2) Let Cu) be the cross-section of a cell C G A(r) at the hyperplane x\=w. For any w; G R and for cell C e A{r), C^^^ impHes that every connected component of Cyo intersects 1Z(r). We can also define the roadmap of various substructures of arrangements. See [69,90] for details on roadmaps. A roadmap does not represent "ordering" of cells in the arrangement or adjacency relationship among various cells. If we want to encode the adjacency relationship among higher dimensional cells of ^ ( F ) , we can compute the vertical decomposition or the cylindrical algebraic decomposition of A(r) and compute the adjacency relationship of cells in the decomposition [43,317]. Brisson [83] describes the cell-tuple data structure that encodes topological structures, ordering among cells, the boundaries of cells, and other information for cells of surface arrangements. Many query-type applications (e.g., point location, ray shooting) call for preprocessing A{r) into a data structure so that various queries can be answered efficiently. In these cases, instead of storing various cells of an arrangement explicitly, we can store the arrangement implicitly, e.g., using cuttings. Chazelle et al. [104] have described how to preprocess arrangements of surfaces for point-location queries; Agarwal et al. [9] have described data structures for storing lower envelopes in R"* for point-location queries. 12. Computing arrangements We now review algorithms to compute the arrangement A{r) of a set F of n surface patches satisfying Assumptions (A1)-(A2). As in Chapter 1, we need to assume here an appropriate model of computation in which various primitive operations on a constant number of surfaces can be performed in constant time. We will assume an infinite-precision real arithmetic model in which the roots of any polynomial of constant degree can be computed exactly in constant time. Constructing arrangements of hyperplanes and simplices. Edelsbrunner et al. [157] describe an incremental algorithm that computes in time O(n^) the incidence graph of A{r), for a set Fofn hyperplanes in R^. Roughly speaking, their algorithm adds the hyperplanes of F one by one and maintains the incidence graph of the arrangement of the hyperplanes added so far. Let 7^ be the set of hyperplanes added in the first / stages, and let )//+i be the next hyperplane to be added. In the (/ + l)st stage, the algorithm traces )//+i through A(Fi). If a /:-face / of A(Fi) does not intersect y/, then / remains a face of A(Fi^]). If / intersects y/+i, then / G zone(yi-^\; Fi) and / is split into two /:-faces f'^, f~, lying in the two open halfspaces bounded by y/+i, and a (/: — l)-face f = f C\yi^\. The algorithm therefore checks the faces of zone{yiJ^\; Fi) whether they intersect y/+i. For each such intersecting face, it adds corresponding nodes in the incidence graph and updates the edges of the incidence graph. The (/ + l)st stage can be completed in time proportional to the complexity of zone (yi-^\; Fi), which is 0(/^~^); see [142,157]. Hence, the overall running time of the algorithm is 0(n^). A drawback of the algorithm just described is that it requires 0(n^) "working" storage because it has to maintain the entire arrangement constructed so far in order to determine Arrangements and their applications 91 (ii) (i) Fig. 11. (i) Incidence graph of the arrangement of 2 Hnes. (ii) Adding a new line; incremental changes in the incidence graph as the vertex v, the edge 5, and the face A' are added. which of the cells intersect the new hyperplane. An interesting question is whether A{r) can be computed using only 0{n) working storage. Edelsbrunner and Guibas [148] proposed the topological sweep algorithm that can construct the arrangement of n lines in O(n^) time using 0{n) working storage. Their algorithm, which is a generalization of the sweep-line algorithm of Bentley and Ottmann [72], sweeps the plane by a pseudo-line. The algorithm by Edelsbrunner and Guibas can be extended to enumerate all vertices in an arrangement of n hyperplanes in R^ in 0(n^) time using 0(n) space. See [41,58,161] for other topological-sweep algorithms. Avis and Fukuda [61] developed an algorithm that can enumerate in 0(n^k) time, using 0(n) space, all k vertices of the arrangement of a set F of n hyperplanes in M.^ in which every vertex is incident to d hyperplanes. Their algorithm is useful when there are many parallel hyperplanes in F. See also [62,186] for some related results. Using the random-sampling technique, Clarkson and Shor [120] developed an 0(n log n + k) expected time algorithm for constructing the arrangement of a set Fofn line segments in the plane; here k is the number of vertices in A(F); see also [284,285]. Chazelle and Edelsbrunner [102] developed a deterministic algorithm that can construct A(F) in time 0(n logn -j- k), using 0(n -f- k) storage. The space complexity was improved to 0(n), without affecting the asymptotic running time, by Balaban [63]. If F is a set of n triangles in R^, A (F) can be constructed in 0(n^ logn + k) expected time using a randomized incremental algorithm [106,330]. De Berg et al. [130] proposed a deterministic algorithm with 9 II 0(n a(n) logn + klogn) running time for computing A (F). 92 RK. Agarwal and M. Sharir Chazelle and Friedman [109] described an algorithm that can preprocess a set F of n hyperplanes into a data structure of size 0(n^/log^ n) so that a point-location query can be answered in O(logn) time. Their algorithm was later simplified by Matousek [267] and Chazelle [100]. Mulmuley and Sen [287] developed a randomized dynamic data structure of size 0(n^) for point location in arrangements of hyperplanes that can answer a point-location query in 0(\ogn) expected time and can insert or delete a hyperplane in 0(n^~^ logn) expected time. Hagerup et al. [210] described a randomized parallel algorithm for constructing the arrangement of hyperplanes under the CRCW model. Their algorithm runs in 0(\ogn) time using 0(n^/logn) expected number of processors. A deterministic algorithm under the CREW model with the same worst-case performance was proposed by Goodrich [193]. There has been some work on constructing arrangements of lines and segments using floating-point (finite precision) arithmetic. Milenkovic [279] developed a general technique called double-precision geometry that can be applied to compute arrangements of lines and segments in the plane. For example, if the coefficients of each line in a set Fofn lines are represented using at most b bits, then his technique can compute A(r) in 0(n^ logn) time using at most b-\-20 bits of precision. A careful implementation of the algorithm by Edelsbrunner et al. [157] requires 3b bits of precision. Because of finite-precision arithmetic, Milenkovic's technique computes the coordinates of vertices approximately, and therefore produces a planar geometric graph, which is an arrangement of pseudo-lines. If the approximate arithmetic used by his algorithm makes relative error e, then the maximum error in the coordinates of vertices of A(r) computed by his algorithm is 0(^/s). Fortune and Milenkovic [182] showed that the sweep-line and incremental algorithms can be implemented so that the maximum error in the coordinates of vertices is at most 0(ne). For all practical purposes this approach is better than the one described in [279]. See [196,200, 222,278,280,308] for a few additional results on constructing arrangements using floatingpoint arithmetic. Constructing arrangements of surfaces. The algorithm by Edelsbrunner et al. [157] for computing hyperplane arrangements can be extended to computing the vertical decomposition A (F) for a set F of n arcs in the plane. In the (/ + l)st step, the algorithm traces }//+i through zone{yi-^\; Fi) and updates the trapezoids of A (Fj) that intersect )//+i. The running time of the (/ + l)st stage is 0(Ks-\-2(i))^ where s is the maximum number of intersection points between a pair of arcs in F. Hence, the overall running time of the algorithm is 0(nks-\-2(n)) [150]. Suppose F is a set of arcs in the plane in general position. If the arcs in F are added in a random order and a "history dag," as described in Chapter 1, is used to efficiently find the trapezoids of ^ (Fi) that intersect y/+i, the expected running time of the algorithm can be improved to 0(n logn -J- k), where k is the number of vertices in A(F) [106,330]. Very little is known about computing the arrangement of a set F of surfaces in higher dimensions. Chazelle et al. [103] have shown that A (F) can be computed in randomized expected time 0(«^^~^+^), using the random-sampling technique. Their algorithm can be made deterministic without increasing its asymptotic running time, but the deterministic algorithm is considerably more complex. Arrangements and their applications 93 There has been some work for computing arrangements under the more reahstic model of precise rational arithmetic model used in computational real algebraic geometry [76]. Canny [93] had described an {nb)^^^''-iix^t algorithm for computing a sample point from each cell of the arrangement of a set of n hypersurfaces in R^, each of degree at most b. The running time was improved by Basu et al. [70] to n^+'^iy^i^) ^ Basu et al. [69] described an n^'^ ^ b^^^ ^ -time algorithm for computing the roadmap of a semialgebraic set defined by n polynomials, each of degree at most b. Although their goal is to develop the roadmap of a semialgebraic set, their algorithm first constructs the road map of the entire arrangement of the surfaces defining the semialgebraic set and then outputs the appropriate portion of the map. 13. Computing substructures in arrangements 13.1. Lower envelopes Let r be a set of surface patches satisfying Assumptions (A1)-(A2). We want to compute the minimization diagram A^(F) of F. We described in Chapter 1 the algorithms for computing the minimization diagram of a set of arcs in the plane. In this chapter we will focus on minimization diagrams of sets of surface patches in higher dimensions. There are again several choices, depending on the application, as to what exactly we want to compute. The simplest choice is to compute the vertices or the 1-skeleton of A4(r). A more difficult task is to compute all the faces of MiF) and represent them using any of the mechanisms described in the previous section. Another challenging task, which is required in many applications, is to store F into a data structure so that Lr(x), for any point x G M^""^ can be computed efficiently. For collections F of surface patches in M?, the minimization diagram A4(F) is a planar subdivision. In this case, the latter two tasks are not significantly harder than the first one, because we can preprocess M (F) using any optimal planar point-location algorithm [ 132]. Several algorithms have been developed for computing the minimization diagram of bivariate (partial) surface patches [21,78,79,128,328,330]. Some of these techniques use randomized algorithms, and their expected running time is 0(n^+^), which is comparable with the maximum complexity of the minimization diagram of bivariate surface patches. The simplest algorithm is probably the deterministic divide-and-conquer algorithm presented by Agarwal et al. [21]. It partitions F into two subsets A , A of roughly equal size, and computes recursively the minimization diagrams A^i, M2 of Fi and F2, respectively. It then computes the overlay A^* of A^i and M.2' Over each face / of A^* there are only (at most) two surface patches that can attain the final envelope (the one attaining L(Fi) over / and the one attaining L(F2) over / ) , so we compute the minimization diagram of these two surface patches over / , replace / by this refined diagram, and repeat this step for all faces of A^*. We finally merge any two adjacent faces / , /^ of the resulting subdivision if the same surface patches attain L(F) over both / and f\ The cost of this step is proportional to the number of faces of Al*. By the result of Agarwal et al. [21], A^* has 0(n^+^) faces. This imphes that the complexity of the above divide-and-conquer algorithm is 0(n^+^). If r is a set of triangles in M^, the running time of the algorithm is 0(n^a(n)) [151]. 94 P.K. Agarwal and M. Sharir This divide-and-conquer algorithm can also be used to compute S{r, F'), the region lying above all surface patches of one collection F' and below all surface patches of another collection T, in time Oin^^^), where n = \F\ + \F'\ [21]. A more difficult problem is to devise output-sensitive algorithms for computing M{F), whose complexity depends on the actual combinatorial complexity of the envelope. A rather complex algorithm is presented by de Berg [127] for the case of triangles in R^, whose running time is 0{n^^^^^ + n^^^^^k'^f^), where k is the number of vertices in M{F). If the triangles in F are pairwise disjoint, the running time can be improved to The algorithm by Edelsbrunner et al. [151] can be extended to compute in 0{n^~^a{n)) time all faces of the minimization diagram of {d — l)-simplices in R^ for d^A. However, little is known about computing the minimization diagram of more general surface patches in J ^ 4 dimensions. Let F be a set of surface patches in R^ satisfying Assumptions (A1)-(A2). Agarwal et al. [9] showed that all vertices, edges, and 2-faces of A^(r) can be computed in randomized expected time 0(n^~^+^). We sketch their algorithm below. Assume that F satisfies Assumptions (A1)-(A5). Fix a (J — 2)-tuple of surface patches, say y i , . . . , y^-2, and decompose their common intersection H t i ^ // i^^o smooth, x\X2monotone, connected patches, using a stratification algorithm. Let 77 be one such piece. Each surface yi ,fori^d—l, intersects 77 at a curve$,, which partitions 77 into two regions. If we regard each yi as the graph of a partially defined (d — l)-variate function, then we can define Ki c 77 to be the region whose projection on the hyperplane 7/ : Xd = 0 consists of points X at which y, (x) ^ yi (x) = • • • = yj-ii^)- The intersection Q = n / > j - i ^i is equal to the portion of 77 that appears along the lower envelope L(F).Wc repeat this procedure for all patches of the intersection P|-r, y, and for all (d — 2)-tuples of surface patches. This will give all the vertices, edges and 2-faces of L(F). Since 77 is x 1^2-monotone 2-manifold, computing Q is essentially the same as computing the intersection ofn — d-\-2 planar regions. Q can thus be computed using an appropriate variant of the randomized incremental approach [106,128]. It adds ^/ = y/ D 77 one by one in a random order (^ may consist of 0(1) arcs), and maintains the intersection of the regions Ki for the arcs added so far. Let Qr denote this intersection after r arcs have been added. We maintain the "vertical decomposition" of Qr (within 77), and represent Qr as a collection of pseudo-trapezoids. We maintain additional data structures, including a history dag and a union-find structure, and proceed exactly as in [106,128] (See Chapter 1). We omit here the details. We define the weight of a pseudo-trapezoid r to be the number of surface patches y/, for / > J — 1, whose graphs either cross r or hide r completely from the lower envelope (excluding the up to four function graphs whose intersections with 77 define r). The cost of the above procedure, summed over all (d — 2)-tuples of 7^, is proportional to the number of pseudo-trapezoids that are created during the execution of the algorithm, plus the sum of their weights, plus an overhead term of 0(n^~') needed to prepare the collections of arcs §/ over all two-dimensional patches 77. Modifying the analysis in the papers cited above, Agarwal et al. prove the following. 13.1 (Agarwal, Aronov and Sharir [9]). Let F be a set ofn surface patches in W^ satisfying Assumptions (A1)-(A2). The vertices, edges, and 2-faces of M{F) can be computed in randomized expected time 0{n^~^^^),for any 6: > 0. THEOREM

Arrangements and their applications

95

For d = A, the above algorithm can be extended to compute the incidence graph (or celltuple structure) of M.{r). Their approach, however, falls short of computing such representations for J > 4. Agarwal et al. also show that the three-dimensional point-location algorithm by Preparata and Tamassia [307] can be extended to preprocess a set of trivariate surface patches in time 0(n^+^) into a data structure of size 0(n^+^) sothatLr(x), for any point x G M^, can be computed in 0(log^ n) time. OPEN PROBLEM 12. Let r be a set of n surface patches in R^, for d > 4, satisfying Assumptions (A1)-(A3). How fast can F be preprocessed, so that Lr(x), for a query point X G M^~^ can be computed efficiently!

13.2. Single cells Computing a single cell in an arrangement of n hyperplanes in M^ is equivalent, by duality, to computing the convex hull of a set of n points in E^ and is a widely studied problem; see, e.g., [142,324] for a summary of known results. For J > 4, an 0(nL^/^^) expected-time algorithm for this problem was proposed by Clarkson and Shor [120] (see also [323]), which is optimal in the worst case. By derandomizing this algorithm, Chazelle [101] developed an 0(«^^/^^)-time deterministic algorithm. A somewhat simpler algorithm with the same running time was later proposed by Bronnimann et al. [85]. These results imply that the Euclidean Voronoi diagram of a set of n points in W^ can be computed in time 0(n ^^/^^). Since the complexity of a cell may vary between 0(1) and 0(n^^^^^), output-sensitive algorithms have been developed for computing a single cell in hyperplane arrangements [111,246,321]. For J < 3, Clarkson and Shor [120] gave randomized algorithms with expected time 0(nlogh), where h is the complexity of the cell, provided that the planes are in general position. Simple deterministic algorithms with the same worst-case bound were developed by Chan [95]. Seidel [321] proposed an algorithm whose running time is 0(n^ + h logn); the first term can be improved to 0(n^~^/^^^/^^+^^ log^ n) [266] or to 0((n/i)^"^/^L^/^J+^Hog''n) [96]. Chan et al. [99] described another output-sensitive algorithm whose running time is 0((n + (nf) ^ ~ ^/ ^^^'^'^ + fn^~^l ^^/^^) log*^ n). Avis et al. [60] described an algorithm that can compute in 0(nf) time, using 0(n) space, all / vertices of a cell in an arrangement of n hyperplanes in M^; see also [82,185]. All these outputsensitive bounds hold only for simple arrangements. Although many of these algorithms can be extended to nonsimple arrangements, the running time increases. As mentioned in Chapter 1, Guibas et al. [206] developed an 0(A^+2(^) log^ n)-time algorithm for computing a single face in an arrangement of n arcs, each pair of which intersect in at most s points. Later a randomized algorithm with expected time 0(A,^+2 W log n) was developed by Chazelle et al. [106]. Since the complexity of the vertical decomposition of a single cell in an arrangement of n surface patches in M? is 0(n^+^) [320], an application of the random-sampling technique yields an algorithm for computing a single cell in time 0(n^^^) in an arrangement of n surface patches in M? [320]. If F is a set of triangles, the running time can be improved to 0(n^ log^ n) [128]. Halperin [211,212] developed faster algorithms for computing a single cell in arrangements of "special" classes of bivariate surfaces that arise in motion-planning applications.

96

P.K. Agarwal and M. Sharir

13.3. Levels Let T be a set of n arcs in the plane, each pair of which Constructing the ^k-level intersect in at most 5" points. A^k (^) can be computed by a simple divide-and-conquer algorithm as follows [326]. Partition F into two subsets Fi, F2, each of size at most \n/2'], compute recursively A^k(^\), A^ki^^i), and then use a sweep-line algorithm to compute A^k(^) from A^k(J"\) and A^ki^i)- The time spent in the merge step is proportional to the number of vertices in A^ki^)^ A^k(^2) and the number of intersections points between the edges of two subdivisions, each of which is a vertex of A(F) whose level is at most 2k. Using Theorem 6.1, the total time spent in the merge step is 0(Xs-\-2(n)klogn). Hence, the overall running time of the algorithm is 0(Xs-\-2(n)k\og^ n). If we use a randomized incremental algorithm that adds arcs one by one in a random order and maintains A^kin)^ where Fi is the set of arcs added so far, the expected running time of the algorithm is 0(ks-\-2(n)k login/k)); see, e.g., [286]. Everett et al. [178] showed that if F is a set of n lines, the expected running time can be improved to 0(n \ogn + nk). Recently Agarwal et al. [13] gave another randomized incremental algorithm that can compute A^k(^) in expected time 0(ks-\-2(n)(k -\-\ogn)). In higher dimensions, little is known about computing A^ki^)^ for collections F of surface patches. For d = 3, Mulmuley [286] gave a randomized incremental algorithm for computing the ^/:-level in an arrangement of n planes whose expected running time is 0(nk^ login/k)). The expected running time can be improved to 0(n log'^ n -f nk^) using the algorithm by Agarwal et al. [13]. There are, however, several technical difficulties in extending this approach to computing levels in arrangements of surface patches. Using the random-sampling technique, Agarwal et al. [14] developed an Oin^^^k) expected-time algorithm for computing A^ki^)^ for a collection F of n surface patches in R^. Their algorithm can be derandomized without affecting the asymptotic running time. For J > 4, Agarwal et al.'s and Mulmuley's algorithms can compute the ^/:-level in arrangements of n hyperplanes in expected time Oin^^^'^^k^^^^^). These algorithms do not extend to computing the ^/:-level in surface arrangements because no nontrivial bound is known for the complexity of a triangulation of A^k i^) in four and higher dimensions. Constructing a single level Edelsbrunner and Welzl [ 164] gave an 0(/i logn-\-b log^ n)time algorithm to construct the /:-level in an arrangement of n lines in the plane, where b is the number of vertices of the /:-level. This bound was slightly improved by Cole et al. [123] to 0(« Xogn + b log^ k) and then recently by Chang [98] to 0(« \ogn + b \og^^^ n) for any ^ > 0. Haar-Peled [225] gave on 0((n + b)ain)\ogn) expected time algorithm. However, these algorithms do not extend to computing the /:-level in arrangements of curves. The approach by Agarwal et al. [13] can compute the /:-level in an arrangement of lines in randomized expected time OinXo^n + nk^^^Xo^^^n), and it extends to arrangements of curves and to arrangements of hyperplanes. Agarwal and Matousek [19] describe an output-sensitive algorithm for computing the /:-level in an arrangement of planes. The running time of their algorithm, after a slight improvement by Chan [96], is OinXogb + b^^^), where b is the number of vertices of the A:-level. Their algorithm can compute the k-lt\tX in an arrangement of hyperplanes in R^ in time 0(nlogZ? + («Z?)^-^/(L^/^J+^^+^ + Z?ni-2/(L^/2J+J)+^). As in the case ofsingle cells, all the output-sensitive algorithms assume that the hyperplanes are in general position.

Arrangements and their applications

97

13.4. Marked cells Let F be a set of n lines in the plane and S a set of m points in the plane. Edelsbmnner et al. [152] presented a randomized algorithm, based on the random-sampling technique, for computing C(S, F), the set of cells in A(r) that contain at least one point of S, whose expected running time is 0(m^^^~^n^^^^^^ -{-mlogn-\-nlognlogm), for any ^ > 0. A deterministic algorithm with running time 0{m^/^n^^^ \og^ n -\-n log^ n-^m logn) was developed by Agarwal [2]. However, both algorithms are rather complicated. A simple randomized divide-and-conquer algorithm, with 0((my/n + n) logn) expected running time, was recently proposed by Agarwal et al. [20]. Using random sampling, they improved the expected running time to 0(m^/^n^/^ log^^^(n/^/m) -\- (m-\-n) logn). If we are interested in computing the incidences between F and 5, the best known algorithm is by Matousek whose expected running time is o(m^/^f2^/^2^^^''§*^'^+''^^ + (m -f n)log(m + n)) [268]. An Q{m^/^n^^^ -^ {m-\-n) log(m + n)) lower bound for this problem is proved by Erickson [177] under a restricted model of computation. Matousek's algorithm can be extended to higher dimensions to count the number of incidences between m points and n hyperplanes in M^ in time 0((mn)^-i/^^+^>2^^^^g*^^+^>> + (m + w) log(m + n)) [268]. The above algorithms can be modified to compute marked cells in arrangements of segments in the plane. The best known randomized algorithm is by Agarwal et al. [20] whose running time is 0{m^^^n^^^ log^(n/v^) + (m + nlogm + na{n)) logn). Little is known about computing marked cells in arrangements of arcs in the plane. Using a randomized incremental algorithm, C{S, F) can be computed in expected time 0{ks+2(n)\f^^ogn), where s is the maximum number of intersection points between a pair of arcs in F [330]. If F is a set of n unit-radius circles and 5 is a set of m points in the plane, the incidences between F and S can be computed using Matousek's algorithm [268]. Randomized incremental algorithms can be used to construct marked cells in arrangements of hyperplanes in higher dimensions in time close to their worst-case complexity. For example, if F is a set of n planes in M^ and ^ is a set of m points in M^, then the incidence graph of cells in C{S, F) can be computed in expected time 0{nm^/^ logn) [128]. For J > 4, the expected running time is 0(m^/^n^/^log^ n), where y = {[_d/2\ — l)/2. De Berg et al. [133] describe an efficient point-location algorithm in the zone of a /c-flat in an arrangement of hyperplanes in R^. Their algorithm can answer a query in 0(log n) time using 0(nL^^+^V^J log^n) space, where y =d-\-k (mod2).

13.5. Union of objects Let r be a set of n semialgebraic simply connected regions in the plane, each of constant description complexity. The union of F can be computed in 0 ( / ( n ) log^ n) time by a divide-and-conquer technique, similar to that described in Section 13.3 for computing A^k{F). Here f(m) is the maximum complexity of the union of a subset of F of size m. Alternatively, \JF can be computed in 0 ( / ( n ) l o g n ) expected time using the lazy randomized incremental algorithm by De Berg et al. [128]. As a consequence, the union of n convex fat objects, each of constant description complexity, can be computed in 0(n^"^^) time, for any ^ > 0; see Section 9.

98

RK. Agarwal and M. Sharir

Aronov et al. [57] modified the approach by Agarwal et al. [9] so that the union of n convex polytopes in R^ with a total of s vertices can be computed in expected time 0{sn log n log s-\-rv'). The same approach can be used to compute the union of n congruent cylinders in time 0{n^^^). (Again, consult Section 9 for the corresponding bounds on the complexity of the union.) Many applications call for computing the volume or surface area of [J /" instead of its combinatorial structure. Overmars and Yap [292] showed that the volume of the union of n axis-parallel boxes in R^ can be computed in 0(n^^^ logn) time. Edelsbrunner [144] gave an elegant formula for the volume and the surface area of the union of n balls in R^, which can be used to compute the volume efficiently.

14. Applications In this section we present a sample of applications of arrangements. We discuss a few specific problems that can be reduced to bounding the complexity of various substructures of arrangements of surfaces or to computing these substructures. We also mention a few general areas that have motivated several problems involving arrangements and in which arrangements have played an important role.

14.1. Range searching A typical range-searching problem is defined as follows: Preprocess a set Sofn points in R*^, so that all points of S lying in a query region can be reported {or counted) quickly. A special case of range searching is halfspace range searching, in which the query region is a halfspace. Because of numerous applications, range searching has received much attention during the last twenty years. See [16,269] for recent surveys on range searching and its applications. If we define the dual of a point p = (a\,..., aj) to be the hyperplane p* :xcj = —a\xi — • • • — ad~\Xd-\ + ad, and the dual of a hyperplane h : Xd = b\x\ -\ h bd-\Xd-i + bd to be the point h* = (b\,..., bd), then p lies above (resp. below, on) h if and only if the hyperplane p* lies above (resp. below, on) the point h*. Hence, halfspace range searching has the following equivalent "dual" formulation: Preprocess a set F of n hyperplanes in R^ so that the hyperplanes of H lying below a query point can be reported quickly, or the level of a query point can be computed quickly. Using the point-location data structure for hyperplane arrangements given in [100], the level of a query point can be computed in O(logn) time using 0(n^/ \og^ n) space. This data structure can be modified to report all t hyperplanes lying below a query point in time 0(\ogn + t). Chazelle et al. [110] showed, using results on arrangements, that a two-dimensional halfspace range-reporting query can be answered in 0(logn + t) time using 0(n) space. In higher dimensions, by constructing (l/r)-cuttings for A^k(F), Matousek [264] developed a data structure that can answer a halfspace range-reporting query in time 0(\ogn + t) using 0(n^^^'^^ log^n) space, for some constant c. He also developed a data structure that can answer a query in time 0(n^~^^^^^^^ log'^n + t) using 0(nlog\ogn) space [264]. See also [6,112]. Using

Arrangements and their applications

99

linearization, a semialgebraic range-searching query, where one wants to report all points of S lying inside a semialgebraic set of constant description complexity, can be answered efficiently using some of the halfspace range-searching data structures [18,359]. Point location in hyperplane arrangements can be used for simplex range searching [113], ray shooting [17,18,271], and several other geometric searching problems [29].

14.2. Terrain visualization Let i^ be di polyhedral terrain in Mr" with n edges; that is, E is the graph of a continuous piecewise-linear bivariate function, so it intersects each vertical line in exactly one point. The orthographic view of X" in direction Z? G §^ is the decomposition of 77, a plane normal to the direction h and placed at infinity, into maximal regions so that the rays emerging in direction b from all points in such a region hit the same face of U, or none of them hit iJ. The perspective view of U from a point a G M^ is the decomposition of S^ into maximal connected regions so that, for each region /? c S^ and for all points b e R, either the first intersection point of E and the ray r emanating from a in direction b lie in the same face of E (which depends on R), or none of these rays meet E. The orthographic (resp. perspective) aspect graph of E represents all topologically different orthographic (resp. perspective) views of E. For background and a survey of recent research on aspect graphs, see [81]. Here we will show how the complexity bounds for lower envelopes can be used to derive near-optimal bounds on the aspect graphs of polyhedral terrains. A pair of parallel rays (pi, p2) is called critical if for each / = 1, 2, the source point of Pi lies on an edge at of E, pi passes through three edges of E (including a/), and pi does not intersect the (open) region lying below E. It can be shown that the number of topologically different orthographic views of E is 0(n^) plus the number of critical pairs of parallel rays. Fix a pair a\, a2 of edges of E. Agarwal and Sharir [23] define, for each pair (a\, ^2) of edges of E, a collection J-'a^aj of n trivariate functions, so that every pair (pi, P2) of critical rays, where pi emanates from a point on a/ (for / = 1, 2), corresponds to a vertex of A4(Tai,a2)- They also show that the graphs of the functions in J-'ai,a2 satisfy Assumptions (A1)-(A2). Using Theorem 3.1 and summing over all pairs of edges of iJ, we can conclude that the number of critical pairs of rays, and thus the number of topologically different orthographic views of E, is O(n^+0. Using a more careful analysis, Halperin and Sharir [218] proved that the number of different orthographic views is n De Berg et al. [131] have constructed a terrain for which there are Q(n^a(n)) topologically different orthographic views. If E is an arbitrary polyhedral set with n edges, the maximum possible number of topologically different orthographic views of E is 0(n^) [304]. De Berg et al. [131] showed that if i7 is a set of k pairwise-disjoint convex polytopes with a total of n vertices, then the number of orthographic views is 0{n^k^)\ the best known lower bound is Q {n^0). Agarwal and Sharir extended their approach to bound the number of perspective views of a terrain. They argue that the number of perspective views of E is proportional to the number of triples of rays emanating from a common point, each of which passes through three edges of E before intersecting the open region lying below E. Following a similar

100

RK. Agarwal and M. Sharir

approach to the one sketched above, they reduce the problem to the analysis of lower envelopes of O(n^) families of 5-variate functions, each family consisting of 0(n) functions that satisfy Assumptions (A1)-(A2). This leads to an overall bound of 0{n^^^) for the number of topologically different perspective views of E. This bound is also known to be almost tight in the worst case, as follows from another lower-bound construction given by De Berg et al. [131]. Again, in contrast, if U is an arbitrary polyhedral set with n edges, the maximum possible number of topologically different perspective views of i:is6)(n^) [304].

14.3. Transversals Let 5 be a set of n compact convex sets in R^. A hyperplane h is called a transversal of S if h intersects every member of 5. Let T{S) denote the space of all hyperplane transversals of S. We wish to study the structure of T{S). To facilitate this study, we apply the dual transform described in Section 14.1. Let h \ Xd = a\x\ -\h ad-\Xd~\ + ^j be a hyperplane that intersects a set ^ G 5. Translate h up and down until it becomes tangent to s. Denote the resulting upper and lower tangent hyperplanes by Xd=a\x\

H

Xd=a\x\

H

and

respectively. Then we have Ls{a\,...,ad-\) 0 in R^. The results in [21] concerning the complexity of the vertical decomposition of S(r, F') imply that T{S) can be constructed in 0{n^^^) time. No sharp bounds are known on T{S) in higher dimensions. However, in four dimensions, using the algorithm by Agarwal et al. [9] for point location in the minimization diagram of trivariate functions, we can preprocess S into a data structure of size 0(«^+^) so that we can determine in O(logn) time whether a hyperplane /? is a transversal of S. The problem can be generalized by considering lower-dimensional transversals. For example, in R^ we can also consider the space of all line transversals of S (lines that meet

Arrangements and their applications

101

every member of S). By mapping lines in R^ into points in R"^, and by using an appropriate parametrization of the lines, the space of all line transversals of S can be represented as the region in M^ enclosed between the upper envelope and the lower envelope of two respective collections of surfaces. Pellegrini and Shor [302] showed that if 5* is a set of triangles in R^, then the space of line transversals of S has ^320(Viogn) complexity. The bound was slightly improved by Agarwal [4] to 0(n^ logn). He reduced the problem to bounding the complexity of a family of cells in an arrangement of 0{n) hyperplanes in R^. Agarwal et al. [10] proved that the complexity of the space of line transversals for a set of n balls in R^ is 0(^z^+^). Their argument works even if 5* is a set of homothets of a convex region of constant description complexity in R^. Smorodinsky et al. [333] showed that n disjoint balls in R^ can be stabbed by a line in 0{n^~^) different ways.

14.4. Geometric optimization In the past few years, many problems in geometric optimization have been attacked by techniques that reduce the problem to constructing and searching in various substructures of surface arrangements. Hence, the area of geometric optimization is a natural extension, and a good application area, of the study of arrangements. See [24] for a recent survey on geometric optimization. One of the basic techniques for geometric optimization is the parametric searching technique, originally proposed by Megiddo [275]. This technique reduces the optimization problem to a decision problem, where one needs to compare the optimal value to a given parameter. In most cases, the decision problem is easier to solve than the optimization problem. The parametric searching technique proceeds by a parallel simulation of a generic version of the decision procedure with the (unknown) optimum value as an input parameter. In most applications, careful implementation of this technique leads to a solution of the optimization problem whose running time is larger than that of the decision algorithm only by a polylogarithmic factor. See [24] for a more detailed survey of parametric searching and its applications. Several alternatives to parametric searching have been developed during the past decade. They use randomization [25,97,262], expander graphs [238], and searching in monotone matrices [183]. Like parametric searching, all these techniques are based on the availability of an efficient procedure for the decision problem. When applicable, they lead to algorithms with running times that are similar to, and sometimes slightly better than, those yielded by parametric searching. These methods have been used to solve a wide range of geometric optimization problems, many of which involve arrangements. We mention a sample of such results. Slope selection. Given a set S of n points in R^ and an integer k, find the line with the ^th smallest slope among the lines passing through pairs of points of 5. If we dualize the points in 5 to a set F of lines in R^, the problem becomes that of computing the ^th leftmost vertex of A{r). Cole et al. [122] developed a rather sophisticated 0(n log n)-time algorithm for this problem, which is based on parametric searching. (Here the decision problem is to determine whether at most k vertices of A{r) lie to the left of a given vertical

102

RK. Agarwal and M. Sharir

line.) A considerably simpler algorithm, based on (l/r)-cuttings, was later proposed by Bronnimann and Chazelle [84]. See also [237,262]. Distance selection. Given a set 5 of n points in R^ and a parameter k ^ (2), find the A:-th largest distance among the points of S [12,238]. The corresponding decision problem reduces to point location in an arrangement of congruent disks in R^. Specifically, given a set r of m congruent disks in the plane, we wish to count efficiently the number of containments between disks of F and points of S. This problem can be solved using parametric searching [12], expander graphs [238], or randomization [262]. The best known deterministic algorithm, given by Katz and Sharir [238], runs in 0(«^/-^ log^"^^ n) time. Segment center. Given a set S of n points in R^ and a line segment e, find a placement of e that minimizes the largest distance from the points of 5 to ^ [15,169]. The decision problem reduces to determining whether given two families F and F' of bivariate surfaces, S{F, F'), the region lying between Lp and Up', is empty. Exploiting the special properties of F and F\ Efrat and Sharir [169] show that the complexity of S{F, F') is 0{n\ogn). They describe an 0(n*"^^)-time algorithm to determine whether S{F, F') is empty, which leads to an 0(n'"^^)-time algorithm for the segment-center problem. Extremal polygon placement. Given a convex m-gon P and a closed polygonal environment Q with n vertices, find the largest similar copy of P that is fully contained in Q [331]. Here the decision problem is to determine whether P, with a fixed scaling factor, can be placed inside Q\ this is a variant of the corresponding motion-planning problem for P inside Q, and is solved by constructing an appropriate representation of the 3-dimensional free configurafion space, as a collection of cells in a corresponding 3dimensional arrangement of surfaces. The running time of the whole algorithm is only slightly larger than the time needed to solve the fixed-size placement problem. The best running time is 0{mnk(i{mn)\og'mn\o^n) [11]; see also [243,331]. If Q is a convex n-gon, the largest similar copy of P that can be placed inside Q can be computed in 0{mn^\ogn) time [5]. Diameter in 3D. Given a set S of n points in R^^, determine the maximum distance between a pair of points in S. The problem is reduced to determining whether S lies in the intersection of a given set Fofn congruent balls. A randomized algorithm with 0(n logn) expected time was proposed by Clarkson and Shor [120]. A series of papers [105,272, 310,309] describe near-linear-time deterministic algorithms. The best known deterministic algorithm runs in 0(n log^ n) time [73,309]. Width in 3D. Given a set S of n points in R^^, determine the smallest distance between two parallel planes enclosing S between them. This problem has been studied in a series of papers [9,25,105], and the currently best known randomized algorithms computes the width in 0(n^/^+^) expected time [25]. The technique used in attacking the decision problems for this and the two following problems reduce them to point location in the region above the lower envelope of a collection of trivariate functions in R^.

Arrangements and their applications

103

Biggest stick in a simple polygon. Compute the longest line segment that can fit inside a given simple polygon with n edges. The current best solution is 0(n^/^"^^) [25] (see also [9,28]). Minimum-width annulus. Compute the annulus of smallest width that encloses a given set of n points in the plane. This problem arises in fitting a circle through a set of points in the plane. Again, the current best solution is 0{n^^'^^^) [25] (see also [9,28]). Geometric matching. Consider the problem where we are given two sets S\, S2 of n points in the plane, and we wish to compute a minimum-weight matching in the complete bipartite graph Si x S2, where the weight of an edge (p,q) is the Euclidean distance between p and q. One can also consider the analogous nonbipartite version of the problem, which involves just one set S of 2n points, and the complete graph on S. The goal is to explore the underlying geometric structure of these graphs, to obtain faster algorithms than those available for general abstract graphs. Vaidya [347] had shown that both the bipartite and the nonbipartite versions of the problem can be solved in time close to 0(n^^^). A fairly sophisticated application of vertical decomposition in three-dimensional arrangements, given in [14], has improved the running time for the bipartite case to 0(n^^^). Recently, Varadarajan [350] proposed an 0(n^^^log'^ n)-timt algorithm for the nonbipartite case. Center point. A center point of a set S of n points in the plane is a point TT G M^ so that each line i passing through n has the property that at least [n/?>\ points lie in each halfplane bounded hy I. It is well known that such a center point always exists [142]. If we dualize 5 to a set F of n lines in the plane, then n*, the line dual to n, lies between Ain/3\ (r) and Ai2n/3] (^). Cole et al. [123] described an 0(n log^ n)-timc algorithm for computing a center point of S, using parametric searching. The problem of computing the set of all center points reduces to computing the convex hull of Ak(r) for a given k. Matousek [260] described an 0(n log^ n)-time algorithm for computing the convex hull of Ak(r) for any k ^n; recall, in contrast, that the best known upper bound for Ak(r) is 0(n(k + 1)^/^); see [119] for an approximation algorithm. Ham sandwich cuts. Let Si, S2,. --, Sd be d sets of points in R^, each containing n points. Suppose n is even. A ham sandwich cut is a hyperplane h so that each open halfspace bounded by h contains at most n/2 points of 5*/, for / = 1 , . . . , d. It is known [142, 358] that such a cut always exists. Let Ft be the set of hyperplanes dual to 5/. Then the problem reduces to computing a vertex of the intersection of An/2(^i) and .4^/2(^2)Megiddo [276] developed a linear-time algorithm for computing a ham sandwich cut in the plane if Si and ^2 can be separated by a line. For arbitrary point sets in the plane, a linear-time algorithms was later developed by Lo et al. [257]. Lo et al. also described an algorithm for computing a ham sandwich cut in M^ whose running time is 0(i/n/2 (^) log^ n), where ij/kin) is the maximum complexity of the /^-level in an arrangement of n lines in the plane. By Dey's result on /^-levels [134], the running time of their algorithm is Oin'^/Hog^n).

104

P.K. Agarwal and M. Sharir

14.5. Robotics As mentioned in the introduction, motion planning for a robot system has been a major motivation for the study of arrangements. Let 5 be a robot system with d degrees of freedom, which is allowed to move freely within a given two- or three-dimensional environment cluttered with obstacles. Given two placements / and F of B, determining whether there exists a collision-free path between these placements reduces to determining whether / and F lie in the same cell of the arrangement of the family F of "contact surfaces" in W^, regarded as the configuration space of B (see the introduction for more details). If / and F lie in the same cell, then a path between / and F in R^ that does not intersect any surface of F corresponds to a collision-free path of B in the physical environment from / to F. Schwartz and Sharir [317] developed an n^ -time algorithm for this problem. If J is a part of the input, the problem was later proved to be PSPACE-complete [91,312]. Canny [90,92] gave an n^^^^-time algorithm to compute the roadmap of a single cell in an arrangement A(F) of a set F of n surfaces in R^ provided that the cells in A(F) form a Whitney regular stratification of R^ (see [194] for the definition of Whitney stratification). Using a perturbation argument, he showed that his approach can be extended to obtain a Monte Carlo algorithm to determine whether two points lie in the same cell of A(F). The algorithms was subsequently extended and improved by many researchers see [69, 195,230]. The best known algorithm, due to Basu et al. [69], can compute the roadmap in time n^-^^tf^(^ \ Much work has been done on developing efficient algorithms for robots with a small number of degrees of freedom, say, two or three [211,221,242]. The result by Schwarzkopf and Sharir [320] gives an efficient algorithm for computing a collision-free path between two given placements for fairly general robot systems with three degrees of freedom. See [214,318,329] for surveys on motion-planning algorithms. It is impractical to compute the roadmap, or any other explicit representation, of a single cell in A(F) if d is large. A general Monte Carlo algorithm for computing a probabilistic roadmap of a cell in A(F) is described by Kavraki et al. [240]. This approach avoids computing the cell explicitly. Instead, it samples a large number of random points in the configuration space and only those configurations that lie in the free configuration space (FP) are retained (they are called milestones); we also add / and F as milestones. The algorithm then builds a "connectivity graph" whose nodes are these milestones, and whose edges connect pairs of milestones if the line segment joining them in configuration space lies in F P (or if they satisfy some other "local reachability" rule). Various strategies have been proposed for choosing random configurations [40,66,234,239]. The algorithm returns a path from / to F if they lie in the same connected component of the resulting network. Note that this algorithm may fail to return a collision-free path from I to F even if there exists one. This technique nevertheless has been successful in several real-world applications. Assembly planning is another area in which the theory of arrangements has led to efficient algorithms. An assembly is a collection of objects (called parts) placed rigidly in some specified relative positions so that no two objects overlap. A subassembly of an assembly A is a subset of objects in A in their relative placements in A. An assembly operation is a motion that merges some subassemblies of A into a new and larger subassembly. An assembly sequence for A is a sequence of assembly operations that starts with the individual parts separated from each other and ends up with the full assembly A. The goal of assembly

Arrangements and their applications

105

planning is to compute an assembly sequence for a given assembly. A classical approach to assembly sequencing is disassembly sequencing, which separates an assembly into its individual parts [233]. The reverse order of a sequence of disassemblying operations yields an assembly sequence. Several kinds of motion have been considered in separating parts of an assembly, including translating a subassembly along a straight line, arbitrary translational motion, rigid motion, etc. A common approach to generate a disassembly sequence is the so-called nondirectional blocking graph approach. It partitions the space of all allowable motions of separation into a finite number of cells so that within each cell the set of "blocking relations" between all pairs of parts remains fixed. The problem is then reduced to computing representative points in cells of the arrangement of a family of surfaces. This approach has been successful in many instances, including polyhedral assembly with infinitesimal rigid motion [201]; see also [214,215]. Other problems in robotics that have exploited arrangements include fixturing [311], MEMS (micro electronic mechanical systems) [77], path planning with uncertainty [129], and manufacturing [30]. 14.6. Molecular modeling In the introduction, we described the Van der Waals model, in which a molecule M is represented as a collection F of spheres in R^. (See [125,145,277] for other geometric models of molecules.) Let i7 = 9(IJ T). 17 is called the "surface" of M. Many problems in molecular biology, especially those that study the interaction of a protein with another molecule, involve computing the molecular surface, a portion of the surface (e.g., the socalled active site of a protein), or various features of the molecular surface [147,216,253, 351]. We briefly describe two problems in molecular modeling that can be formulated in terms of arrangements. The chemical behavior of solute molecules in a solution is strongly dependent on the interactions between the solute and solvent molecules. These interactions are critically dependent on those molecular fragments that are accessible to the solvent molecules. Suppose we use the Van der Waals model for the solute molecule and model the solvent by a sphere S. By rolling S on the molecular surface i7, we obtain a new surface U\ traced by the center of the rolling sphere. If we enlarge each sphere of F by the radius of 5, U^ is the boundary of the union of the enlarged spheres. As mentioned above, several methods have been proposed to model the surface of a molecule. The best choice of the model depends on the chemical problem the molecular surface is supposed to represent. For example, the Van der Waals model represents the space requirement of molecular conformations, while isodensity contours and molecular electrostatic potential contour surfaces [277] are useful in studying molecular interactions. An important problem in molecular modeling is to study the interrelations among various molecular surfaces of the same molecule. For example, let X" = { U i , . . . , iJ^j be a family of molecular surfaces of the same molecule. We may want to compute the arrangement A{IJ), or we may want to compute the subdivision of Et induced by

[EjCMJill^Ji^i^m}. Researchers have also been interested in computing "connectivity" of a molecule, e.g., computing voids, tunnels, and pockets of 17. A void of U is a bounded component of

106

RK. Agarwal and M. Sharir

^^ \ (U ^ ) ' ^ tunnel is a hole through | J F that is accessible from the outside, i.e., an "inner" part of a non-contractible loop in R^ \ | J F ; and ?i pocket is a depression or cavity on E. Pockets are not holes in the topological sense and are not well defined; see [126,147] for some of the definitions proposed so far. Pockets and tunnels are interesting because they are good candidates to be binding sites for other molecules. Efficient algorithms have been developed for computing 17, connectivity of i7, and the arrangement A{r) [145,216,351]. Halperin and Shelton [222] describe an efficient perturbation scheme to handle degeneracies while constructing A{r) or U. Some applications require computing the measure of different substructures of A{r), including the volume of U, the surface area of E, or the volume of a void of E. Edelsbrunner et al. [146] describe an efficient algorithm for computing these measures; see also [144,145].

15. Conclusions In this survey we reviewed a wide range of topics on arrangements of surfaces. We mentioned a few old results, but the emphasis of the survey was on the tremendous progress made in this area during the last fifteen years. We discussed combinatorial complexity of arrangements and their substructures, representation of arrangements, algorithms for computing arrangements and their substructures, and several geometric problems in which arrangements play pivotal roles. Although the survey covered a broad spectrum of results, many topics on arrangements were either not included or very briefly touched upon. For example, we did not discuss arrangements of pseudo-lines and oriented matroids, we discussed algebraic and topological issues very briefly, and we mentioned a rather short list of applications that have exploited arrangements. There are numerous other sources where more details on arrangements and their applications can be found; see e.g. the books [74, 281,291,294,330] and the survey papers [192,213,283,293].

Acknowledgments The authors thank Boris Aronov, Saugata Basu, Bernard Chazelle, Herbert Edelsbrunner, Jeff Erickson, Leo Guibas, Dan Halperin, Sariel Har-Peled, Jifi Matousek, Ricky Pollack, Marie-Francoise Roy, Raimund Seidel, and Emo Welzl for several useful discussions, for valuable comments on an earlier version of the paper, and for pointing out a number of relevant papers.

References [1] RK. Agarwal, Partitioning arrangements of lines: I. An efficient deterministic algorithm. Discrete Comput. Geom. 5 (1990), 449-483. [2] RK. Agarwal, Partitioning arrangements of lines: II. Applications, Discrete Comput. Geom. 5 (1990), 533-573. [3] RK. Agarwal, Geometric partitioning and its applications, Computational Geometry: Papers from the DIMACS Special Year, I.E. Goodman, R. Pollack and W. Steiger, eds, Amer. Math. Soc, Providence, RI (1991), 1-37.

Arrangements

and their applications

107

[4] P.K. Agarwal, On stabbing lines for polyhedra in 3d, Comput. Geom. Theory Appl. 4 (1994), 177-189. [5] P.K. Agarwal, N. Amenta and M. Sharir, Placement of one convex polygon inside another. Discrete Comput. Geom. 19 (1998), 95-104. [6] P.K. Agarwal, L. Arge, J. Erickson, P.G. Franciosa and J.S. Vitter, Efficient searching with linear constraints, Proc. Annu. ACM Sympos. Principles Database Syst. (1998), 169-178. [7] P.K. Agarwal and B. Aronov, Counting facets and incidences. Discrete Comput. Geom. 7 (1992), 359-369. [8] P.K. Agarwal, B. Aronov, T.M. Chan and M. Sharir, On levels in arrangements of lines, segments, planes and triangles. Discrete Comput. Geom. 19 (1998), 315-331. [9] P.K. Agarwal, B. Aronov and M. Sharir, Computing envelopes in four dimensions with applications, SIAM J. Comput. 26 (1997), 1714-1732. [10] P.K. Agarwal, B. Aronov and M. Sharir, Line traversals of balls and smallest enclosing cylinders in three dimensions. Discrete Comput. Geom. 21 (1999), 373-388. [11] P.K. Agarwal, B. Aronov and M. Sharir, Motion planning for a convex polygon in a polygonal environment. Discrete Comput. Geom. 22 (1999), 201-221. [12] P.K. Agarwal, B. Aronov, M. Sharir and S. Suri, Selecting distances in the plane, Algorithmica 9 (1993), 495-514. [13] P.K. Agarwal, M. de Berg, J. Matousek and O. Schwarzkopf, Constructing levels in arrangements and higher order Voronoi diagrams, SIAM J. Comput. 27 (1998), 654-667. [14] P.K. Agarwal, A. Efrat and M. Sharir, Vertical decomposition of shallow levels in ?>-dimensional arrangements and its applications, Proc. 11th Annu. Sympos. Comput. Geom. (1995), 39-50. [15] P.K. Agarwal, A. Efrat, M. Sharir and S. Toledo, Computing a segment center for a planar point set, J. Algorithms 15 (1993), 314-323. [16] P.K. Agarwal and J. Erickson, Geometric range searching and its relatives. Advances in Discrete and Computational Geometry, B. Chazelle, J.E. Goodman and R. Pollack, eds, Amer. Math. Soc, Providence, RI (1998), 1-56. [17] P.K. Agarwal and J. Matousek, Ray shooting and parametric search, SIAM J. Comput. 22 (1993), 794806. [18] P.K. Agarwal and J. Matousek, On range searching with semialgebraic sets. Discrete Comput. Geom. 11 (1994), 393^18. [19] P.K. Agarwal and J. Matousek, Dynamic half-space range reporting and its applications, Algorithmica 13 (1995), 325-345. [20] P.K. Agarwal, J. Matousek and O. Schwarzkopf, Computing many faces in arrangements of lines and segments, SIAM J. Comput. 27 (1998), 491-505. [21] P.K. Agarwal, O. Schwarzkopf and M. Sharir, The overlay of lower envelopes and its applications. Discrete Comput. Geom. 15 (1996), 1-13. [22] P.K. Agarwal and M. Sharir, Red-blue intersection detection algorithms, with applications to motion planning and collision detection, SIAM J. Comput. 19 (1990), 297-321. [23] P.K. Agarwal and M. Sharir, On the number of views of polyhedral terrains. Discrete Comput. Geom. 12 (1994), 177-182. [24] P.K. Agarwal and M. Sharir, Efficient algorithms for geometric optimization, ACM Comput. Surv. 30 (1998), 412^58. [25] P.K. Agarwal and M. Sharir, Efficient randomized algorithms for some geometric optimization problems. Discrete Comput. Geom. 16 (1996), 317-337. [26] P.K. Agarwal and M. Sharir, Motion planning of a ball amidst segments in three dimensions, Proc. 10th ACM SIAM Sympos. Discrete Algo. [27] P.K. Agarwal and M. Sharir, Pipes, cigars, and kreplach: The union of Minkowski sums in three dimensions, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 143-153. [28] P.K. Agarwal, M. Sharir and S. Toledo, Applications of parametric searching in geometric optimization, J. Algorithms 17 (1994), 292-318. [29] P.K. Agarwal, M. van Kreveld and M. Overmars, Intersection queries in curved objects, J. Algorithms 15 (1993), 229-266. [30] H.-K. Ahn, M. de Berg, P. Bose, S.-W. Cheng, D. Halperin, J. Matousek and O. Schwarzkopf, Separating an object from its cast, Proc. 13th Annu. Sympos. Comput. Geom. (1997), 221-230.

108

RK. Agarwal and M. Sharir

[31] M. Ajtai, V. Chvatal, M. Newborn and E. Szemeredi, Crossing-free subgraphs, Ann. Discrete Math. 12 (1982), 9-12. [32] G.L. Alexanderson and J.E. Wetzel, Dissections of a plane oval, Amer. Math. Monthly 84 (1977), 442449. [33] G.L. Alexanderson and J.E. Wetzel, Simple partitions of space. Math. Mag. 51 (1978), 220-225. [34] G.L. Alexanderson and J.E. Wetzel, Arrangements ofplanes in space. Discrete Math. 34 (1981), 219-240. [35] N. Alon, Tools from higher algebra. Handbook of Combinatorics, R.L. Graham, M. Grotschel and L. Lovasz, eds, Elsevier, Amsterdam (1995), 1749-1783. [36] N. Alon, I. Barany, Z. Fiiredi and D. Kleitman, Point selections and weak s-netsfor convex hulls, Combin. Probab. Comput. 1 (1992), 189-200. [37] N. Alon and E. Gyori, The number of small semispaces of a finite set of points in the plane, J. Combin. Theory Ser. A 41 (1986), 154-157. [38] H. Alt, S. Felsner, F. Hurtado and M. Noy, Point sets with few k-sets, Proc. 14th Symp. Comput. Geom. (1998), 200-205. [39] H. Alt, R. Fleischer, M. Kaufmann, K. Mehlhom, S. Naher, S. Schirra and C. Uhrig, Approximate motion planning and the complexity of the boundary of the union of simple geometric figures, Algorithmica 8 (1992), 391^06. [40] N. Amato, O.B. Bayazit, L.K. Dale, C. Jones and D. Vallejo, OBPRM: An obstacle-based PRM for 3D workspaces, Proc. Workshop on Algorithmic Foundations of Robotics, P.K. Agarwal, L.E. Kavraki and M. Mason, eds, A.K. Peters, Wellesley, MA (1998), 155-168. [41] E.G. Anagnostou, L.J. Guibas and V.G. Polimenis, Topological sweeping in three dimensions, Proc. 1st Annu. SIGAL Intemat. Sympos. Algorithms, Lecture Notes in Comput. Sci. 450, Springer-Verlag (1990), 310-317. [42] A. Andrzejak, B. Aronov, S. Har-Peled, R. Seidel and E. Welzl, Results on k-sets and j-facets via continuous motion arguments, Proc. 14th Symp. Comput. Geom. (1998), 192-199. [43] D.S. Amon, G.E. Collins and S. McCallum, Cylindrical algebraic decomposition II: The adjacency algorithm for the plane, SIAM J. Comput. 13 (1984), 878-889. [44] B. Aronov, A lower bound on Voronoi diagram complexity. Unpublished manuscript (1998). [45] B. Aronov, M. Bern and D. Eppstein, Arrangements of convex polytopes. Unpublished manuscript (1995). [46] B. Aronov, B. Chazelle, H. Edelsbrunner, L.J. Guibas, M. Sharir and R. Wenger, Points and triangles in the plane and halving planes in space. Discrete Comput. Geom. 6 (1991), 435^42. [47] B. Aronov and T. Dey, Polytopes in arrangements, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 154-162. [48] B. Aronov, H. Edelsbrunner, L.J. Guibas and M. Sharir, The number of edges of many faces in a line segment arrangement, Combinatorica 12 (1992), 261-274. [49] B. Aronov, A. Efrat, D. Halperin and M. Sharir, On the number of regular vertices on the union of Jordan regions, Proc. 6th Scandinavian Workshop on Algorithm Theory (1998), 322-334. [50] B. Aronov, J. Matousek and M. Sharir, On the sum of squares of cell complexities in hyperplane arrangements, J. Combin. Theory Ser. A 65 (1994), 311-321. [51] B. Aronov, M. Pellegrini and M. Sharir, On the zone of a surface in a hyperplane arrangement. Discrete Comput. Geom. 9 (1993), 177-186. [52] B. Aronov and M. Sharir, Triangles in space or building {and analyzing) castles in the air, Combinatorica 10(1990), 137-173. [53] B. Aronov and M. Sharir, The union of convex polyhedra in three dimensions, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (1993), 518-527. [54] B. Aronov and M. Sharir, Castles in the air revisited. Discrete Comput. Geom. 12 (1994), 119-150. [55] B. Aronov and M. Sharir, The common exterior of convex polygons in the plane, Comput. Geom. 8 (1997), 139-149. [56] B. Aronov and M. Sharir, On translational motion planning of a convex polyhedron in 3-space, SIAM J. Comput. 26 (1997), 1785-1803. [57] B. Aronov, M. Sharir and B. Tagansky, The union of convex polyhedra in three dimensions, SIAM J. Comput. 26 (1997), 1670-1688. [58] T. Asano, L.J. Guibas and T. Tokuyama, Walking on an arrangement topologically, Intemat. J. Comput. Geom. Appl. 4 (1994), 123-151.

Arrangements

and their applications

109

[59] F. Aurenhammer, Voronoi diagrams: A survey of a fundamental geometric data structure, ACM Comput. Surv. 23 (1991), 345-405. [60] D. Avis, D. Bremner and R. Seidel, How good are convex hull algorithms!, Comput. Geom. 7 (1997), 265-302. [61] D. Avis and K. Fukuda, A pivoting algorithm for convex hulls and vertex enumeration of arrangements andpolyhedra. Discrete Comput. Geom. 8 (1992), 295-313. [62] D. Avis and K. Fukuda, Reverse search for enumeration. Discrete Appl. Math. 65 (1996), 2 1 ^ 6 . [63] I.J. Balaban, An optimal algorithm for finding segment intersections, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 211-219. [64] I. Barany, Z. Fiiredi and L. Lovasz, On the number of halving planes, Combinatorica 10 (1990), 175-183. [65] I. Barany and W. Steiger, On the expected number ofk-sets. Discrete Comput. Geom. 11 (1994), 243-263. [66] J. Barraquand and J.-C. Latombe, Robot motion planning: A distributed representation approach, Intemat. J. Robot. Res. 10 (1991), 628-649. [67] S. Basu, On the combinatorial and topological complexity of a single cell, Proc. 39th Annual JEEE Sympos. on Foundations of Comp. Sci. (1999), 606-616. [68] S. Basu, R. Pollack and M.-F Roy, On the number of cells defined by a family ofpolynomials on a variety, Mathematika 43 (1994), 120-126. [69] S. Basu, R. Pollack and M.-F. Roy, Computing roadmaps of semi-algebraic sets, Proc. 28th Annu. ACM Sympos. Theory Comput. (1996), 168-173. [70] S. Basu, R. Pollack and M.-F. Roy, On computing a set of points meeting every semi-algebraically connected component of a family ofpolynomials on a variety, J. Complexity 13 (1997), 28-37. [71] S. Basu, R. Pollack and M.-F. Roy, Complexity of computing semi-algebraic descriptions of the connected components of a semi-algebraic set. Unpublished manuscript (1998). [72] J.L. Bentley and T.A. Ottmann, Algorithms for reporting and counting geometric intersections, IEEE Trans. Comput. C-28 (1979), 643-647. [73] S. Bespamyatnikh, An efficient algorithm for the three-dimensional diameter problem, Proc. 9th Annu. ACM-SIAM Sympos. Discrete Algorithms (1998), 137-146. [74] A. Bjomer, M. Las Vergnas, N. White, B. Sturmfels and G.M. Ziegler, Oriented Matroids, Cambridge University Press, Cambridge (1993). [75] A. Bjomer and G.M. Ziegler, Combinatorial stratification of complex arrangements, J. Amer. Math. Soc. 5 (1992), 105-149. [76] J. Bochnak, M. Coste and M.-F. Roy, Geometric Algebrique Reelle, Springer-Verlag, Heidelberg, West Germany (1987). [77] K.-F Bohringer, B. Donald and D. Halperin, The area bisectors of a polygon and force equilibria in programmable vector fields, Proc. 13th Annu. Sympos. Comput. Geom. (1997), 457^59. [78] J.-D. Boissonnat and K. Dobrindt, Randomized construction of the upper envelope of triangles in R , Proc. 4th Canad. Conf. Comput. Geom. (1992), 311-315. [79] J.-D. Boissonnat and K. Dobrindt, On-line construction of the upper envelope of triangles and surface patches in three dimensions, Comput. Geom. 5 (1996), 303-320. [80] J.-D. Boissonnat, M. Sharir, B. Tagansl^y and M. Yvinec, Voronoi diagrams in higher dimensions under certain polyhedral distance functions. Discrete Comput. Geom. 19 (1998), 485^19. [81 ] K. W. Bowyer and C.R. Dyer, Aspect graphs: An introduction and survey of recent results. Int. J. of Imaging Systems and Technology 2 (1990), 315-328. [82] D. Bremner, K. Fukuda and M. Marzetta, Primal-dual methods for vertex and facet enumeration, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 49-56. [83] E. Brisson, Representing geometric structures in d dimensions: Topology and order. Discrete Comput. Geom. 9 (1993), 387-426. [84] H. Bronnimann and B. Chazelle, Optimal slope selection via cuttings, Proc. 6th Canad. Conf. Comput. Geom. (1994), 99-103. [85] H. Bronnimann, B. Chazelle and J. Matousek, Product range spaces, sensitive sampling and derandomization, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (1993), 400-409. [86] U.A. Brousseau, A mathematician's progress, Math. Teacher 59 (1966), 722-727. [87] R.C. Buck, Partition of space, Amer. Math. Monthly 50 (1943), 541-544.

110

RK. Agarwal and M. Sharir

[88] C. Bumikel, K. Mehlhom and S. Schirra, On degeneracy in geometric computations, Proc. 5th ACMSIAM Sympos. Discrete Algorithms (1994), 16-23. [89] R. Canham, A theorem on arrangements of lines in the plane, Israel J. Math. 7 (1969), 393-397. [90] J. Canny, The Complexity of Robot Motion Planning, MIT Press, Cambridge, MA (1987). [91] J. Canny, Some algebraic and geometric computations in PSPACE, Proc. 20th Annu. ACM Sympos. Theory Comput. (1988), 460-467. [92] J. Canny, Computing roadmaps in general semialgebraic sets, Comput. J. 36 (1993), 409^18. [93] J. Canny, Improved algorithms for sign determination and existential quantifier elimination, Comput. J. 36(1993), 504-514. [94] J.F. Canny, D. Grigor'ev and N. Vorobjov, Finding connected components of a semi-algebraic set in subexponential time, Appl. Algebra Emg. Commun. Comput. 2 (1992), 217-238. [95] T.M. Chan, Optimal output-sensitive convex hull algorithms in two and three dimensions. Discrete Comput. Geom. 16 (1996), 361-368. [96] T.M. Chan, Output-sensitive results on convex hulls, extreme points and related problems. Discrete Comput. Geom. 16 (1996), 369-387. [97] T.M. Chan, Geometric applications of a randomized optimization technique, Proc. 14th ACM Symp. Comput. Geom. (1998), 269-278. [98] T. Chan, Remarks on k-level algorithms in the plane. Unpublished manuscript (1999). [99] T.M. Chan, J. Snoeyink and C.K. Yap, Primal dividing and dual pruning: Output-sensitive construction of 4-dpolytopes and 3-d Voronoi diagrams. Discrete Comput. Geom. 18 (1997), 433^54. [100] B. Chazelle, Cutting hyperplanes for divide-and-conquer. Discrete Comput. Geom. 9 (1993), 145-158. [101] B. Chazelle, An optimal convex hull algorithm in any fixed dimension, Discrete Comput. Geom. 10 (1993), 377^09. [102] B. Chazelle and H. Edelsbrunner, An optimal algorithm for intersecting line segments in the plane, J. ACM 39 (1992), 1-54. [103] B. Chazelle, H. Edelsbrunner, L.J. Guibas and M. Sharir, A singly-exponential stratification scheme for real semi-algebraic varieties and its applications, Proc. 16th Internal. Colloq. Automata Lang. Program., Lecture Notes Comput. Sci. 372, Springer-Verlag (1989), 179-192. [104] B. Chazelle, H. Edelsbrunner, L.J. Guibas and M. Sharir, A singly-exponential stratification scheme for real semi-algebraic varieties and its applications, Theoret. Comput. Sci. 84 (1991), 77-105. [105] B. Chazelle, H. Edelsbrunner, L.J, Guibas and M. Sharir, Diameter, width, closest line pair and parametric searching. Discrete Comput. Geom. 10 (1993), 183-196. [106] B. Chazelle, H. Edelsbrunner, L.J. Guibas, M. Sharir and J. Snoeyink, Computing a face in an arrangement of line segments and related problems, SIAM J. Comput. 22 (1993), 1286-1302. [107] B. Chazelle, H. Edelsbrunner, L.J. Guibas, M. Sharir and J. Stolfi, Lines in space: Combinatorics and algorithms, Algorithmica 15 (1996), 428-447. [108] B. Chazelle and J. Friedman, A deterministic view of random sampling and its use in geometry, Combinatorica 10 (1990), 229-249. [109] B. Chazelle and J. Friedman, Point location among hyperplanes and unidirectional ray-shooting, Comput. Geom. 4 (1994), 53-62. [110] B. Chazelle, L.J. Guibas and D.T. Lee, The power of geometric duality, BIT 25 (1985), 76-90. [ I l l ] B. Chazelle and J. Matousek, Derandomizing an output-sensitive convex hull algorithm in three dimensions, Comput. Geom. 5 (1995), 27-32. [112] B. Chazelle and F.P. Preparata, Half space range search: An algorithmic application of k-sets. Discrete Comput. Geom. 1 (1986), 83-93. [113] B. Chazelle, M. Sharir and E. Welzl, Quasi-optimal upper bounds for simplex range searching and new zone theorems, Algorithmica 8 (1992), 407^29. [114] L.P. Chew, Near-quadratic bounds for the L \ Voronoi diagram of moving points, Comput. Geom. 7 (1997), 73-80. [115] L.P. Chew, K. Kedem, M. Sharir, B. Tagansky and E. Welzl, Voronoi diagrams of lines in 3-space under polyhedral convex distance functions, J. Algorithms 29 (1998), 238-255. [116] K.L. Clarkson, New applications of random sampling in computational geometry. Discrete Comput. Geom. 2 (1987), 195-222. [117] K.L. Clarkson, A randomized algorithm for closest-point queries, SIAM J. Comput. 17 (1988), 830-847.

Arrangements

and their applications

111

[118] K. Clarkson, A bound on local minima of arrangements that implies the upper bound theorem. Discrete Comput. Geom. 10 (1993), 427-433. [119] K. Clarkson, D. Eppstein, G.L. Miller, C. Sturtivant and S.-H. Teng, Approximating center points with iterative Radon points, Intemat. J. Comput. Geom. Appl. 6 (1996), 357-377. [120] K.L. Clarkson and P.W. Shor, Applications of random sampling in computational geometry, II, Discrete Comput. Geom. 4 (1989), 387-421. [121] K.L. Clarkson, H. Edelsbrunner, L.J. Guibas, M. Sharir and E. Welzl, Combinatorial complexity bounds for arrangements of curves and spheres. Discrete Comput. Geom. 5 (1990), 99-160. [122] R. Cole, J. Salowe, W. Steiger and E. Szemeredi, An optimal-time algorithm for slope selection, SIAM J. Comput. 18 (1989), 792-810. [123] R. Cole, M. Sharir and C.K. Yap, On k-hulls and related problems, SIAM J. Comput. 16 (1987), 61-77. [124] G.E. Collins, Quantifier elimination for real closed fields by cylindrical algebraic decomposition, Proc. 2nd GI Conference on Automata Theory and Formal Languages, Lecture Notes in Comput. Sci. 33, Springer-Verlag, Berlin, West Germany (1975), 134-183. [125] M.L. Connolly, Analytical molecular surface calculation, J. Appl. Cryst. 16 (1983), 548-558. [126] T.H. Connolly, Molecular interstitial skeleton. Computer Chem. 15 (1991), 37-45. [127] M. de Berg, Ray Shooting, Depth Orders and Hidden Surface Removal, Springer-Verlag, Berlin, Germany (1993). [128] M. de Berg, K. Dobrindt and O. Schwarzkopf, On lazy randomized incremental construction. Discrete Comput. Geom. 14 (1995), 261-286. [129] M. de Berg, L. Guibas, D. Halperin, M. Overmars, O. Schwarzkopf, M. Sharir and M. Teillaud, Reaching a goal with directional uncertainty, Theoret. Comput. Sci. 140 (1995), 301-317. [130] M. de Berg, L.J. Guibas and D. Halperin, Vertical decompositions for triangles in 3-space, Discrete Comput. Geom. 15 (1996), 35-61. [131] M. de Berg, D. Halperin, M. Overmars and M. van Kreveld, Sparse arrangements and the number of views ofpolyhedral scenes, Intemat. J. Comput. Geom. Appl. 7 (1997), 175-195. [132] M. de Berg, M. van Kreveld, M. Overmars and O. Schwarzkopf, Computational Geometry: Algorithms and Applications, Springer-Verlag, Berlin, Germany (1997). [133] M. de Berg, M. van Kreveld, O. Schwarzkopf and J. Snoeyink, Point location in zones of k-flats in arrangements, Comput. Geom. 6 (1996), 131-143. [134] T.K. Dey, Improved bounds on planar k-sets and related problems. Discrete Comput. Geom. 19 (1998), 373-382. [135] T.K. Dey and H. Edelsbrunner, Counting triangle crossings and halving planes. Discrete Comput. Geom. 12(1994), 281-289. [136] D.R Dobkin, L.J. Guibas, J. Hershberger and J. Snoeyink, An efficient algorithm for finding the CSG representation of a simple polygon, Comput. Graph. 22 (1988), 31-40. Proc. SIGGRAPH '88. [137] D.P. Dobkin and D.G. Kirkpatrick, Fast detection of polyhedral intersection, Theoret. Comput. Sci. 27 (1983), 241-253. [138] D.P. Dobkin and M.J. Laszlo, Primitives for the manipulation of three-dimensional subdivisions, Algorithmica4(1989), 3-32. [139] D.P. Dobkin and S. Teller, Computer graphics. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, PL (1997), 779-796. [140] R.A. Dwyer, Voronoi diagrams of random lines and flats. Discrete Comput. Geom. 17 (1997), 123-136. [141] H. Edelsbrunner, Edge-skeletons in arrangements with applications, Algorithmica 1 (1986), 93-109. [142] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag, Heidelberg (1987). [143] H. Edelsbrunner, The upper envelope of piecewise linear functions: Tight complexity bounds in higher dimensions. Discrete Comput. Geom. 4 (1989), 337-343. [144] H. Edelsbrunner, The union of balls and its dual shape. Discrete Comput. Geom. 13 (1995), 415^40. [145] H. Edelsbrunner, Geometry of modeling biomolecules, Proc. Workshop on Algorithmic Foundations of Robotics, PK. Agarwal, L.E. Kavraki and M. Mason, eds, A.K. Peters, Wellesley, MA (1998), 265-277. [146] H. Edelsbrunner, M. Facello, P. Fu and J. Liang, Measuring proteins and voids in proteins, Proc. 28th Ann. Hawaii Internat. Conf. System Sciences, Biotechnology Computing, Vol. V (1995), 256-264.

112

RK. Agarwal and M. Sharir

[147] H. Edelsbrunner, M. Facello and J. Liang, On the definition and the construction of pockets in macromolecules. Tech. Report IULU-ENG-95-1736, Department of Computer Science, University of Illinois at Urbana-Champaign (1995). [148] H. Edelsbrunner and L.J. Guibas, Topologically sweeping an arrangement, J. Comput. Syst. Sci. 38 (1989), 165-194. Corrigendum in 42 (1991), 249-251. [149] H. Edelsbrunner, L.J. Guibas, J. Hershberger, J. Pach, R. Pollack, R. Seidel, M. Sharir and J. Snoeyink, Arrangements of Jordan arcs with three intersections per pair, Discrete Comput. Geom. 4 (1989), 523539. [150] H. Edelsbrunner, L.J. Guibas, J. Pach, R. Pollack, R. Seidel and M. Sharir, Arrangements of curves in the plane: Topology, combinatorics and algorithms, Theoret. Comput. Sci. 92 (1992), 319-336. [151] H. Edelsbrunner, L.J. Guibas and M. Sharir, The upper envelope ofpiecewise linear functions: Algorithms and applications. Discrete Comput. Geom. 4 (1989), 311-336. [152] H. Edelsbrunner, L.J. Guibas and M. Sharir, The complexity and construction of many faces in arrangements of lines and of segments. Discrete Comput. Geom. 5 (1990), 161-196. [153] H. Edelsbrunner, L.J. Guibas and M. Sharir, The complexity of many cells in arrangements of planes and related problems. Discrete Comput. Geom. 5 (1990), 197-216. [154] H. Edelsbrunner and P. Hajnal, A lower bound on the number of unit distances between the vertices of a convex polygon, J. Combin. Theory Ser. A 56 (1991), 312-316. [155] H. Edelsbrunner and D. Haussler, The complexity of cells in three-dimensional arrangements. Discrete Math. 60 (1986), 139-146. [156] H. Edelsbrunner and E.P. Miicke, Simulation of simplicity: A technique to cope with degenerate cases in geometric algorithms, ACM Trans. Graph. 9 (1990), 66-104. [157] H. Edelsbrunner, J. O'Rourke and R. Seidel, Constructing arrangements of lines and hyperplanes with applications, SIAM J. Comput. 15 (1986), 341-363. [158] H. Edelsbrunner and R. Seidel, Voronoi diagrams and arrangements. Discrete Comput. Geom. 1 (1986), 25^4. [159] H. Edelsbrunner, R. Seidel and M. Sharir, On the zone theorem for hyperplane arrangements, SIAM J. Comput. 22 (1993), 418^29. [160] H. Edelsbrunner and M. Sharir, A hyperplane incidence problem with applications to counting distances, Applied Geometry and Discrete Mathematics: The Victor Klee Festschrift, P. Gritzman and B. Sturmfels, eds, AMS Press, Providence, RI (1991), 253-263. [161] H. Edelsbrunner and D.L. Souvaine, Computing median-of-squares regression lines and guided topological sweep, J. Amer. Statist. Assoc. 85 (1990), 115-119. [162] H. Edelsbrunner, P. Valtr and E. Welzl, Cutting dense point sets in half. Discrete Comput. Geom. 17 (1997), 243-255. [163] H. Edelsbrunner and E. Welzl, On the number of line separations of a finite set in the plane, J. Combin. Theory Ser. A 40 (1985), 15-29. [164] H. Edelsbrunner and E. Welzl, Constructing belts in two-dimensional arrangements with applications, SIAM J. Comput. 15 (1986), 271-284. [165] H. Edelsbrunner and E. Welzl, On the maximal number of edges of many faces in an arrangement, J. Combin. Theory Ser. A 41 (1986), 159-166. [166] A. Efrat, The complexity of the union of {a, fi)-covered objects, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 134-142. [167] A. Efrat and M. Katz, On the union ofa-curved objects, Proc. 14th Annual Sympos. on Comput. Geom. (1998), 206-213. [168] A. Efrat, G. Rote and M. Sharir, On the union of fat wedges and separating a collection of segments by a line, Comput. Geom. 3 (1993), 277-288. [169] A. Efrat and M. Sharir, A near-linear algorithm for the planar segment center problem. Discrete Comput. Geom. 16 (1996), 239-257. [170] A. Efrat and M. Sharir, On the complexity of the union of fat objects in the plane, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 104-112. [171] I. Emiris and J. Canny, A general approach to removing degeneracies, SIAM J. Comput. 24 (1995), 650664.

Arrangements

and their applications

113

[172] I.Z. Emiris, J.F. Canny and R. Seidel, Efficient perturbations for handling geometric degeneracies, Algorithmica 19 (1997), 219-242. [173] D. Eppstein, Improved bounds for intersecting triangles and halving planes, J. Combin. Theory Ser. A 62 (1993), 176-182. [174] D. Eppstein, Geometric lower bounds for parametric optimization problems. Discrete Comput. Geom. 20 (1998), 463^76. [175] P. Erdos, On a set of distances ofn points, Amer. Math. Monthly 53 (1946), 248-250. [176] P. Erdos, L. Lovasz, A. Simmons and E. Straus, Dissection graphs of planar point sets, A Survey of Combinatorial Theory, J.N. Srivastava, ed., North-Holland, Amsterdam, Netherlands (1973), 139-154. [177] J. Erickson, New lower bounds for Hopcroft's problem. Discrete Comput. Geom. 16 (1996), 389^18. [178] H. Everett, J.-M. Robert and M. van Kreveld, An optimal algorithm for the (^k)-levels, with applications to separation and transversal problems, Internat. J. Comput. Geom. Appl. 6 (1996), 247-261. [179] M. Falk and R. Randell, On the homotopy theory in arrangements. Complex Analytic Singularities, NorthHolland, Amsterdam (1987), 101-124. [180] S. Felsner, On the number of arrangements ofpseudolines. Discrete Comput. Geom. 18 (1997), 257-267. [181] S. Fortune, Progress in computational geometry. Directions in Computational Geometry, R. Martin, ed., Information Geometers (1993), 81-128. [182] S. Fortune and V. Milenkovic, Numerical stability of algorithms for line arrangements, Proc. 7th Annu. ACM Sympos. Comput. Geom. (1991), 334-341. [183] G.N. Frederickson and D.B. Johnson, The complexity of selection and ranking inX + Y and matrices with sorted rows and columns, J. Comput. Syst. Sci. 24 (1982), 197-208. [184] J.-J. Fu and R.C.T. Lee, Voronoi diagrams of moving points in the plane, Internat. J. Comput. Geom. Appl. 1 (1991), 23-32. [185] K. Fuioida, T. Liebling and F. Margot, Analysis of backtrack algorithms for listig all vertices and all faces of a convex polyhedron, Comput. Geom. 8 (1997), 1-12. [186] K. Fukuda, S. Saito and A. Tamura, Combinatorial face enumeration in arrangements and oriented matroids. Discrete Appl. Math. 31 (1991), 141-149. [187] K. Fukuda, S. Saito, A. Tamura and T. Tokuyama, Bounding the number of k-faces in arrangements of hyperplanes. Discrete Appl. Math. 31 (1991), 151-165. [188] Z. Fliredi, The maximum number of unit distances in a convex n-gon, J. Combin. Theory Ser. A 55 (1990), 316-320. [189] A. Gabrielov and N. Vorobjov, Complexity of stratification of semi-pfaffian sets. Discrete Comput. Geom. 14 (1995), 71-91. [190] J.E. Goodman and R. Pollack, On the number of k-subsets of a set ofn points in the plane, J. Combin. Theory Ser. A 36 (1984), 101-104. [191] J.E. Goodman and R. Pollack, Semispaces of configurations, cell complexes of arrangements, J. Combin. Theory Ser. A 37 (1984), 257-293. [192] J.E. Goodman and R. Pollack, Allowable sequences and order types in discrete and computational geometry. New Trends in Discrete and Computational Geometry, J. Pach, ed., Springer-Verlag (1993), 103-134. [193] M.T. Goodrich, Constructing arrangements optimally in parallel. Discrete Comput. Geom. 9 (1993), 371385. [194] M. Goresky and R. MacPherson, Stratified Morse Theory, Springer-Verlag, Heidelberg, Germany, 1987. [195] L. Goumay and J.-J. Risler, Construction of roadmaps in semi-algebraic sets, Appl. Algebra Engrg. Comm. Comput. 4 (1993), 239-252. [196] D.H. Greene and F.F. Yao, Finite-resolution computational geometry, Proc. 27th Annu. IEEE Sympos. Found. Comput. Sci. (1986), 143-152. [197] D. Grigor'ev and N. Vorobjov, Counting connected components of a semi-algebraic set in subexponential time, Comput. Complexity 2 (1992), 133-186. [198] B. Griinbaum, Arrangements of hyperplanes, Congr. Numer. 3 (1971), 41-106. [199] B. Griinbaum, Arrangements and Spreads, Amer. Math. Soc, Providence, RI (1972). [200] L. Guibas and D. Marimont, Rounding arrangements dynamically, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 190-199.

114

RK. Agarwal and M. Sharir

[201] LJ. Guibas, D. Halperin, H. Hirukawa, J.-C. Latombe and R.H. Wilson, A simple and efficient procedure for assembly partitioning under infinitesimal motions, Proc. IEEE Intemat. Conf. Robot. Autom. (1995), 2553-2560. [202] L.J. Guibas, D. Halperin, J. Matousek and M. Sharir, On vertical decomposition of arrangements ofhyperplanes in four dimensions. Discrete Comput. Geom. 14 (1995), 113-122. [203] L.J. Guibas, J.S.B. Mitchell and T. Roos, Voronoi diagrams of moving points in the plane, Proc. 17th Intemat. Workshop Graph-Theoret. Concepts Comput. Sci., Lecture Notes in Comput. Sci. 570, SpringerVerlag (1991), 113-125. [204] L.J. Guibas, M.H. Overmars and J.-M. Robert, The exact fitting problem for points, Comput. Geom. 6 (1996), 215-230. [205] L.J. Guibas and M. Sharir, Combinatorics and algorithms of arrangements. New Trends in Discrete and Computational Geometry, J. Pach, ed.. Springer-Verlag, Heidelberg, Germany (1993), 9-36. [206] L.J. Guibas, M. Sharir and S. Sifrony, On the general motion planning problem with two degrees of freedom. Discrete Comput. Geom. 4 (1989), 491-521. [207] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans. Graph. 4 (1985), 74-123. [208] D. Gusfield, Bounds for the parametric spanning tree problem, Proc. West Coast Conf. Combinatorics, Graph Theory and Comput. (1979), 173-181. [209] H. Hadwiger, Eulers Charakteristik und kombinatorische Geometric, J. Reine Angew. Math. 134 (1955), 101-110. [210] T. Hagerup, H. Jung and E. Welzl, Efficient parallel computation of arrangements of hyperplanes in d dimensions, Proc. 2nd ACM Sympos. Parallel Algorithms Architect. (1990), 290-297. [211] D. Halperin, Algorithmic Motion Planning via Arrangements of Curves and of Surfaces, PhD thesis. Computer Science Department, Tel-Aviv University, Tel Aviv (1992). [212] D. Halperin, On the complexity of a single cell in certain arrangements of surfaces related to motion planning. Discrete Comput. Geom. 11 (1994), 1-34. [213] D. Halperin, Arrangements, Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 389-412. [214] D. Halperin, L.E. Kavraki and J.-C. Latombe, Robotics, Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 755-778. [215] D. Halperin, J.-C. Latombe and R.H. Wilson, A general framework for assembly planning: The motion space approach, Unpubhshed manuscript (1997). [216] D. Halperin and M.H. Overmars, Spheres, molecules and hidden surface removal, Comput. Geom. 11 (1998), 83-102. [217] D. Halperin and M. Sharir, On disjoint concave chains in arrangements ofipseudo) lines. Inform. Process. Lett. 40 (1991), 189-192. [218] D. Halperin and M. Sharir, New bounds for lower envelopes in three dimensions, with applications to visibility in terrains. Discrete Comput. Geom. 12 (1994), 313-326. [219] D. Halperin and M. Sharir, Almost tight upper bounds for the single cell and zone problems in three dimensions. Discrete Comput. Geom. 14 (1995), 385^10. [220] D. Halperin and M. Sharir, Arrangements and their applications in robotics: Recent developments, Proc. Workshop on Algorithmic Foundations of Robotics, K. Goldberg, D. Halperin, J.-C. Latombe and R. Wilson, eds, A.K. Peters, Wellesley, MA (1995), 495-511. [221] D. Halperin and M. Sharir, A near-quadratic algorithm for planning the motion of a polygon in a polygonal environment. Discrete Comput. Geom. 16 (1996), 121-134. [222] D. Halperin and C. Shelton, A perturbation scheme for spherical arrangements with application to molecular modeling, Comput. Geom. 10 (1998), 273-287. [223] D. Halperin and C.-K. Yap, Combinatorial complexity of translating a box in polyhedral 3-space, Comput. Geom. Theory Appl. 9 (1998), 181-196. [224] S. Har-Peled, Constructing cuttings in theory and practice, Proc. 14th Symp. Comput. Geom. (1998), 327-336. [225] S. Har-Peled, Talking a walk in a planar arrangement, Proc. 40th Annual Sympos. Foundations of Comp. Sci. (1999), to appear. [226] J. Harris, Algebraic Geometry (A First Course), Springer-Verlag, Berlin, Germany (1992).

Arrangements

and their applications

115

[227] D. Haussler and E. Welzl, Epsilon-nets and simplex range queries. Discrete Comput. Geom. 2 (1987), 127-151. [228] J. Heintz, T. Reico and M.-F. Roy, Algorithms in real algebraic geometry and applications to computational geometry. Discrete and Computational Geometry: Papers from the DIMACS Special Year, J.E. Goodman, R. Pollack and W. Steiger, eds, AMS Press, Providence, RI (1991), 137-163. [229] J. Heintz, M.-F. Roy and P. Solemo, On the complexity of semialgebraic sets, Proc. IFIP San Francisco (1989), 293-298. [230] J. Heintz, M.-F. Roy and P. Solemo, Single exponential path finding in semi-algebraic sets II: The general case. Algebraic Geometry and its Applications, C. Bajaj, ed.. Springer-Verlag, New York (1993), 467^81. [231] J. Heintz, M.-F. Roy and P. Solemo, Description of the connected components of a semialgebraic set in single exponential time. Discrete Comput. Geom. 11 (1994), 121-140. [232] J.E. Hershberger and J.S. Snoeyink, Erased arrangements of lines and convex decompositions ofpolyhedra, Comput. Geom. 9 (1998), 129-143. [233] L.S. Homem de Mello and A.C. Sanderson, A correct and complete algorithm for the generation of mechanical assembly sequences, IEEE Trans. Robot. Autom. 7 (1991), 228-240. [234] D. Hsu, L.E. Kavraki, J.-C. Latombe, R. Motwani and S. Sorkin, On finding narrow passages with probabilistic roadmap planners, Proc. 1998 Workshop on the Algorithmic Foundations of Robotics, P.K. Agarwal, L.E. Kavraki and M. Mason, eds, A.K. Peters, Wellesley, MA (1998), 141-153. [235] N. Katoh, H. Tamaki and T. Tokuyama, Parametric polymatroid optimization and its geometric applications, Proc. 10th ACM-SIAM Sympos. Discrete Algorithms (1999), 517-526. [236] N. Katoh and T. Tokuyama, Lovdsz lemma for the three-dimensional k-level of concave surfaces and its applications, Proc. 40th Annual Sympos. Foundations of Comp. Sci. (1999), to appear. [237] M.J. Katz and M. Sharir, Optimal slope selection via expanders. Inform. Process. Lett. 47 (1993), 115122. [238] M.J. Katz and M. Sharir, An expander-based approach to geometric optimization, SIAM J. Comput. 26 (1997), 1384-1408. [239] L.E. Kavraki, J.-C. Latombe, R. Motwani and P. Raghavan, Randomized query processing in robot path planning, Proc. 27th Annu. ACM Sympos. Theory Comput. (1995), 353-362. [240] L.E. Kavraki, P. Svestka, J.-C. Latombe and M.H. Overmars, Probabilistic roadmaps for path planning in high dimensional configuration spaces, IEEE Trans. Robot. Autom. 12 (1996), 566-580. [241] K. Kedem, R. Livne, J. Pach and M. Sharir, On the union of Jordan regions and collision-free translational motion amidst polygonal obstacles. Discrete Comput. Geom. 1 (1986), 59-71. [242] K. Kedem and M. Sharir, An efficient motion planning algorithm for a convex rigid polygonal object in 2-dimensional polygonal space. Discrete Comput. Geom. 5 (1990), 43-75. [243] K. Kedem, M. Sharir and S. Toledo, On critical orientations in the Kedem-Sharir motion planning algorithm for a convex polygon in the plane. Discrete Comput. Geom. 17 (1997), 227-240. [244] L, Kettner, Designing a data structure for polyhedral surfaces, Proc. 14th Symp. Comput. Geom. (1998), 146-154. [245] A.G. Khovanskii, Fewnomials, Amer. Math. Soc, Providence, RI (1991). [246] D.G. Kirkpatrick and R. Seidel, The ultimate planar convex hull algorithm!, SIAM J. Comput. 15 (1986), 287-299. [247] M. Klawe, M. Paterson and N. Pippenger, Inversions with ^2^+'^^^+^^°S«) transpositions at the median. Unpublished manuscript (1982). [248] V. IGee, On the complexity of d-dimensional Voronoi diagrams. Arch. Math. 34 (1980), 75-80. [249] M. Las Vergnas, Convexity in oriented matroids, J. Comb. Theory, Ser. B 29 (1980), 231-243. [250] J.-C. Latombe, Robot Motion Planning, Kluwer Acad. Publ., Boston (1991). [251] B. Lee and F.M. Richards, The interpretation of protein structure: Estimation of static accessibility, J. Molecular Biology 55 (1971), 379-400. [252] F.T. Leighton, Complexity Issues in VLSI, MIT Press, Cambridge, MA (1983). [253] T. Lengauer, Algorithmic research problems in molecular bioinformatics, Proc. 2nd IEEE Israeli Sympos. Theory of Comput. and Systems (1993), 177-192. [254] D, Leven and M. Sharir, On the number of critical free contacts of a convex polygonal object moving in two-dimensional polygonal space. Discrete Comput. Geom. 2 (1987), 255-270.

116

RK. Agarwal and M. Sharir

[255] P. Lienhardt, Topological models for boundary representation: A comparison with n-dimensional generalized maps, Comput. Aided Design 23 (1991), 59-82. [256] P. Lienhardt, N-dimensional generalized combinatorial maps and cellular quasi-manifolds, Intemat. J. Comput. Geom. Appl. 4 (1994), 275-324. [257] C.-Y. Lo, J. Matousek and W.L. Steiger, Algorithms for ham-sandwich cuts, Discrete Comput. Geom. 11 (1994), 433^52. [258] L. Lovasz, On the number of halving lines, Ann. Uni. Sci. Budapest de Rolando Eotvos Nominatae, Sectio Math. 14(1971), 107-108. [259] J. Matousek, Construction of e-nets. Discrete Comput. Geom. 5 (1990), 427-448. [260] J. Matousek, Computing the center of planar point sets. Computational Geometry: Papers from the DIMACS Special Year, J.E. Goodman, R. Pollack and W. Steiger, eds, Amer. Math. Soc, Providence, RI (1991), 221-230. [261] J. Matousek, Lower bounds on the length of monotone paths in arrangements. Discrete Comput. Geom. 6 (1991), 129-134. [262] J. Matousek, Randomized optimal algorithm for slope selection. Inform. Process. Lett. 39 (1991), 183187. [263] J. Matousek, Efficient partition trees. Discrete Comput. Geom. 8 (1992), 315-334. [264] J. Matousek, Reporting points in halfspaces, Comput. Geom. 2 (1992), 169-186. [265] J. Matousek, Epsilon-nets and computational geometry. New Trends in Discrete and Computational Geometry, J, Pach, ed.. Springer-Verlag, Heidelberg, Germany (1993), 69-89. [266] J. Matousek, Linear optimization queries, J. Algorithms 14 (1993), 432^148. [267] J. Matousek, On vertical ray shooting in arrangements, Comput. Geom. 2 (1993), 279-285. [268] J. Matousek, Range searching with efficient hierarchical cuttings. Discrete Comput. Geom. 10 (1993), 157-182. [269] J. Matousek, Geometric range searching, ACM Comput. Surv. 26 (1994), 421^61. [270] J. Matousek, J. Pach, M. Sharir, S. Sifrony and E. Welzl, Fat triangles determine linearly many holes, SIAM J. Comput. 23 (1994), 154-169. [271] J. Matousek and O. Schwarzkopf, On ray shooting in convex polytopes. Discrete Comput. Geom. 10 (1993), 215-232. [272] J. Matousek and O. Schwarzkopf, A deterministic algorithm for the three-dimensional diameter problem, Comput. Geom. 6 (1996), 253-262. [273] P. McMullen and G.C. Shephard, Convex Polytopes and the Upper Bound Conjecture, Cambridge University Press, Cambridge (1971). [274] J. Mecke, Random tesselations generated by hyperplanes. Stochastic Geometry, Geometric Statistics, Stereology, Teubner, Leipzig (1984), 104-109. [275] N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, J. ACM 30 (1983), 852-865. [276] N. Megiddo, Partitioning with two lines in the plane, J. Algorithms 6 (1985), 430^33. [277] P.G. Mezey, Molecular surfaces, Reviews in Computational Chemistry, K.B. Lipkowitz and D.B. Boyd, eds. Vol. 1, VCH Publishers (1990). [278] V. Milenkovic, Calculating approximate curve arrangements using rounded arithmetic, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 197-207. [279] V. Milenkovic, Double precision geometry: A general technique for calculating line and segment intersections using rounded arithmetic, Proc. 30th Annu. IEEE Sympos. Found. Comput. Sci. (1989), 500-505. [280] V. Milenkovic, Robust polygon modeling, Comput. Aided Design 25 (1993). [281] J.W. Milnor, Morse Theory, Princeton University Press, Princeton, NJ (1963). [282] J.W. Milnor, On the Betti numbers of real algebraic varieties, Proc. Amer. Math. Soc. 15 (1964), 275-280. [283] B. Mishra, Computational real algebraic geometry. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, PL (1997), 537-558. [284] K. Mulmuley, A fast planar partition algorithm, I, J. Symbolic Comput. 10 (1990), 253-280. [285] K. Mulmuley, A fast planar partition algorithm, II, J. ACM 38 (1991), 74-103. [286] K. Mulmuley, On levels in arrangements and Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 307338.

Arrangements

and their applications

111

[287] K. Mulmuley and S. Sen, Dynamic point location in arrangements of hyperplanes. Discrete Comput. Geom. 8 (1992), 335-360. [288] P. Orlik, Introduction to Arrangements, Amer. Math. Soc, Providence, RI (1989). [289] P. Orlik, Arrangements in topology, Discrete and Computational Geometry: Papers from the DIMACS Special Year, J.E. Goodman, R. Pollack and W. Steiger, eds, AMS Press, Providence, RI (1991), 263-272. [290] P. Orlik and L. Solomon, Combinatorics and topology of complements of hyperplanes. Invent. Math. 59 (1980), 77-94. [291] P. Orlik and H. Terao, Arrangements of Hyperplanes, Springer-Verlag, Berlin, West Germany (1991). [292] M.H. Overmars and C.-K. Yap, New upper bounds in Klee's measure problem, SIAM J. Comput. 20 (1991), 1034-1045. [293] J. Pach, Finite point configurations. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 3-18. [294] J. Pach and P.K. Agarwal, Combinatorial Geometry, Wiley, New York, NY (1995). [295] J. Pach and M. Sharir, The upper envelope of piecewise linear functions and the boundary of a region enclosed by convex plates: Combinatorial analysis. Discrete Comput. Geom. 4 (1989), 291-309. [296] J. Pach and M. Sharir, On the boundary of the union of planar convex sets. Discrete Comput. Geom. 21 (1999), 321-328. [297] J. Pach and M. Sharir, On the number of incidences between points and curves. Combinatorics, Probability and Computing 7 (1998), 121-127. [298] J. Pach, W. Steiger and E. Szemeredi, An upper bound on the number of planar k-sets. Discrete Comput. Geom. 7 (1992), 109-123. [299] G.W Peck, On k-sets in the plane. Discrete Math. 56 (1985), 73-74. [300] M. Pellegrini, Lower bounds on stabbing lines in 3-space, Comput. Geom. 3 (1993), 53-58. [301] M. Pellegrini, Ray shooting and lines in space. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 599-614. [302] M. Pellegrini and P. Shor, Finding stabbing lines in 3-space, Discrete Comput. Geom. 8 (1992), 191-208. [303] I.G. Petrovskii and O.A. Oleinik, On the topology of real algebraic surfaces, Isvestia Akad. Nauk SSSR. Ser. Mat. 13 (1949), 389-^02. In Russian. [304] H. Plantinga and C.R. Dyer, Visibility, occlusion and the aspect graph. Internal. J. Comput. Vision 5 (1990), 137-160. [305] R. Pollack and M.F Roy, On the number of cells defined by a set of polynomials, C. R. Acad. Sci. Paris 316 (1993), 573-577. [306] A. Postnikov and R. Stanley, Deformation of Coxeter hyperplane arrangements. Unpublished manuscript (1999). [307] F.P. Preparata and R. Tamassia, Efficient point location in a convex spatial cell-complex, SIAM J. Comput. 21 (1992), 267-280. [308] S. Raab, Controlled perturbation of arrangement of polyhedral surfaces with applications of swept volumes, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 163-172. [309] E. Ramos, Construction of 1-d lower envelopes and applications, Proc. 13th Annu. Sympos. Comput. Geom. (1997), 57-66. [310] E. Ramos, Intersection of unit-balls and diameter of a point set in R , Comput. Geom. 8 (1997), 57-65. [311] A. Rao and K. Goldberg, Placing registration marks, IEEE Transactions on Industrial Electronics 41 (1994). [312] J.H. Reif, Complexity of the generalized movers problem. Planning, Geometry and Complexity of Robot Motion, J. Hopcroft, J. Schwartz and M. Sharir, eds, Ablex Pub. Corp., Norwood, NJ (1987), 267-281. [313] FM. Richards, Areas, volumes, packing and protein structure, Annu. Rev. Biophys. Bioeng. 6 (1977), 151-176. [314] J. Richter-Gebert and G.M. Ziegler, Oriented matroids. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 111-132. [315] S. Roberts, On thefiguresformed by the intercepts of a system of straight lines in a plane and an analogous relations in space of three dimensions, Proc. London Math. Soc. 19 (1888), 405^22. [316] R. Schneider, Tessellations generated by hyperplanes. Discrete Comput. Geom. 2 (1987), 223-232. [317] J.T. Schwartz and M. Sharir, On the "piano movers" problem II: General techniques for computing topological properties of real algebraic manifolds. Adv. Appl. Math. 4 (1983), 298-351.

118

RK. Agarwal and M. Sharir

[318] J.T. Schwartz and M. Sharir, Algorithmic motion planning in robotics, Algorithms and Complexity, Handbook of Theoretical Computer Science, J. van Leeuwen, ed., Vol. A, Elsevier, Amsterdam (1990) 391^30. [319] J.T. Schwartz and M. Sharir, On the two-dimensional Davenport-Schinzel problem, J. Symbolic Comput. 10 (1990), 371-393. [320] O. Schwarzkopf and M. Sharir, Vertical decomposition of a single cell in a three-dimensional arrangement of surfaces and its applications. Discrete Comput. Geom. 18 (1997), 269-288. [321] R. Seidel, Constructing higher-dimensional convex hulls at logarithmic cost per face, Proc. 18th Annu. ACM Sympos. Theory Comput. (1986), 404-^13. [322] R. Seidel, Exact upper bounds for the number offaces in d-dimensional Voronoi diagrams, Applied Geometry and Discrete Mathematics: The Victor Klee Festschrift, R Gritzman and B. Sturmfels, eds, AMS Press, Providence, RI (1991), 517-530. [323] R. Seidel, Small-dimensional linear programming and convex hulls made easy. Discrete Comput. Geom. 6 (1991), 423-434. [324] R. Seidel, Convex hull computations. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 361-376. [325] R. Seidel, The nature and meaning of perturbations in geometric computing. Discrete Comput. Geom. 19 (1998), 1-17. [326] M. Sharir, On k-sets in arrangements of curves and surfaces. Discrete Comput. Geom. 6 (1991), 593-613. [327] M. Sharir, Arrangements of surfaces in higher dimensions: Envelopes, single cells and other recent developments, Proc. 5th Canad. Conf. Comput. Geom. (1993), 181-186. [328] M. Sharir, Almost tight upper bounds for lower envelopes in higher dimensions. Discrete Comput. Geom. 12 (1994), 327-345. [329] M. Sharir, Algorithmic motion planning. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 733-754. [330] M. Sharir and PK. Agarwal, Davenport-Schinzel Sequences and Their Geometric Applications, Cambridge University Press, New York, NY (1995). [331] M. Sharir and S. Toledo, Extremal polygon containment problems, Comput. Geom. 4 (1994), 99-118. [332] PW. Shor, Stretchability of pseudolines is NP-hard, Applied Geometry and Discrete Mathematics: The Victor Klee Festschrift, P Gritzman and B. Sturmfels, eds, AMS Press (1991), 531-554. [333] S. Smorodinsky, J. Mitchell and M. Sharir, Sharp bounds on geometric premutations ofpairwise disjoint balls in M^, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 400-406. [334] D.M.Y. Sommerville, Analytical Geometry in Three Dimensions, Cambridge University Press, Cambridge (1951). [335] J. Spencer, E. Szemeredi and W.T. Trotter, Unit distances in the Euclidean plane. Graph Theory and Combinatorics, B. Bollobas, ed., Academic Press, New York, NY (1984), 293-303. [336] R. Stanley, Hyperplane arrangements, interval orders, and trees, Proc. Nat. Acad. Sci. 93 (1996), 26202625. [337] J. Steiner, Einige Gesetze liber die Theilung der Ebene und des Raumes, J. Reine Angew. Math. 1 (1826), 349-364. [338] L. Szekely, Crossing numbers and hard Erdos problems in discrete geometry. Combinatorics, Probability and Computing 6 (1997), 353-358. [339] E. Szemeredi and W. Trotter, Jr., A combinatorial distinction between Euclidean and projective planes, European J. Combin. 4 (1983), 385-394. [340] E. Szemeredi and W. Trotter, Jr., Extremal problems in discrete geometry, Combinatorica 3 (1983), 381392. [341] B. Tagansky, The Complexity of Substructures in Arrangements of Surfaces, PhD thesis, Tel Aviv University, Tel Aviv (1996). [342] B. Tagansky, A new technique for analyzing substructures in arrangements of piecewise linear surfaces, Discrete Comput. Geom. 16 (1996), 455-479. [343] H. Tamaki and T. Tokuyama, A characterization of planar graphs by pseudo-line arrangements, Proc. 8th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 1350, Springer-Verlag (1997), 123-132. [344] H. Tamaki and T. Tokuyama, How to cut pseudo-parabolas into segments. Discrete Comput. Geom. 19 (1998), 265-290.

Arrangements

and their applications

119

[345] R. Thorn, Sur I'homologie des varietes algebriques reelles, Differential and Combinatorial Topology, S.S. Cairns, ed., Princeton Univ. Press, Princeton, NJ (1965). [346] G. Toth, Point sets with many k-sets, in preparation. [347] PM. Vaidya, Geometry helps in matching, SIAM J. Comput. 18 (1989), 1201-1225. [348] P. Valtr, Lines, line-point incidences and crossing families in dense sets, Combinatorica 16 (1996), 269294. [349] M. van Kreveld, On fat partitioning, fat covering and the union size ofpolygons, Comput. Geom. 9 (1998), 197-210. [350] K.R. Varadarajan, A divide-and-conquer algorithm for min-cost perfect matching in the plane, Proc. 39th Annual Sympos. on Foundations of Comp. Sci. (1998), 320-329. [351] A. Varshney, F.P. Brooks, Jr. and W.V. Wright, Computing smooth molecular surfaces, IEEE Comput. Graph. Appl. 15 (1994), 19-25. [352] S. Vrecica and R. Zivaljevic, The colored Tverberg's problem and complexes of injective functions, J. Combin. Theory Sen A 61 (1992), 309-318. [353] H.E. Warren, Lower bound for approximation by nonlinear manifolds. Trans. Amer. Math. Soc. 133 (1968), 167-178. [354] K. Weiler, Edge-based data structures for solid modeling in a curved surface environment, IEEE Comput. Graph. Appl. 5 (1985), 21-40. [355] E. Welzl, More on k-sets of finite sets in the plane. Discrete Comput. Geom. 1 (1986), 95-100. [356] J.E. Wetzel, On the division of the plane by lines, Amer. Math. Monthly 85 (1978), 648-656. [357] A. Wiemik and M. Sharir, Planar realizations of nonlinear Davenport-Schinzel sequences by segments. Discrete Comput. Geom. 3 (1988), 15^7. [358] D.E. Willard, Polygon retrieval, SIAM J. Comput. 11 (1982), 149-165. [359] A.C. Yao and F.F. Yao, A general approach to D-dimensional geometric queries, Proc. 17th Annu. ACM Sympos. Theory Comput. (1985), 163-168. [360] T. Zaslavsky, Facing up to Arrangements: Face-Count Formulas for Partitions of Space by Hyperplanes, Amer. Math. Soc, Providence, RI (1975). [361] T. Zaslavsky, A combinatorial analysis of topological dissections. Adv. Math. 25 (1977), 267-285. [362] G.M. Ziegler, Lectures on Polytopes, Springer-Verlag, Heidelberg, Germany (1994).

CHAPTER 3

Discrete Geometric Shapes: Matching, Interpolation, and Approximation* Helmut Alt Institut fiir Informatik, Freie Universitdt Berlin, Takustrafie 9, D-14195 Berlin, Germany

Leonidas J. Guibas Computer Science Department, Stanford University, Stanford, CA 94305, USA

Contents 1. Introduction 2. Point pattern matching 2.1. Exact point pattern matching 2.2. Approximate point pattern matching 3. Matching of curves and areas 3.1. Optimal matching of line segment patterns 3.2. Approximate matching 3.3. Distance functions for non-point objects 4. Shape simplification and approximation 4.1. Two-dimensional results 4.2. Three dimensions 5. Shape interpolation References

123 124 124 126 133 133 136 139 142 142 145 146 150

Abstract In this chapter we survey geometric techniques which have been used to measure the similarity or distance between shapes, as well as to approximate shapes, or interpolate between shapes. Shape is a modality which plays a key role in many disciplines, ranging from computer vision to molecular biology. We focus on algorithmic techniques based on computational geometry that have been developed for shape matching, simplification, and morphing.

*Partially supported by Deutsche Forschungsgemeinschaft (DFG), Grant No. Al 253/4-2. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved 121

Discrete geometric shapes: Matching, interpolation, and approximation

123

1. Introduction The matching and analysis of geometric patterns and shapes is of importance in various appHcation areas, in particular in computer vision and pattern recognition, but also in other disciplines concerned with the form of objects such as cartography, molecular biology, and computer animation. The general situation is that we are given two objects A, B and want to know how much they resemble each other. Usually one of the objects may undergo certain transformations like translations, rotations or scalings in order to be matched with the other as well as possible. Variants of this problem include partial matching, i.e. when A resembles only some part of B, and a data structures version where, for a given object A, the most similar one in a fixed preprocessed set of objects has to be found, e.g., in character or traffic sign recognition. Another related problem is that of simplification of objects. Namely, given an object A find the most simple object A' resembling A within a given tolerance. For example, A could be a smooth curve and A' a polygonal line with as few edges as possible. We also will discuss shape interpolation ("morphing"), a problem that has become very interesting recently, especially in computer animation. The objective is to find for two given shapes A and B a continuous transformation that transforms A into B via natural intermediate shapes. First, it is necessary to formally define the notions of objects, resemblance, matching, and transformations. Objects are usually finite sets of points ("point patterns") or "shapes" given in two dimensions by polygons. Generalizations to, for example, polyhedral surfaces in three and higher dimensions are possible, but most of the work has concentrated on two or three dimensions. In order to measure "resemblance" various distance functions have been used, in particular much work has been based on the so-called Hausdorff distance. For two compact subsets A, B of the J-dimensional space M^, we define the one-sided Hausdorff distance from A to B as 5//(A, B) = maxmin||a — b\\, aeA beB

where || • || is the Euclidean distance in M^ (if not explicitly stated otherwise). The (bidirectional) Hausdorff distance between A and B then is defined as SH{A, B) = max(5//(A, B), 8H(B, A)). The Hausdorff distance simply assigns to each point of one set the distance to its closest point on the other and takes the maximum over all these values. It performs reasonably well in practice but may fail if there is noise in the images. An variant intended to be more robust will be presented in Section 2.2.3. What kind of geometric transformations are allowed to match objects A and B depends on the application. The most simple kind are certainly translations. The matching problem usually becomes much more difficult if we allow rotations and translations (these transfor-

124

H. Alt and L.J. Guibas

mations are called rigid motions, or Euclidean transformations). In most cases reflections can be included as well without any further difficulty. Scaling means the linear transformation that "stretches" an object by a certain factor X about the origin and is represented by the matrix (^ J) in two dimensions. We call combinations of translations and scalings homotheties and combinations of Euclidean transformations and scalings similarities. The most general kind of transformations we will consider are arbitrary ajfine transformations which can occur, e.g., in orthographic 2-dimensional projections of 3-dimensional objects. Considerable research on these topics has been done in computational geometry in recent years. This chapter will give a survey on these results.

2. Point pattern matching In this section we present a variety of geometric techniques for matching points sets exactly or approximately, under some allowed transformation group. We discuss methods of both theoretical and practical interest.

2.1. Exact point pattern matching A seemingly very natural question is whether two finite sets A, 5 C M^ of n points each can be matched exactly by say, rigid motions, i.e. whether are A and B congruent. Of course unless we assume that the input consists of points on a grid, this problem is numerically very unstable. Nevertheless, studying it assuming a "real RAM" model of computation gives some insight into the nature of matching problems and may help in designing algorithms for more realistic cases. Furthermore, it could be possible to implement the algorithms for rational inputs directly using arbitrary precision computations as they are provided, for example, by the LEDA library [24] but to our knowledge this possibility has not been investigated in detail yet. In two dimensions exact point-pattern matching can easily be reduced to string matching, as is shown by the following algorithm which was invented independently by several authors, for example Atkinson [19]. 1. Determine the centroids CA, CB (i.e. arithmetic means) of the sets A and B, respectively. 2. Determine the polar coordinates of all points in A using CA as the origin. Then sort A lexicographically with respect to these polar coordinates (angle first, length second) obtaining a sequence (0i, r i ) , . . . , (0«, r^). Let u be the sequence (i/^i, r i ) , . . . , {\lrn, rti) where T/^/ = 0/ — 0(/+i) mod «• Compute in the same way the corresponding sequence i; of the set B. 3. Determine whether i; is a cyclic shift of w, i.e. a substring of uu by some fast stringmatching algorithm. It is easy to see that A and B are congruent exactly if the algorithm gives a positive answer. The running time is 0{n \ogn) because of the sorting in step 2; all other operations take linear time.

Discrete geometric shapes: Matching, interpolation, and approximation

125

For exact point pattern matching in three dimensions the following algorithm is given byAltetal. [13]: 1. Determine the centroid CA and project all points of A onto the unit sphere around CA obtaining a set A' of points on the sphere. Label each point a e A' with the sorted list of distances from CA of all points that have been mapped onto a. 2. Compute the 3-d convex hull CA of A \ 3. In addition to the labeling of step 2 attach to each point a e A^ an adjacency list of vertices connected to a by an edge of CA sorted in clockwise order (seen from outside). This list should contain all distances of a to adjacent points and all angles between neighboring edges. 4. Execute steps 1-3 with set B, as well. 5. The hulls CA and CB can be considered as labeled planar graphs. The point sets A and B are congruent exactly if these graphs are isomorphic. This isomorphism can be decided by a variant of the partition algorithm of Hopcroft (see [10], Section 4.13). A detailed analysis shows that the running time of this algorithm is 0(n logn). Using similar techniques it can be shown that the matching problem in arbitrary dimension d can be reduced to n problems in dimension d — 1. Consequently we have that the exact point pattern matching problem can be solved for patterns of n points in time 0(n log w) in 2 dimensions and in time 0(n^~^ logn) for arbitrary dimension d ^3. An alternative approach yielding the same bound for dimension 3 was developed by Atkinson [19]. Concerning transformations other than rigid motions, in some cases there are obvious optimal algorithms for exact point pattern matching in arbitrary dimensions. For translations, for example, it suffices to match those two points with the lexicographically smallest coordinate vectors and then to check, whether the other points match as well. If scaling of the pattern B to be matched is allowed, one can first determine the diameters dA, ds of both sets. Their ratio dA/ds gives the correct scaling factor for B. Therefore, there is an easy reduction of homotheties to translations and of similarities to rigid motions. Reflections can easily be incorporated by trying to match the set B as well as the set B' which is B reflected through some arbitrary hyperplane, for example, jci = 0. Exact point pattern matching under arbitrary ajfine transformations is considered by Sprinzak and Werman [88]. First the sets A and B are brought into "canonical form" by transforming their second moment matrices into unit matrices. Then it is shown that A, B can be matched under affine transformations exactly if their canonical forms can be matched under rotations. Since the canonical forms can be computed in linear time the asymptotic time bounds for matching under linear transformations are the same as the ones for rigid motions described above. A natural generalization of deciding whether two point patterns A and B are congruent is to ask for the largest subsets of both that are and to find the corresponding rigid motion. Akutsu et al. [20] address this problem and solve it by a voting algorithm. More specifically, to any pair (/?, ^) G A x ^ all pairs (r, 5") G A x 5 are determined where the lengths of the line segments ~pr and 'qs are the same. In this case the rigid motion that maps ~pf to qs gets a vote. In the end the rigid motion that obtained the most votes is the one matching the largest subsets. The running time of the deterministic version of this algorithm is

126

H. Alt and LJ. Guibas

0((X(n,m) -\-n^) logn). Here A-(w, m) is a combinatorial geometric quantity related to the number of possible occurrences of a fixed length line segment in a set of points and it has an upper bound of 0(n^-^^m^-^^). Also a more efficient Monte-Carlo algorithm based on random sampling is given that produces an approximate solution to the problem.

2.2. Approximate point pattern matching More realistic than exact point pattern matching is approximate point pattern matching. Here, given two finite sets of points A, 5 , the problem is to find a transformation matching each point b e B into the ^-neighborhood (e ^ 0) of some point A G A. On the other hand each point in A should lie in the ^-neighborhood of some transformed point of B. Clearly, there are many variants to this problem. The first distinction we make is whether A and B must have the same number of points and the matching must be a one-one-mapping, or whether several points in one set may be matched to the same point in the other. Obviously in the latter case we consider matching with respect to the Hausdorjf-distance. 2.2.1. One-to-one matching. Alt et al. [13] give polynomial time algorithms for many variants of one-one-matching of finite point sets. These variants are obtained by the following characteristics: • Different types of transformations that are allowed. • Solving either the decision problem: given e, is there a matching? or the optimization problem: find the minimal e allowing a matching. • A fixed one-one-mapping between A and B is either already given or one should be found. • Different metrics, a concept generalized by Arkin et al. [11] to arbitrary "noise regions" around the points. We will demonstrate the techniques used with the example of solving the decision problem, for a given £ as a Euclidean tolerance, of matching under arbitrary rigid motions without a predetermined one-one-mapping between the point sets A = [a\,...,an} and B = {bu...,bn}. First, it can be shown by an easy geometric argument that, if there exists a valid matching of 5 to A then there is one where two points Z?/, bj of B are matched exactly to the boundaries of the 6:-neighborhoods Us{ak), Ugiai) of two points in A. Consider this configuration for all 4-tuples of points ak, ai, Z?/, bj. Mapping bi, bj onto the boundaries of Us(ak) and Ue(ai) respectively in general leaves one degree of freedom which is parametrized by the angle 0 e [0, 27t) between the vector bi — ak and a horizontal line. Considering any other point bm ^ B,m^i, j , for all possible values of 0, that point will trace an algebraic curve Cm (of degree 6, in fact; see Figure 1). Being an algebraic curve of constant degree, any Cm intersects the boundary of any Ueiar) at most a constant number of times, in fact, at most 12 times. So there are at most 6 intervals of the parameter 0 where the image of bm lies inside Us(ar). All interval boundaries of this kind are collected. They partition the parameter space [0, In) into 0(n^) intervals, so that for all 0 in one interval the same points of B are mapped into the same neighborhoods of points of A. All these relationships are represented as edges in a

Discrete geometric shapes: Matching, interpolation,

and approximation

127

Fig. 1. Curve of point bm when bt, bj are moved on the boundaries of Usia^), Ueiag).

bipartite graph whose two sides of nodes are A and B. Clearly, the decision problem has a positive solution exactly if there is some (/) for which the corresponding graph has a perfect matching. This is checked by finding the graph for the first subinterval of [0, 27r) and constructing a maximum matching for it. Then, while traversing the subintervals from left to right, the maximum matching is updated until a perfect matching is found or it turns out that none exists. Observe, that this procedure is carried out 0(n^) times for all 4-tuples ak, ai, bi, bj. A detailed analysis shows that the total running time of the algorithm is O(w^). In addition, determining the intersection points of the curves of degree 6 with circles could cause nontrivial numerical problems. However, simpler and faster algorithms were found for easier variants of the one-one-matching problem. For the case of translation only, Efrat and Itai [39] improve the bounds of [13] using geometric arguments to speed up the bipartite graph matching involved (for fixed sets, they can compute what they call the optimum bottleneck matching in time 0(n^-^ logn)). Arkin et al. [11] give numerous efficient algorithms mostly assuming that the 6:-neighborhoods or other noise-regions of the points are disjoint. For example, the problem considered above is shown to be solvable in 0(n^ log n) time under this assumption. Also a generalization from rigid motions to similarity transformations is given in that article. Heffeman and Schirra [59] take an alternative approach to reduce the complexity of the decision problem in point pattern matching, which they call approximate decision algorithms. They only require the algorithm to give a correct answer if the given tolerance s is not too close to the optimal solution; more precisely, it has to lie outside the interval [^opt -• oi, ^opt + )^] for fixed a, fi ^0. This way, using network flow algorithms, they can reduce the running time for solving the problem described above to 0(n^-^). Behrends [22] also considers approximate decision algorithms. Assuming in addition that the £-neighborhoods are disjoint, he obtains a running time of 0(n^logn). The best results

128

H. Alt and L.J. Guibas

Fig. 2. Voronoi surface of A.

in the case that the mapping between A and B is predetermined, are due to Imai, Sumino, and Imai [66] who analyze the lower envelope of multivariate functions in order to find the optimal solution. 2.2.2. Point pattern matching with respect to Hausdorjf-distance. Now A and B may have different cardinalities, let A = {^i,..., «„} and B = {b\,... .bm]- The Hausdorffdistance between A and B can be computed straightforwardly in time 0(nm). It is more efficient to construct the Voronoi-diagrams VD(A) and VD(B) and to locate each point of A in VD(B) and vice versa in order to determine its nearest neighbor in the other set. This way the running time can be reduced to 0((n -\- m) \og(n + m)) (see [2]). Algorithms for optimally matching A, B under translations for arbitrary L,;-metrics in 2 and 3 dimensions using Voronoi diagrams are given by Huttenlocher, Kedem, and Sharir [56]. The idea of these algorithms is as follows: The Voronoi-surface of the set A is the graph of the function d{x) =min \\x — a\\ aeA

which assigns to each point x the distance to the nearest point in A. Clearly, d{x) is the lower envelope of all da {x) = || jc — a ||, where aeA. For example, for L2 and dimension 2 the graph of da{x) is an infinite cone in 3-dimensional space whose apex lies in a (see Figure 2). The graph of J(JC) is piecewise composed of these cones and the projection of the boundaries of these pieces is the Voronoi diagram of A. If B is translated by some vector t the distance of any b e B to its nearest neighbor in A is 8b(t) =min\\a — (b-\-t)\\ =min\a — b) — t\\= aGA aGA min dx(t) xeA-b Discrete geometric shapes: Matching, interpolation, and approximation 129 SO the graph of 8t> is the Voronoi surface of A translated by the vector —b. The directed Hausdorff distance IH{B -\-t, A) is the function /(0=max5/,(0 beB and, consequently, the upper envelope of m Voronoi surfaces, namely those of A — /?i, A — Z?2,..., A — Z?^. On the other hand we consider g{t) = lH{A,B^-t). Since git) = ^//(A + (—t), B) we can define g{t) by upper envelopes like / ( / ) , interchanging the roles of A and B and replacing thy—t. The Hausdorff-distance between A and 5 + f is then /i(0=max(/(0,^(0). Again, for L2 the graph of h is composed of piecewise "conic" segments. We are searching for mmth{t). This minimum is found by determining all local minima of h(t). By the bounds on the number of these minima derived in [56], algorithms are obtained for matching 2- and 3-dimensional finite point sets under translations minimizing the Hausdorff distance. In 2 dimensions their running times are 0(nm(n + m) lognm) for the Liand Loo-metric and 0(nm(n + m)a(nm) login + m)) for other L^-metrics, r = 2, 3 , . . . . In 3 dimensions time Oiinm)^in + m)^+^) is obtained for the L2-metric. At first glance it is not clear how the technique described earlier can be generalized from translations to arbitrary rigid motions. However, this is done by Huttenlocher et al. in [54] by considering so called dynamic Voronoi diagrams. Here, it is assumed that we have a point set consisting of k rigid subsets of n points each. Each of the subsets may move according to some continuous function of time. The dynamic Voronoi diagram is the subdivision of the 3-dimensional space-time such that every cross section obtained by fixing some time t equals the Voronoi diagram at time t. The authors investigate how many topological changes the Voronoi diagram can undergo as time passes which gives upper bounds on the complexity of the dynamic Voronoi diagram. These results are applied to matching under rigid motion by representing the optimal solution as DiA, B) = minSn(reiA), B-{-x) where x € R^ is the translation vector, and re is the rotation around the origin by angle 0 e [0, 27r). For fixed 0 we have the situation described before in the case of translations. The (directed) optimal Hausdorff-distance can be determined by finding the minimum of the upper envelope of m Voronoi surfaces, namely the ones of r^ (A) — b\,.. .,[email protected] (A) — bm. The minimum algorithm keeps track of this for changing values of © by considering the dynamic Voronoi diagram of these sets where © is identified with the time parameter. As a consequence, an optimal match of two point sets under arbitrary rigid motions can be found in time 0((m + n)^ logimn)). 130 H. Alt and L.J. Guibas Matching of point patterns under translations in higher dimensions is investigated by Chew et al. [27]. For the decision problem in case of the Loo-metric, the space of feasible translations is an intersection of unions of unit boxes. This space is maintained using a modification of the data structure of orthogonal partition trees by Overmars and Yap [79]. This gives algorithms for the decision problem which are used to solve the optimization problem by parametric search [74,32]. In particular, for the Loo-metric an algorithm of running time 0(n^^^~^^/^log^n) is obtained where n is the number of points in both patterns. For J-dimensional point patterns under the L2-metric, the matching takes time 0(nr^^/2^+4og^n). The methods described before are probably quite difficult to implement and numerically unstable due to the necessary computation of intersection points of algebraic surfaces. A much simpler but practically more promising method is given by Goodrich et al. in [48]. For a "pattern" P and a "background" B of m and n points, respectively, it approximates the optimal directed Hausdorff-distance min7 5//(r(P), B) up to some constant factor. T ranges over all possible transformations which are translations in arbitrary dimensions or rigid motions in 2 or 3 dimensions. The approximation factors are between 2 + ^ for translations in R^ and 8 + 6^ for rigid motions in M^. The running times are considerably faster than the ones of algorithms computing the optimum exactly. The algorithm for rigid motions in R^ essentially works as follows: 1. Fix a pair (p,q) of diametrically opposing points in P. 2. Match the pair by some rigid motion as good as possible to each pair of points of B. 3. For each such rigid motion determine the distance of the image of each point in P to its nearest neighbor. Choose that match where the maximum of these distances is minimized. In higher dimensions the nearest neighbor search is done approximately by the data structure of Arya et al. [12]. 2.2.3. Practical variations Percentile-Based Hausdorff Distance As was mentioned above, the Hausdorff-distance is probably the most natural function for measuring the distance between sets of points. Furthermore, it can easily be applied to partial matching problems. In fact, suppose that sets A and B are given where A is a large "image" and 5 is a "model" of which we want to know whether it matches some part of A. This is the case exactly if there is some allowable transformation T such that the one-way Hausdorff-distance 8H(T(B), A) is small. In fact, many of the matching algorithms with respect to Hausdorff-distance presented previously can be applied to partial matching as well. An application of this property to the matching of binary images is given by Huttenlocher et al. in [55] where a discrete variant of the Voronoi-diagram approach for matching under translation with respect to Hausdorff-distance is used. In the same article a modification of the Hausdorff-distance is suggested for the case that it is not necessary to match B completely to some part of A but only at least k of the m points in 5 . In fact, the distance measure being used is hk(B, A) = mmkTmn\\a — b\\, Discrete geometric shapes: Matching, interpolation, and approximation 131 where min/: denotes the k-ih smallest rather than the largest value. This percentile definition allows us to overcome the sensitivity of the Hausdorff-distance to outliers, which is very important in practice. The paper [55] is also interesting in that the authors show how to adapt some of the conceptual geometric ideas presented earlier to their rasterized context so as to obtain, after several other optimizations they invented, efficient practical algorithms for the partial Hausdorff matching described above. Alignment and Geometric Hashing A number of other techniques for point pattern matching have been developed and used in computer vision and computational molecular biology. In computer vision the point pattern matching problem arises in the context of model-based recognition [38,21] — in this case we are interested in knowing whether a known object (we will call it the model M) appears in an image of a scene (which we will denote by S). Both the model and the scene are subjected to a feature extraction process whose details need not concern us here. The outcome of this process is to represent both M and 5 as a collection of geometric objects, most commonly points. The same principle applies to the molecular biology applications — typically molecular docking [77]. In that context we are trying to decide if the pattern, usually a small molecule (the ligand), can sterically fit into a cavity, usually the active site of some protein. Again through a feature extraction process, both the ligand and the active site can be modeled by point sets. The dimensionalities of the point sets M and 5, as well as the transformation group we are allowed to use in matching M to 5, are application dependent. In computer vision S is always 2-D while M can be either 2-D or 3-D; both are 3-D in the biology context. To illustrate the methods of alignment and of geometric hashing we use below an example in which both M and S are planar point sets of cardinalities m and s respectively. In the example we will assume that the allowed transformation group when matching M to 5 is the group of similarities, i.e. Euclidean transformations and scalings. We are interested in one-way matches from M to 5, in the sense of the one-way percentile Hausdorff distance: we will be looking for transformations that place many (most) points of M near points of S. The extension of these ideas to the case of other dimensions and other transformation groups is in general straightforward; the one exception is when the allowed transformations include a (dimension-reducing) projection — about which more below. In the alignment method [62], two points a and b of M are first chosen to define a reference coordinate frame [a; b] for the model. We can think of the first point as the origin (0,0) and the second point as the unit along the x-axis (1,0). This choice also fixes the _y-axis and thus an orthogonal coordinate system in which all points of M can be represented by two real values. Note that this representation of the points in M is invariant under translations, rotations, and scalings. We now align the points of a and b of M with two chosen points p and q of S respectively. Up to a reflection, this fixes a proposed similarity mapping M to 5 (we will ignore the reflection case in what follows). In order to test the goodness of this proposed transformation, we express all points of S using coordinates in the frame [p; q]. Now that we have a common coordinate system for two sets, we just check for every point of M to see if there is a point of S nearby (within 132 H. Alt and LJ. Guibas some preselected error tolerance). The number of points on M that can thus match in this verification step is the score for the particular transformation we are considering. The alignment method consists of trying in this way to align pairs of points of M with pairs of points of S and in the process discover those transformations that have the highest matching score. If we could assume that all points of M are present in S, in principle we could get by with matching and verifying a specific pair from M with all its counterparts in S. Because of occlusions, however, this assumption cannot be made in practice and usually we need to try many pairs of points from M before the correct match is found. Alignment is thus an exhaustive method and its worst-case combinatorial complexity is bad, Oinr's^) — even assuming only a linear 0(m) verification cost (0(m log^) would be a more theoretically correct bound). Things get worse as the size of the frames we need to consider increases with higher dimensions or larger transformation groups. Thus in the vision context a lot of attention must be given to the feature extraction process, so that only the most critical and significant features of each of M and S are used during the ahgnment. Since we may want to match the same model M into many scenes or, conversely, we may be looking for the presence of any one of a set of models Mi, M 2 , . . . , M^ in a given scene, it makes sense to try to speed up the matching computation through the use of preprocessing. This leads to to the idea of geometric hashing [72,70,71]. Let us describe geometric hashing in the same context as the in the above alignment problem, but with several models Mi, M 2 , . . . , M^. As above, for each model M/ and each frame [a\ Z?] of two points for that model, we calculate coordinates for all other points of M/ in that frame. The novel aspect of geometric hashing is that these coordinates are then used as a key to hash into a global hash table. We record at that hash table entry the model index and frame pair the entry came from. The computation of this hash table completes the preprocessing phase of the algorithm. Note that there is a hash table entry for each triplet (model, frame for that model, other point in that model); multiple triplets may hash to the same table entry, in which case they are linked together in a standard fashion. At recognition time, we choose a frame pair [p\q] in the scene S and compute the coordinates of all points of S in that frame. Using then these coordinates as a key, we then hash into the global hash table and 'vote' for each (model, frame) pair stored at that hash table entry. If we were lucky to choose two scene points which correspond to two points [a-, Z?] in an instance of some model M/, we can then expect that the pair (M/, [a\ bY) will get many votes during that process, thus signahng the presence of M, in the scene and also indicating the matching transformation involved. In general, of course, we cannot expect to be so lucky in choosing p and q the first time around, so we will have to repeat the voting experiment several times. In the worst case, preprocessing for a model M of size m costs O(m^) and the recognition by voting also costs 0{s^) (we assume throughout that the cost of accessing the hash table is constant). Note that by appropriately rounding the coordinates used as a key to the hash table we can allow for a certain error tolerance in matching points of M and S. Also, once some promising (model, frame) pairs have been identified, the votes for the winner actually give us a proposed correspondence between model and scene points. The matching transformation can then be calculated more accurately using a leastsquares fit [71]. As was mentioned above for the alignment problem, these ideas also extend to matching point sets in 3-D, as well to other transformation groups, such as the group of affine maps. Discrete geometric shapes: Matching, interpolation, and approximation 133 One noteworthy aspect of this in the vision case is the dimension-reducing projection maps that must be allowed in matching (as when M is 3-D but S is 2-D). This makes the problem harder, as the projection map is not invertible and a point in S has an inverse image which is a line in 3-D. This can be handled in geometric hashing by having each point of S, after a frame has been chosen, generate samples along a line of possible matching points from M in 3-D and vote for each of them separately [72]. Geometric hashing has been successfully used in both identifying CAD/CAM models in scenes, as well in the molecular docking problem [72,70,71,77,78]. Performance in practice tends to be much better than the above combinatorial worst-case bounds would indicate. Recent theoretical studies also suggest that randomization can improve the above bounds for alignment and geometric hashing, especially in cases where the model is not present in the the scene, or when the point sets involved have limited 'self-similarity' [65]. 3. Matching of curves and areas Apart from point patterns, research has been done in recent years also on the resemblance of more complex patterns and shapes, mostly in two dimensions. These objects usually are assumed to be given by polygonal chains or one or more simple polygons representing their boundary. As a measure for their resemblance usually the Hausdorff-distance is used, though some articles are concerned with other variants, as described in Section 2.2.3. 3.1. Optimal matching of line segment patterns Throughout this section we will assume, if not explicitly stated otherwise, that the input to the algorithms consists of two sets A, B of n, m line segments in two dimensions, respectively. The aim is to find an optimal match between A and B, i.e. a transformation T minimizing the Hausdorff-distance 8H(A, T(B)). Here, A and B are identified with the sets of points lying on their line segments and the metric underlying the Hausdorff-distance is L2. Notice that while there is a straightforward 0(nm) algorithm for computing the Hausdorff distance between fixed finite point sets A and B, this is no longer the case for sets of line segments. In the case of convex polygons Atallah [18] gave a linear time algorithm. For arbitrary sets of line segments an asymptotically optimal 0(nlogn) algorithm was given by Alt et al. in [2]. This algorithm is based on the fact, that the Hausdorff distance can only occur at endpoints of line segments or at intersection points of line segments of A with the Voronoi diagram of B or vice versa. Furthermore, for any Voronoi cdgQ this can happen only at the two extreme intersection points with line segments of the other set. These points are then determined by a line sweep algorithm. In [2] it was also observed that the matching problem under translations or rigid motions can be solved in polynomial time. These results are based on the fact that if the transformation has k degrees of freedom (e.g. ^ = 3 for rigid motions) then in the optimal position the Hausdorff-distance essentially must occur in at least k-\-l different places. More sophisticated techniques leading to asymptotically faster, but probably practically quite complicated algorithms are used by Agarwal et al. [16] for translations and Chew et 134 H. Alt and L.J. Guibas Fig. 3. The set Ag al. [29] for arbitrary rigid motions. Both articles start with essentially the same idea. They first solve the decision problem whether for given A, B, and ^ > 0 there exists a transformation T such that 5//(A, T{B)) ^ e. Let us consider the one-way Hausdorff-distance in detail; with just a few technical details it can be extended to the two way Hausdorff distance. Let Cs be the disk of radius e around the origin and A^ the Minkowski sum A 0 Q . Clearly, As is the union of so called "racetracks" ([16]), i.e. rectangles of width 2e with semidisks of radius e attached at their ends (see Figure 3). Now, for a transformation T the one-way Hausdorff-distance 8H(T(B), A) ^S exactly if T(B) C Ag. Let us consider the case of translations first. Suppose r is a translation vector not satisfying the inclusion above. So we have 5 -f- f ^ A^, in particular t -\-bi gl Ag for some line segment bi e B. This is equivalent to r G A^ 0 (—^/), where A^ denotes the complement B? \ A^ of A^. Conversely, a translation t moves B into A^ exactly if r G Ag 0 {—bi) for / = 1 , . . . , m. The latter set we will denote by A^, (see Figure 4) so there is a one way match exactly if the set S^^A^ i=\ is nonempty. Figure 4 shows that in the construction of the sets A^, / =: 1 , . . . , m, we use the circular arcs and line segments bounding As and, additionally, these curves translated by the vector bi; altogether there are 0(nm) circular arcs and line segments. Each A^ is a union of some of the cells of the arrangement A defined by these curves. The decision problem for translations can be solved by a sweep line algorithm. While sweeping across the arrangement the algorithm computes the depth of the cells, i.e. the number of different A^ that cover a cell. Clearly, S is nonempty, exactly if there is a cell of depth m. Since the complexity of the arrangement is 0{{mn)^) the sweep line algorithm solves the decision problem for translations in 0((mn)^log(mn)) time (see [16]). In the case of rigid motions (see [29]) we assume that first the set B is rotated around the origin and then translated in order to match the set A. For each orientation 0 € [0, 2n) we consider the sets A^.{0) which are defined like A?, only that bi is rotated by angle 0 around the origin. Likewise the arrangement A(0) depends on the orientation 0. Discrete geometric shapes: Matching, interpolation, and approximation 135 -h Fig. 4. The set Af (shaded). b) Fig. 5. Orientations where the arrangement changes: (a) double event; (b) triple event. ^(0) and the depth of its cells can be determined as described before. Then while increasing 0 the algorithm keeps track of the changes that occur in the arrangement and of the depth of the newly appearing cells. The arrangement only changes topologically for orientations 0 where two sets of the form {aj 0 £) 0 (—^j) touch each other, a so-called "double event" (see Figure 5(a)), or the boundaries of three of them intersect in one point, a "triple event" (see Figure 5(b)). Altogether, there are O(m^n^) events. The algorithm determines them and sorts them in a preprocessing phase. Then it makes use of a suitable data structure where all local changes in the arrangement due to an event can be processed in constant time. In this 136 H. Alt and LJ. Guibas manner, starting from ^(0) all arrangements are inspected whether for some 0 there is a cell in A{0) of depth m. If so, a positive answer is given to the decision problem. Altogether the algorithm requires Oirri^n^ log(mn)) time. In both cases the algorithms for the decision problem can be turned into ones for the optimization problem hy parametric search (see [74,32]) on the parameter e. For matching by translation, Agarwal et al. [16] describe a parallel algorithm which first computes the arrangement A. Then it determines the depth of its cells by considering the dual graph, finding an Eulerian path in it and using that to traverse the cells systematically. This parallel algorithm is used to direct the parametric search. Altogether, an 0((mn)^log^(mn)) algorithm for finding the optimal matching under translations is obtained. For optimal matching by rigid motions Chew et al. [29] use an EREW-PRAM sorting algorithm for the events to direct the parametric search. Whenever this algorithm attempts to compare two events 0\ (s), 62(8), the set of critical parameters e is determined and sorted. Then a binary search is done on these critical parameters in each step involving the decision algorithm described before to determine the interval containing the optimal e. Altogether an 0((mn)^ \og^(mn)) algorithm is obtained for optimal matching under rigid motions. With essentially the same ideas and the usage of dynamic Voronoi diagrams efficient algorithms for point pattern matching are obtained in [29], as was mentioned in Section 2. Huttenlocher et al. [56] also extend the Voronoi diagram approach described in Section 2 to sets of fine segments. This method leads to rather complicated surfaces if the Hausdorffdistance with respect to the L2-metric is considered. However, if the underlying metric is L\ or Loo the situation is simpler and an 0({mn)^a(mn)) algorithm can be obtained. 3.2. Approximate matching As we have seen in the previous sections the algorithms for finding the optimal solution of the matching problem use quite sophisticated techniques from computational geometry and, therefore, are probably too complicated to implement. Also the asymptotic running times are, although polynomial, rather high. One approach to overcome these problems are approximation algorithms for the optimization problem. These are algorithms that do not necessarily find the optimal solution, but find one whose distance is within a constant factor c of the optimum. Again, if not explicitly stated otherwise we will consider matching of sets of line segments with respect to Hausdorff-distance based on the L2-metric. Approximation algorithms in this context were considered first by Alt et al. [2,3] using so called reference points. These are points rA, rg that are assigned to the sets A and B and have the property that when B is transformed to match A optimally then the distance of the transformed r^ to r^ is also bounded by a constant factor a times the Hausdorff-distance of the matching. The factor a is called the quality of the reference point. A reference point can be found very easily in the case of translations as allowable transformations. In fact, to a set A assign the point r^ = (-^min' ^min^ where x^-^^ (Jmin) ^^ ^^^ lowest X-coordinate (j-coordinate) of any point in A. So rA is the lower left comer of the smallest axes-parallel rectangle enclosing A. Observe that if in an optimal match A and the translated image B^ of B have Hausdorff-distance 8 then \x^- — Xj?- | ^ 8 and Discrete geometric shapes: Matching, interpolation, and approximation 137 ^min ~ ^^minl ^ ^ (^^^ Figure 6). Consequently, the distance of TA and r^/, which is the image of fB under the translation, is at most \/28. So r^ is a reference point for A of quality V2. Now, suppose that instead of finding the optimal translation of B to match A we use just the one that matches rs to r^ obtaining an image B^^ of B. Then, since B^ is obtained from B^^ by translation by the vector r^/ — r^, SH(B\ B") < V25. Consequently SH{A,B') ^ 8H{A,B')^8H{B\B') < (v^+l)5. So the Hausdorff-distance of the match found by the reference points is at most by a factor V2 + 1 ^ 2.4 worse than the optimal one. In general, matching with respect to a reference point of quality a for translations yields a match that is at most a factor a + \ worse than the optimal one. Observe that the approximation algorithm has linear running time, since only the reference points need to be determined. So it is much faster and much simpler than the best known algorithm for finding the optimal match which has running time Oiimnflog^mn) [16]. Reference points for rigid motions are not that easy to find. Obviously the one for translations given above does not work any more. Nor do the seemingly obvious choices like the center of gravity of the convex hull of a set A or the center of the smallest enclosing circle. It was shown by Alt et al. [2] that for an arbitrary bounded set A the center of gravity of the boundary of the convex hull is a reference point with respect to rigid motions. However, the upper bound given for the quality of this reference point is rather large, in fact, it is 47r + 4 ^ 1 6 . 6 . 138 H. Alt and L.J. Guibas Aichholzer et al. in [1] found a better reference point. In fact, imagine that the axesparallel wedge determining the reference point for translations given above is circled around the set A always keeping the bounding half-lines tangent to A. Then its apex describes a closed curve. For the "average point" on this curve no particular direction is preferred, so it might be a candidate for a reference point under rigid motions. Formalizing and slightly simplifying this idea, we obtain the following definition for arbitrary bounded sets A: ^2n s{A):=- 1 r"" / n Jo hAm /cos0\ . l]d(t>^ ysmcpj where HA (0) is the so called support function of A which assigns to 0 the largest extent of A in direction 0. The point s(A) is the so called Steiner-point of A. The Steiner point is well investigated in the field of convex geometry [85,52] as well as in functional analysis [80]. Using these results it is shown in [1] that the Steiner point is a reference point not only for translations and rigid motions, but even for similarities and not only for two but for arbitrary dimensions. Its quality is A/n ^ 1.27 in two, 1.5 in three and between ->J2/n\/d and V2/7rV^ + 1 in d dimensions. Usually the Steiner point is defined for convex bodies only, it can be extended to arbitrary bounded sets by taking the Steiner point of the convex hull. In the case of sets of line segments we obtain convex polygons for which the Steiner point can easily be computed. In fact it is the weighted average of the vertices where each vertex is weighted by its exterior angle divided by In. Furthermore, Przeslawski and Yost [80] showed that for translations there is no reference point whose quality is better than the one of the Steiner point. In the case of translations the usage of a reference point for approximate matching was obvious. In the case of rigid motions first the two reference points are matched by a translation and then the optimal matching is sought under rotations around the common reference point. This is easier than the general optimization problem since the matching of the reference points reduces the number of degrees of freedom by two (in two dimensions). In the case of similarities, figure B is first stretched by the factor dA/ds, where dA and dg are the diameters of A and B, respectively. Then the algorithm for rigid motions is applied. In [1] it is shown that from reference points of quality a approximation algorithms are obtained yielding a solution within a factor of a + 1 of the optimal one in the case of rigid motions and within a factor of a + 3 of the optimum in the case of similarities. The running times for both approximate matching algorithms are Oinm Xoginm) log*(nm)). Finally it should be mentioned that by an idea due to Schirra [82] it is possible to get the approximation constant of reference point based matching with respect to translations or rigid motions arbitrarily close to 1. In fact, suppose that the quality of the reference point is a. This means that in the optimal match the reference point r^ is mapped into the a5-neighborhood UofrA- In order to achieve an approximation constant 1 + ^ for a given s, we place onto U a sufficiently small grid so that no point in U has distance greater than eS from the nearest grid point. Instead of placing rg onto TA only we place it onto each grid point and proceed as described before. Since at some point rg is placed at a distance of at most e^ of its optimal position, the approximation constant is at most \-\- e. Notice, Discrete geometric shapes: Matching, interpolation, and approximation 139 Fig. 7. Two curves with small Hausdorff-distance 8. that for a constant s only constantly many grid points are considered so the running time only changes by a constant factor. 3.3. Distance functions for non-point objects In some applications, the simplicity of the Hausdorff-distance can be a disadvantage. In fact, when the distance between curves is measured the Hausdorff-distance may give a wrong picture. Figure 7 shows an example where two curves have a small Hausdorffdistance although they have no resemblance at all. The reason for this problem is that the Hausdorff-distance is only concerned with the point sets but not with the course of the curves. A distance considering the curves' courses can informally be illustrated as follows: Suppose a man is walking his dog, he is walking on one curve, the dog on the other. Both are allowed to control their speed but not to go backward. What is the shortest length of a leash that is possible? Formally, this distance measure between two curves in J-dimensional space can be described as follows 8F{f g) = inf max \\f{a(t)) - g{p(t)) \\ where / , ^ : [0, 1] ^ M*^ are parameterizations of the two curves and a, ^ : [0, 1] -^ [0, 1] range over all continuous and monotone increasing functions. This distance measure is known under the name Frechet-distance. The Frechet-distance seems considerably more difficult to handle than the Hausdorffdistance and no matching algorithms have been developed yet. The following algorithm for measuring the Frechet-distance between two polygonal chains has been given by Alt andGodau[8,9]. Let P and Q be the given polygonal chains consisting of n and m line segments respectively. First we consider the decision problem, so in addition to P and Q some 6: > 0 is given and we want to decide whether (5/r(P, Q) ^s. We first consider the m x n-diagram DsiP, Q) shown in Figure 8 which indicates by the white area for which points p e P, ^ ^ Q \\p — ^W ^ £' The horizontal direction of the diagram corresponds to the natural parameterization of P and the vertical one to that of Q. One square cell of the diagram corresponds to a pair of edges one from P and one from Q and can easily be computed since it is the intersection of the bounding square with an ellipse. 140 H. Alt and L.J. Guibas Fig. 8. P, Q, 6 and the diagram D^iP, Q). 0 i Fig. 9. Turning function of a simple polygon. Now it follows from the definition that S^iP, Q) ^ e exactly if there is a monotone increasing curve from the lower left to the upper right comer of the diagram. These considerations lead to an algorithm of running time 0(mn) for the decision problem. Then Cole's variant of parametric search [33] can be used to obtain an algorithm of running time 0(mnlog(mn)) to compute the Frechet-distance between P and Q. In practice, it seems more reasonable to determine 8f(P, Q) bit by bit using binary search where in each step the algorithm for the decision problem is applied. Arkin et al. [6] consider a distance function between shapes in two dimensions that is based on the slope of the bounding curves. In fact, for a given shape A some starting point O on the bounding curve is chosen and the curve is then parametrized with the natural parameterization HA (i.e. parameterization by arc length) which is normalized so that the parameter interval is [0,1]. To each parameter r € [0,1] the angle &A{t) between the counter-clockwise tangent of A in the point n^CO and a horizontal line is assigned. 0A is called the turning function of A. OA is piecewise constant for simple polygons (see Figure 9), it is invariant under translations and, because of the normalization of the parameterization under scaling. A rotation of A corresponds simply to a shift in 6)-direction and a change of the origin to a shift in ^-direction. Now, as a distance measure between shapes A and B the L^-metric {p e N) between Discrete geometric shapes: Matching, interpolation, and approximation 141 &A and GB is being used, i.e. we define 8,(A,B)=(j \0A(s)-eB(s)\'ds\ . Then this distance measure is made invariant under translations and the choice of the starting point 0: ^P dp(A,B)= min ( f ISAis + t) - 0B(S) ^ 0\^ ds] It is shown that dp is a metric for all /? € N. An algorithm is given for computing d2(A, B) where A, B are simple polygons with n and m edges, respectively. It can be shown that the minimum in the definition of dp can occur for at most 0(mn) "critical" values of ^ By considering partial derivatives with respect to G it is shown that for any fixed t the optimal 0 can easily be computed. Altogether, an 0(mn logmn) algorithm is obtained. An extension of this algorithm to deal with scaling as well was given by Cohen and Guibas [28]. The drawback of this distance measure is its sensitivity to noise, especially nonuniformly distributed noise, but it works properly if the curves are sufficiently smooth. A generalization of this distance to a distance measure that is invariant under affine transformations is given by Huttenlocher and Kedem [53]. With respect to this distance, matching of two polygons with n and m vertices under affine transformations is possible in time 0(mn log mn). A different idea is to represent shapes by their areas rather than by their boundaries. In this context the probably most natural distance measure between two shapes is the area of their symmetric difference. However, this measure seems to be much more difficult to handle than Hausdorff-distance. Within computational geometry it was first considered in a paper by Alt et al. [4] in connection with the very special problem of optimally approximating a convex polygon by an axes-parallel rectangle. Meanwhile some more results on the symmetric difference have been obtained. In fact, de Berg et al. in [34] consider matching algorithms maximizing the area of overlap of convex polygons which is the same as minimizing the symmetric difference. They obtain an algorithm of running time 0((n + m) \og{n + m)) for translations where n and m are the numbers of vertices of the two polygons. In addition, it is shown that if just the two centers of gravity are being matched by a translation this yields a position of two convex figures where the area of overlap is within a constant factor of the maximal one. A lower bound of 9/25 and an upper bound of 4/9 is obtained for this constant, so the center of gravity is a reference point with respect to maximizing the overlap under translations. As can easily be seen this does not imply directly that it is a reference point with respect to the area of the symmetric difference. However, this can be shown, as well. In fact, Alt et al. [7] show that if the centers of gravity of two convex figures are matched the area of the symmetric difference is at most 11/3 times the minimal one. It is demonstrated with an example that this bound is tight. The center of gravity is also a reference point for other sets of transformations such as rigid motions, homotheties, similarities, and arbitrary affine mappings. 142 H. Alt and L.J. Guibas 4. Shape simplification and approximation In manipulating shape representations, it is often advantageous to reduce the complexity of the representation as much as possible, while still staying geometrically close to the original data. There is a vast literature on shape simplification and approximation, both within computational geometry and in the various applied disciplines where shape representation and manipulation issues arise. In this section we cannot possibly attempt to survey all the approaches taken and the results obtained. We will focus on a small subset of results giving efficient algorithms for shape simplification under precise measures of the approximation involved. 4.1. Two-dimensional results To focus our attention, let us consider the problem of simplifying a shape represented as a polygonal chain in the plane. Our goal is to find another polygonal chain with a smaller number of links and which stays close to the original. Let the original chain be C, defined by n vertices v\,V2, •• -.Vn (we assume in this discussion that C is open), and let the desired approximating chain A be defined by m vertices ifi, w;2, • • •, w;^. A number of variations on the problem are possible, depending on exactly how the error, or distance, between C and A is measured, and on whether the Wj 's need to be a subset of the u/ 's, or can be arbitrary points of the plane. In general we have to solve one of two problems in finding A: The min-# problem: Find an A which minimizes m (the combinatorial complexity of A), given some a priori bound e on the maximum allowed distance between C and A, or The min-e problem: For a given m, find an A which minimizes the distance e between CandA. In order to illustrate some of the ideas involved in solving these problems, let us further assume that both C and A are jc-monotone chains — in other words, C and A are piecewise linear continuous functions C{x) and A{x). For such chains a very natural measure of distance is the so-called uniform or Chebyshev metric defined as J(A, C) = max|A(jc) - C(JC)|, where the max is taken over the support on the x-axis for C Let us consider the case when the vertices of A can be arbitrary points, i.e. need not be vertices of C. Imai and Iri [63,64], and Hakimi and Schmeichel [57] gave optimal 0(n) algorithms for the min-# problem in this context. Their methods can be viewed as an extension of the linear-time algorithm of Suri [87] for computing a minimum link path between two given points inside a simple polygon (here the polygon is the chain C appropriately 'fattened' vertically by the allowed error s) and make crucial use of the concept of weak-visibility from an edge inside a simple polygon [17]. Similar ideas were also used by Aggarwal et al. [5] to give an Discrete geometric shapes: Matching, interpolation, and approximation I A3 0{n\ogk) algorithm for finding a convex polygon with the smallest number k of sides nested between two given convex polygons of total complexity n. For the min-6: variant of the chain simplification problem, Hakimi and Schmeichel gave an 0{n^ \ogn) algorithm by cleverly limiting the critical values of 6" to a set of size 0{n^) and then using a certain kind of binary search. More recently, Goodrich [49] used a number of new geometric insights to reduce the set of critical e values to 0{n) and thus obtained an 0{n\ogn) algorithm through several applications of pipelined parametric searching techniques. For a survey of results when A and C are not constrained to be jc-monotone, see the paper of Eu and Toussaint [41] and related work by Hershberger and Snoeyink [60], and Guibas et al. [46]. In general, algorithms for the min-# problem have linear complexity, while those for the min-^ have quadratic complexity. Next let us consider the problem variant where the vertices of A have to be a subset of the vertices of C Now we do not require that A or C be x-monotone (so we revert to using the Hausdorff distance function). One of the oldest and most popular algorithms for this problem is the heuristic Douglas-Peucker [37] line simplification algorithm from the Geographical Information Systems community; Hershberger and Snoeyink showed how to implement this algorithm to run in 0{n\ogn) time [58]. A more formal approach to the problem was initiated in the papers by Imai and Iri cited above. For the min-# variant, Imai and Iri reduce the problem to a graph-theoretic problem as follows. A line segment vJiTj joining vertices vi and Vj of C is called a shortcut for the subchain f /, i;/+i,..., f y of C. A shortcut is allowed if the error it induces is at most the prescribed error e\ the error of the shortcut 'vTv] is defined to be the maximum distance from Wv] to a point Vk, where i ^ A: ^ j . It is easy to see that this is also the Hausdorff distance from IJrv] to the subchain f/, f/+i,..., f J. Our goal is to replace C by a chain consisting of allowed shortcuts. So we consider a directed acyclic graph G whose nodes V are the vertices fi, i'2,..., f,2 of C and whose edges E are the pairs {vt, Vj) if and only if / < j and the shortcut vt Vj is allowed. A shortest (in terms of the number of edges) path from vi to Vn corresponds to a minimum vertex simplification of C; such a path can be found in time linear in the size of G by topological sorting [31]. The size of G is O(n^) and it can be computed by an obvious method in 0(n^) time. Thus constructing G is the bottleneck in the computation. Mellonan and O'Rourke [75] showed how to reduce the construction time to 0(n^ logn), and Chan and Chin [26] further reduced it to optimal O(w^). The Chan and Chin algorithm starts from the observation that the error of a shortcut WvJ, i < j , is the maximum of the errors of two half-lines: the one starting at vt and going towards Vj (call it Uj), and of the one starting at Vj and going towards vt (call it Ijt). To compute the graph G we intersect the graphs G\ and G2, where Gi contains the edge (f/, Vj) if and only if / < j and the error of Uj is less than s and G2 contains the edge {vi, Vj) if and only if / < j and the error of Ijt is less than e. We show how to compute G\ in O(n^) time; the computation of G2 is entirely symmetric by reversing the number of the vertices of C We examine the vertices of Gi in the sequence v\,V2, - • .,Vn. When we process vertex Vi, we calculate in turn the errors determined by all half-lines Uj, where j takes on the values / + 1, / -f 2 , . . . , n. Let Dk denote a closed disk of radius e centered at Vk. The error of Uj is at most e if and only if Uj intersects all disks Dk with i ^k ^ j . Thus the algorithm works by maintaining the cone of half-lines from vt which intersect the disks 144 H. Alt and L.J. Guibas ^z+l Fig. 10. The computation of the allowed shortcuts starting at Vj. D/+1, D/+2, • • •, ^y (which is nothing but the intersection for the corresponding cones for all these disks separately). When we process fy+i it suffices to update this cone, which is a constant time computation. If the cone stays non-empty, then (f,, fy+1) is in G i; otherwise we are done with Vi as all further half-lines will also have error which is too large. Thus the computation of G i, and therefore of G and of our desired shortest path can be done in 0(n^) time. Figure 10 illustrates the situation with the disks and the cone of vi a some intermediate point. Methods based on the Imai-Iri graph construction seem inherently quadratic as, if e is large enough, the graph will have Q{n^) allowed shortcuts. However, Varadarajan [89] was able to use graph chque compression techniques such as those proposed by Feder and Motwani [44] to obtain an 0(«^/'^"^'^) algorithm for this min-# problem in the case of X-monotone chains. Varadarajan gave a randomized and a more complex deterministic algorithm for the min-^ version of this problem as well, with the same time bound. In the general (non-x-monotone) case of the above chain simplification problems it is quite possible that A may end up being self-intersecting, even though C itself is simple. This is clearly undesirable in many application contexts. Even worse, one is often simplifying several chains at once, as in the case of boundaries between regions in, say, a geographical map. In this case it is important that the topological structure of the regions be maintained after simplification, so the simplifications of disjoint chains are not allowed to end up crossing each other. Guibas et al. [46] showed that the min-# problem is NP-hard in this case, when the positions of the approximating vertices can be arbitrary. When the vertices of the approximating chain have to be a subset of the original chain and we are in the x-monotone setting, de Berg et al. [35] gave an 0{n(n + m) log^i) algorithm for the min-# problem for a chain C of n vertices so that the resulting approximating chain A is guaranteed to be simple and to be on the same side of each of m given points as C is. Using this algorithm as a local subroutine, they give a method for polygonal subdivision simpHfication which is guaranteed to avoid topological inconsistencies (but which need not be globally optimal). Discrete geometric shapes: Matching, interpolation, and approximation 145 4.2. Three dimensions Unfortunately the situation is not an equally happy one in three dimensions. Nearly all natural extensions of the above problems are NP-hard, so most of the extant work to-date has focused on approximation algorithms. The analog of an x-monotone chain in 3-D is that of a polyhedral terrain, which is just a continuous bivariate (and possibly non-total) function z = T{x,y) which happens to be piecewise linear. The complexity of a terrain can be measured by its total number of vertices, edges, and faces. The numbers of these are linearly related by Ruler's relation, so most often we will use the number of faces as our measure of the complexity of a terrain. There is a plethora of techniques in the literature for simplifying polyhedral terrains, by effectively deleting vertices which lie in relatively flat neighborhoods (and retriangulating the hole thus created). Unfortunately not much has been proved about such methods. In fact, Agarwal and Suri [14] have shown that even the simpler problem of deciding the approximability within a vertical tolerance 6: of a collection of n isolated points by a polyhedral terrain with at most k faces is NP-hard. Similarly, though more surprisingly. Das and Joseph [36] showed that finding a convex polytope of at most k facets nested between two other convex polytopes P and Q with a total of n facets is also NP-hard, thus settling an old question first posed by Klee. With these results in sight, researchers turned their effort to approximation algorithms. Mitchell and Suri [76] formalized the nested convex polytope problem as a set-cover problem by considering the regions defined on the outer polytope by tangent planes to the inner polytope. They showed that the greedy method of set covering computes a nested polytope with 0(/c \ogn) facets, where K is the complexity of an optimal nested polytope. The same approach also works for the approximation by a convex surface of n points themselves sampled from another convex surface. These algorithms run in O(n^) time. These results were extended by Clarkson [30], who gave a randomized algorithm with expected time complexity 0(/cn^+^) for computing a nested polytope of size 0(/clog/c). Bronnimann and Goodrich [23] further improved the set cover algorithm using VC-dimension ideas to obtain a deterministic algorithm that computes a nested polytope which is to within a constant factor of the optimal one. The set cover formulation, unfortunately, does not work for the terrain approximation problem, as we cannot independently select faces in the approximating surface. Agarwal and Suri in the paper cited above formulate instead the terrain fitting problem as a geometric partitioning problem: first we project all the points to be approximated on the x j-plane; then we seek a disjoint collection of triangles in the xj-plane which cover all these points and such that each triangle satisfies a certain legality constraint w.r.t. the points it covers. This constraint, which can be formulated as a linear program, is that the triangle can be lifted to 3-D so that it 6:-approximates all the points it contains. Agarwal and Suri gave an approximation algorithm which solves this problem and produces a covering set of legitimate triangles whose size is 0(/c log/c), where again K is the minimum number of triangles possible. Unfortunately their algorithm has a very high complexity 0(n^). 146 H. Alt and LJ. Guibas 5. Shape interpolation Shape interpolation, more commonly known as morphing, has recently become a topic of active research interest in computer graphics, computer animation and entertainment, solid reconstruction, and image compression. The general problem is that of continuously transforming one geometric shape into another in a way that makes apparent the salient similarities between the two shapes and 'smoothes over' their dissimilarities. Some of the relevant graphics papers are [68,83,67,84]. The morphing transformation may be thought of as taking place either in the time domain, as in animation, or in the space domain, as in surface reconstruction from planar sections. The latter area has already an extensive literature of its own [43], and computational geometric techniques have been used with good results [90,25] (though the problem is not always solvable [50]). In general there are numerous ways to interpolate between two shapes and little has been said about criteria for comparing the quality of different morphs and notions of optimality. Often, the class of allowable or desirable morphing transforms in only vaguely specified, with the result that the problem ends up being either under- or over-constrained. In this section we will survey the rather small amount of work in this area which relates to Computational Geometry. Let P and Q be the two shapes we wish to morph. For now we do not specify how the shapes P and Q are described, or what is the ambient space (2-D, 3-D, etc.). Most morphing algorithms operate according to the following paradigm: firstly relevant 'features' of P and Q are identified and matched pairwise; secondly, smooth motions are planned that will bring into alignment these pairs of corresponding features; and thirdly the whole morphing transformation is generated, while respecting other global constraints which the shapes P, Q, and their interpolants must satisfy. This paradigm works well when the class of shapes to be morphed consists of fairly similar objects. In cases, however, when we want to be able to morph a great variety of different shapes, the above process is commonly subdivided into a series of stages. The shapes P and Q are first 'canonicalized' by mapping them into their canonical forms K(P) and K(Q) respectively — these canonical forms are more standardized and therefore easier to morph to each other. The whole transformation is then done by going from P to /c(P) to /c((2) to Q. As the above description makes clear, there are numerous connections between the problems of shape matching and shape interpolation, and several of the matching techniques already discussed are applicable to the morphing problem, especially in the feature matching stage. It is not so obvious, but it is equally true that morphing techniques can also be used for shape comparison problems. In a certain sense, the optimum morph from P to Q is the transformation that distorts P as little as possible in order to make it look like Q. In a morphing algorithm we can assign a notion of 'work' or cost to the distortions the algorithm needs to perform. The minimum work then required to morph P into Q can then serve as a measure of the distance from shape P to shape Q. Note that such a distance function based on morphing clearly satisfies the triangle inequality. To make these matters concrete, let us discuss a few simple examples in 2-D and 3-D. Let P be an open simple polygonal chain of m vertices P = p\p2- • -Pm and Q be an open simple polygonal chain of n vertices Q = qxqi-•-qn- This problem was considered by Sederberg and Greenwood [83]. According to our paradigm above, we first need to establish a correspondence between the 'features' of P and Q — for polygonal chains the Discrete geometric shapes: Matching, interpolation, and approximation Ul Fig. 11. An example of matching polygonal chain vertices. natural notion is that of vertices (though other choices also make sense in applications). Now since m might be different from n, in general this will have to be a many-to-one, or one-to-many mapping. But where should these duplicate vertices be added? We can represent all possible ways to pair up vertices of P with vertices of Q in sequence by considering monotone paths in the [l..m] x [\..n\ grid. An example is shown in Figure 11, which shows a particular matching between a chain P of 8 vertices and a chain 2 of 10 vertices. A diagonal move on the monotone path corresponds to advancing on both P and Q, while a horizontal move corresponds to advancing on Q only (and thus duplicating the corresponding vertex of P. We can choose an optimum correspondence, by selecting the path n to be of minimal cost in some appropriate sense. For example, we may want to minimize the sum of the distances of all the corresponding pairs of vertices. Sederberg and Greenwood developed a physics-based measure of the energy required to stretch and bend P into Q once the correspondence by n is given. The optimal n under such measures can be computed by classical dynamic programming techniques [31] in time 0(mn). Similar ideas have been used to fit polyhedral sleeves to polygonal slices in parallel planes [25]. Once we have the correspondence, we can then move corresponding vertices to each other through linear interpolation. Implicitly, at each time t, this defines an interpolating polygonal chain Rt and thus our construction of a morph between the polygonal chains is complete. Note also that in order to extend this method to closed polygonal chains we 148 H. Alt and L.J. Guibas (a) (b) Fig. 12. Examples of polygonal chain morphs: (a) a good case, (b) a bad case. must decide first on an appropriate 'origin' for each chain, and this is not a trivial matter. Figure 12 shows some successful and unsuccessful examples of this method, depending on the origin chosen. Note in particular that the interpolating chain Rf can self-intersect, even though neither P and Q do. Sederberg et al. also proposed another simple method for polygon interpolation based on interpolating side lengths and angles, once a vertex correspondence is established [84] — but now the challenge becomes to get the polygons to 'close up'. Preserving structural properties during a morph, such as the simplicity of a chain in the example above, is a difficult problem. Guibas and Hershberger [45], consider how to morph two parallel polygons to each other while maintaining simplicity. The setting is now that P and Q are two simple polygons in the plane of n sides each, and there is a 1-1 correspondence between the sides of P and Q so that corresponding sides are parallel. The goal is to continuously deform P io Q while at all times the interpolating polygon Rt has its corresponding sides parallel to those of P and Q and stays simple. In this case the very statement of the problem provides the correspondence between features of the polygons. Even so, the two polygons P and Q can look quite different and the existence of a morph which remains parallel and simple is not obvious; see Figure 13 (a morph between these two spiraling polygons can happen by simulating the way recording tape can move from one reel to another). Guibas and Hershberger showed that this is, nevertheless, always possible and gave an algorithm which uses 0(n^^^^^) primitive operations called 'parallel moves'; this was later improved to O(nlogn) by Hershberger and Suri [61]. A parallel move is a translation of a side of a polygon parallel to itself, with appropriate modifications of the polygon at the endpoints of the edge. Guibas and Hershberger first showed that parallel moves can be used to take each polygon to a fractal-like canonical or reduced form in which portions of the polygon's boundary have been shrunk to micro-structures of widely different scales. Discrete geometric shapes: Matching, interpolation, and approximation 149 I L 1 Q Fig. 13. These oppositely spiraling parallel polygons are still morphable. A polygon in this canonical form corresponds, roughly speaking, to a binary tree whose leaf weights are the angles of the original polygon. Once P and Q are in this canonical form, the corresponding trees can be morphed into each other through a series of standard tree rotation transformations; certain validity conditions have to hold throughout this process. These tree rotations can be realized geometrically through parallel moves on the polygons. The fractal-like structure of the canonical form helps in arguing that the translations required to implement particular rotations do not interfere with other parts of the polygon. Clearly the Guibas-Hershberger morph solves only a limited problem and even for that the canonical form used introduces unnecessarily large distortions into the interpolating shapes. Different polygon morphing techniques were developed by Shapira and Rappoport [86], based on the star-skeleton representation of a polygon (a decomposition of the polygon into star-shaped pieces). Such methods do much better in preserving the metric properties of the polygons, but unfortunately they still do not preserve global constraints, such as simplicity — plus they are expensive, requiring O(n^) time. Another idea for morphing polygons can be based on the compatible triangulations result of Aronov, Seidel, and Souvaine [15]. They showed that P and Q can always be 'compatibly'-triangulated by adding O(n^) Steiner points (compatibility means that the triangulations are combinatorially equivalent). The use of conformal mappings has also been suggested. Let us now also look at some work in three dimensions. The only case that has been extensively studied is that of morphing convex polytopes [67]. If P and Q are convex polyhedra, a natural way to construct a matching between their surfaces is to match points on the two polyhedra that admit of the same (outwards) normal. In general, this will match all points on each face of P to a vertex of Q and vice versa, as well as matching (the points of) certain pairs of edges, one from P and one from g . If we place the origin at an arbitrary point of space and compute the vector sums of corresponding pairs of points from P and 2 , the resulting set of points will form the boundary of another convex polytope, called the Minkowski sum of P and Q and denoted by P 0 2 [69,73]. Armed with this concept, we can then morph P to Q by constructing the mixed volume {\ — t)P ®tQ, diSi varies in the range 0 < f ^ 1. This type of morph was exploited by Kaul and Rossignac [68,81]. The same technique works, of course, in 2-D or dimensions higher than three. A nice way to visualize this morph in 2-D is to think of P and Q as two convex polygons placed on 150 H. Alt and LJ. Guibas parallel planes in 3-D. One then constructs the convex hull of the union of P and Q by adding a 'sleeve' wrapping around P and Q. The sections of this sleeve by a plane moving parallel to itself from that containing P to that containing Q gives us the morph. The 'kinetic framework' of [51] allows the extension of this type of morph to general polygons in the plane. Also, since regular subdivisions of the plane or alpha shapes [40] can be viewed as projections of convex polytopes in one dimension higher, the above method also gives us some possibilities for morphing such subdivisions or alpha shapes. Other approaches to morphing 2-D or 3-D shapes are given in [47,67,42]. References [1] O. Aichholzer, H. Alt and G. Rote, Matching shapes with a reference point, Intemat. J. Comput. Geom. Appl. 7 (1997), 349-363. [2] H. Alt, B. Behrends and J. Blomer, Approximate matching of polygonal shapes, Proc. 7th Annu. ACM Sympos. Comput. Geom. (1991), 186-193. [3] H. Alt, B. Behrends and J. Blomer, Approximate matching ofpolygonal shapes, Ann. Math. Artif. Intell. 13 (1995), 251-266. [4] H. Alt, J. Blomer, M. Godau and H. Wagener, Approximation of convex polygons, Proc. 17th Intemat. CoUoq. Automata Lang. Program., Lecture Notes in Comput. Sci. 443, Springer-Verlag (1990), 703-716. [5] A. Aggarwal, H. Booth, J. O'Rourke, S. Suri and C.K. Yap, Finding minimal convex nested polygons. Inform. Comput. 83(1) (October 1989), 98-110. [6] E.M. Arkin, L.P. Chew, D.P. Huttenlocher, K. Kedem and J.S.B. Mitchell, An efficiently computable metric for comparing polygonal shapes, IEEE Trans. Pattern Anal. Mach. Intell. 13 (3) (1991), 209-216. [7] H. Alt, U. Fuchs, G. Rote and G. Weber, Matching convex shapes with respect to the symmetric difference, Proc. 4th Annual European Symp. on Algorithms-ESA'96, Springer Lecture Notes in Comput. Sci. 1136 (1996), 320-333. [8] H. Alt and M. Godau, Measuring the resemblance of polygonal curves, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 102-109. [9] H. Alt and M. Godau, Computing the Frechet distance between two polygonal curves, Intemat. J. Comput. Geom. Appl. 5 (1995), 75-91. [10] A.V. Aho, I.E. Hopcroft and J.D. Ullman, The Design and Analysis of Computer Algorithms, AddisonWesley, Reading, MA (1974). [11] E.M. Arkin, K. Kedem, J.S.B. Mitchell, J. Sprinzak and M. Werman, Matching points into pairwise-disjoint noise regions: Combinatorial bounds and algorithms, ORSA J. Comput. 4 (4) (1992), 375-386. [12] S. Arya, D.M. Mount, N.S. Netanyahu, R. Silverman and A. Wu, An optimal algorithm for approximate nearest neighbor searching, Proc. 5th ACM-SIAM Sympos. Discrete Algorithms (1994), 573-582. [13] H. Alt, K. Mehlhom, H. Wagener and E. Welzl, Congruence, similarity and symmetries of geometric objects. Discrete Comput. Geom. 3 (1988), 237-256. [14] P.K. Agarwal and S.Suri, Surface approximation and geometric partitions, Proc. 5th ACM-SIAM Sympos. Discrete Algorithms (1994), 24-33. [15] B. Aronov, R. Seidel and D. Souvaine, On compatible triangulations of simple polygons, Comput. Geom. 3 (1) (1993), 27-35. [16] P.K. Agarwal, M. Sharir and S. Toledo, Applications of parametric searching in geometric optimization, J. Algorithms 17 (1994), 292-318. [17] D. Avis and G.T. Toussaint, An optimal algorithm for determining the visibility of a polygon from an edge, IEEE Trans. Comput. C-30 (1981), 910-1014. [18] M.J. Atallah, A linear time algorithm for the Hausdorff distance between convex polygons. Inform. Process. Lett. 17 (1983), 207-209. [19] M.D. Atkinson, An optimal algorithm for geometrical congruence, J. Algorithms 8 (1987), 159-172. Discrete geometric shapes: Matching, interpolation, and approximation 151 [20] T. Akutsu, H. Tamaki and T. Tokuyama, Distribution of distances and triangles in a point set and algorithms for computing the largest common point set, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 314323. [21] H.S. Baird, Model-Based Image Matching Using Location, Distinguished Dissertation Series, MIT Press (1984). [22] B. Belirends, Algorithmen zur Erkennung der e-Kongruenz von Punktmengen und Polygonen, M.S. thesis, Freie Univ. Berlin, Institute for Computer Science (1990). [23] H. Bronnimann and M.T. Goodrich, Almost optimal set covers in finite VC-dimension, Discrete Comput. Geom. 14 (1995), 263-279. [24] C. Burnikel, J. Konnemann, K. Mehlhom, S. Naher, S. Schirra and C. Uhrig, Exact geometric computation in LEDA, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), C18-C19. [25] G. Barequet and M. Sharir, Piecewise-linear interpolation between polygonal slices, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 93-102. [26] W.S. Chan and F. Chin, Approximation of polygonal curves with minimum number of line segments or minimum error, Intemat. J. Comput. Geom. Appl. 6 (1996), 59-77. [27] L.P. Chew, D. Dor, A. Efrat and K. Kedem, Geometric pattern matching in d-dimensional space, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 979, Springer-Verlag (1995), 264-279. [28] S.D. Cohen and L.J. Guibas, Partial matching of planar polylines under similarity transformations, Proc. 8th ACM-SIAM Sympos. Discrete Algorithms (January 1997), 777-786. [29] L.P. Chew, M.T. Goodrich, D.P Huttenlocher, K. Kedem, J.M. Kleinberg and D. Kravets, Geometric pattern matching under Euclidean motion, Comput. Geom. 7 (1997), 113-124. [30] K.L. Clarkson, Algorithms for polytope covering and approximation, Proc. 3rd Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 709, Springer-Veriag (1993), 246-252. [31] T.H. Cormen, C.E. Leiserson and R.L. Rivest, Introduction to Algorithms, MIT Press, Cambridge, MA (1990). [32] R. Cole, Slowing down sorting networks to obtain faster sorting algorithms, Proc. 25th Annu. IEEE Sympos. Found. Comput. Sci. (1984), 255-260. [33] R. Cole, Slowing down sorting networks to obtain faster sorting algorithms, J. ACM 34 (1987), 200-208. [34] M. de Berg, O. Devillers, M. van Kreveld, O. Schwarzkopf and M. Teillaud, Computing the maximum overlap of two convex polygons under translation, Proc. 7th Annu. Intemat. Sympos. Algorithms Comput. (1996). [35] M. de Berg, M. van Kreveld and S. Schirra, A new approach to subdivision simplification, Proc. 12th Internal. Sympos. Comput.-Assist. Cartog. (1995), 79-88. [36] G. Das and D. Joseph, The complexity of minimum convex nested polyhedra, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 296-301. [37] D.H. Douglas and T.K. Peucker, Algorithms for the reduction of the number of points required to represent a digitized line or its caricature, Canadian Cartographer 10 (2) (December 1973), 112-122. [38] W. Eric and L. Grimson, Object Recognition by Computer: The Role of Geometric Constraints, MIT Press (1990). [39] A. Efrat and A. Itai, Improvements on bottleneck matching and related problems using geometry, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 301-310. [40] H. Edelsbrunner and E.P Miicke, Three-dimensional alpha shapes, ACM Trans. Graph. 13 (1) (January 1994), 43-72. [41] D. Eu and G. Toussaint, On approximating polygonal curves in two and three dimensions, Comput. Vision Graph. Image Process. 56 (1994), 231-246. [42] H. Edelsbrunner and R. Waupotitsch, A combinatorial approach to cartograms, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 98-108. [43] H. Fuchs, Z.M. Kedem and S.P. Uselton, Optimal surface reconstruction from planar contours, Comm. ACM 20 (1977), 693-702. [44] T. Feder and R. Motwani, Clique partitions, graph compression and speeding up algorithms, Proc. 23rd ACM Symp. Theory of Computing (1991), 123-133. [45] L. Guibas and J. Hershberger, Morphing simple polygons, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 267-276. 152 H. Alt and LJ. Guibas [46] LJ. Guibas, J.E. Hershberger, J.S.B. Mitchell and J.S. Snoeyink, Approximating polygons and subdivisions with minimum link paths, Intemat. J. Comput. Geom. Appl. 3(4) (December 1993), 383^15. [47] A. Glassner, Metamorphosis ofpolyhedra, Manuscript (1991). [48] M.T. Goodrich, J.S. Mitchell and M.W. Orietsky, Practical methods for approximate geometric pattern matching under rigid motion, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 103-112. [49] M.T. Goodrich, Efficient piecewise-linear function approximation using the uniform metric. Discrete Comput. Geom. 14 (1995), 445-462. [50] C. Gitlin, J. O'Rourke and V. Subramanian, On reconstructing polyhedra from parallel slices, Intemat. J. Comput. Geom. Appl. 6 (1) (1996), 103-122. [51] L.J. Guibas, L. Ramshaw and J. Stolfi, A kinetic framework for computational geometry, Proc. 24th Annu. IEEE Sympos. Found. Comput. Sci. (1983), 100-111. [52] B. Grunbaum, Convex Polytopes, Wiley, New York, NY (1967). [53] D.P. Huttenlocher and K. Kedem, Computing the minimum Hausdorff distance for point sets under translation, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 340-349. [54] D.P. Huttenlocher, K. Kedem and J.M. Kleinberg, On dynamic Voronoi diagrams and the minimum Hausdorff distance for point sets under Euclidean motion in the plane, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 110-120. [55] D.P. Huttenlocher, G.A. Klanderman and W.J. Rucklidge, Comparing images using the Hausdorff distance, IEEE Trans, on Pattern Analysis and Machine Intelligence 15 (1993), 850-863. [56] D.P. Huttenlocher, K. Kedem and M. Sharir, The upper envelope of Voronoi surfaces and its applications. Discrete Comput. Geom. 9 (1993), 267-291. [57] S.L. Hakimi and E.F. Schmeichel, Fitting polygonal functions to a set ofpoints in the plane, CVGIP: Graph. Models Image Process. 53 (2) (1991), 132-136. [58] J. Hershberger and J. Snoeyink, Speeding up the Douglas-Peucker line simplification algorithm, Proc. 5th Inti. Symp. Spatial Data Handling. IGU Commission on GIS (1992), 134-143. [59] P.J. Heffeman and S. Schirra, Approximate decision algorithms for point set congruence, Comput. Geom. 4 (1994), 137-156. [60] J. Hershberger and J. Snoeyink, Computing minimum length paths of a given homotopy class, Comput. Geom. 4 (1994), 63-98. [61] J. Hershberger and S. Suri, Morphing binary trees, Proc. 6th ACM-SIAM Sympos. Discrete Algorithms (1995), 396-404. [62] D. Huttenlocher and S. Ullman, Recognizing solid objects by alignment with an image, Intemat. J. Computer Vision 5 (1990), 195-212. [63] H. Imai and M. Iri, Computational-geometric methods for polygonal approximations of a curve, Comput. Vision Graph. Image Process. 36 (1986), 3 1 ^ 1 . [64] H. Imai and M. Iri, Polygonal approximations of a curve-formulations and algorithms. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1988), 71-86. [65] S. Irani and P. Raghavan, Combinatorial and experimental results for randomized point matching algorithms, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 68-77. [66] K. Imai, S. Sumino and H. Imai, Minimax geometric fitting of two corresponding sets of points, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 266-275. [67] J. Kent, W. Carlson and R. Parent, Shape transformation for polyhedral objects. Computer Graphics (SIGGRAPH '92 Proceedings), Vol. 26 (1992), 47-54. [68] A. Kaul and J. Rossignac, Solid-interpolating deformations: Construction and animation of PIPs, Proc. Eurographics '91 (1991), 493-505. [69] J.-C. Latombe, Robot Motion Planning, Kluwer Acad. Publ., Boston (1991). [70] Y. Lamdan, J.T. Schwartz and H.J. Wolfson, Object recognition by affine invariant matching. Proceedings of Computer Vision and Pattern Recognition (1988), 335-344. [71] Y Lamdan, J.T. Schwartz and H.J. Wolfson, On recognition o/3-d objects from 2-d images. Proceedings of the 1988 IEEE International Conference on Robotics and Automation (1988), 1407-1413. [72] Y Lamdan and H.J. Wolfson, Geometric hashing: A general and efficient model-based recognition scheme, Second Intemational Conference on Computer Vision (1988), 238-249. [73] L.A. Lyustemik, Convex Figures and Polyhedra, D.C. Heath, Boston, MA (1966). Discrete geometric shapes: Matching, interpolation, and approximation 153 [74] N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, J. ACM 30 (1983), 852-865. [75] A. Melkman and J. O'Rourke, On polygonal chain approximation. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1988), 87-95. [76] J.S.B. Mitchell and S. Suri, Separation and approximation ofpolyhedral objects, Comput. Geom. 5 (1995), 95-114. [77] R. Norel, D. Fischer, H. Wolfson and R. Nussinov, Molecular surface recognition by a computer visionbased technique. Protein Engineering 7 (1994), 3 9 ^ 6 . [78] R. Norel, S.L. Lin, H. Wolfson and R. Nussinov, Shape complimentarity at protein-protein interfaces, Biopolymers 34 (1994), 933-940. [79] M.H. Overmars and C.-K. Yap, New upper bounds in Klee's measure problem, SIAM J. Comput. 20 (1991), 1034-1045. [80] K. Przeslawski and D. Yost, Continuity properties of selectors and Michael's theorem, Michigan Math. J. 36(1989), 113-134. [81] J. Rossignac and A. Kaul, Agrels and bips: Metamorphosis as a Bezier curve in the space of polyhedra, Eurographics '94 Proceedings, Vol. 13 (1994), 179-184. [82] S. Schirra, Uber die Bitkomplexitdt der s-Kongruenz, M.S. thesis, Univ. des Saarlandes, Computer Science Department (1988). [83] T. Sederberg and E. Greenwood, A physically based approach to 2D shape blending. Computer Graphics (SIGGRAPH '92 Proceedings), Vol. 26 (1992), 25-34. [84] T. Sederberg, P. Gao, G. Wang and H. Mu, 2D shape blending: An intrinsic solution to the vertex path problem. Computer Graphics (SIGGRAPH '93 Proceedings), Vol. 27 (1993), 15-18. [85] G.C. Shephard, The Steiner point of a convex poly tope, Canadian J. Math. 18 (1966), 1294-1300. [86] M. Shapira and A. Rappoport, Shape blending using the skeleton representation, IEEE Computer Graphics and Appl. 16 (1995), 44-50. [87] S. Suri, A linear time algorithm for minimum link paths inside a simple polygon, Comput. Vision Graph. Image Process. 35 (1986), 99-110. [88] J. Sprinzak and M. Werman, Affine point matching. Pattern Recogn. Lett. 15 (1994), 337-339. [89] K. Varadarajan, Approximating monotone polygonal curves using the unfirm metric, Proc. 12th ACM Symp. Computational Geometry (1996). [90] E. Welzl and B. Wolfers, Surface reconstruction between simple polygons via angle criteria, J. Symbolic Comput. 17 (1994), 351-369. This Page Intentionally Left Blank CHAPTER 4 Deterministic Parallel Computational Geometry Mikhail J. Atallah* Department of Computer Sciences, Purdue University, West Lafayette, IN 47907, USA E-mail: [email protected] Danny Z. Chen^ Department of Computer Science and Engineering, University of Notre Dame, Notre Dame, IN 46556, USA E-mail: [email protected] Contents 1. Introduction 2. PRAM models 3. Basic subproblems 3.1. Sorting and merging 3.2. Parallel prefix 3.3. List ranking 3.4. Tree contraction 3.5. Brent's theorem 3.6. Euler tour technique 3.7. Lowest common ancestors (LCA) 4. Inherently sequential geometric problems 4.1. Plane-sweep triangulation 4.2. Weighted planar partitioning 4.3. Visibility layers 4.4. Open problems 5. Parallel divide and conquer 5.1. Two-way divide and conquer 5.2. "Rootish" divide and conquer 5.3. Example: visibility in a polygon 6. Cascading 6.1. A rough sketch of cascading 6.2. Cascading merge sort 157 157 159 160 160 160 160 161 161 162 163 163 163 163 164 164 164 165 165 168 168 169 * Portions of the work of this author were supported by the National Science Foundation under Grant CCR9202807, and by sponsors of the COAST Laboratory. ^The work of this author was supported in part by the National Science Foundation under Grant CCR-9623585. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved 155 156 M.J. Atallah and D.Z. Chen 7. Fractional cascading in parallel 8. Cascading with labeling functions 8.1. The 3-dimensional maxima problem 8.2. The two-set dominance counting problem 8.3. Other applications of cascading 9. Cascading without concurrent reads 10. Matrix searching techniques 10.1. Row minima 10.2. Tube minima 10.3. Generalized monotone matrices 11. Other useful PRAM techniques 11.1. Geometric hierarchies 11.2. From CREW to EREW 11.3. Array-of-trees 11.4. Deterministic geometric sampling 11.5. Output-sensitive algorithms 11.6. Stratified decomposition trees 11.7. Prune-and-search 12. Further remarks References 172 176 176 178 179 180 181 181 184 187 187 187 187 188 189 189 190 191 191 192 Abstract We describe general methods for designing deterministic parallel algorithms in computational geometry. We focus on techniques for shared-memory parallel machines, which we describe and illustrate with examples. We also discuss some open problems in this area. Deterministic parallel computational geometry 157 1. Introduction Many problems in computational geometry come from application areas (such as pattern recognition, computer graphics, operations research, computer-aided design, robotics, etc.) that require real-time speeds. This need for speed makes parallelism a natural candidate for helping achieve the desired performance. For many of these problems, we are already at the limits of what can be achieved through sequential computation. The traditional sequential methods can be inadequate for those applications in which speed is important and that involve a large number of geometric objects. Thus, it is important to study what kinds of speed-ups can be achieved through parallel computing. As an indication of the importance of this research direction, we note that four of the eleven problems used as benchmark problems to evaluate parallel architectures for the DARPA Architecture Workshop Benchmark Study of 1986 were computational geometry problems. In parallel computation, it is the rule rather than the exception that the known sequential techniques do not translate well into a parallel setting; this is also the case in parallel computational geometry. The difficulty is usually that these techniques use methods which either seem to be inherently sequential, or would result in inefficient parallel implementations. Thus new paradigms are needed for parallel computational geometry. The goal of this chapter is to give a detailed look at the currently most successful techniques in parallel computational geometry, while simultaneously highlighting some open problems, and discussing possible extensions to these techniques. It differs from [33] in that it gives a much more detailed coverage of the shared-memory model at the expense of the coverage of networks of processors. Since it is impossible to describe all the parallel geometric algorithms known, our focus is on general algorithmic techniques rather than on specific problems; no attempt is made to list exhaustively all of the known deterministic parallel complexity bounds for geometric problems. For more discussion of parallel geometric algorithms, the reader is referred to [15,139]. The rest of the chapter is organized as follows. Section 2 briefly reviews the PRAM parallel model and the notion of efficiency in that model. Section 3 reviews basic subproblems that tend to arise in the solutions of geometric problems on the PRAM, Section 4 is about inherently sequential (i.e. non-parallelizable) geometric problems, Section 5 discusses the parallel divide and conquer techniques. Section 6 discusses the cascading technique, Section 7 discusses parallel fractional cascading, Section 8 discusses cascading with labeling functions. Section 9 discusses cascading in the EREW model. Section 10 discusses parallel matrix searching techniques, Section 11 discusses a number of other useful PRAM techniques, and Section 12 concludes. 2. PRAM models The PRAM (Parallel Random Access Machine) has so far been the main vehicle used to study the parallel algorithmics of geometric problems, and hence it is the focus of this chapter. This section briefly reviews the PRAM model and its variants. The PRAM model of parallel computation is the shared-memory model in which the processors operate synchronously [153], as illustrated in Figure 1. A step on a PRAM 158 MJ. Atallah and D.Z. Chen Processors Shared Memory Cell 1 p, ^ Cell 2 Cell 3 P2 P3 • • • - • • • r^ Fig. 1. The PRAM model. consists of each processor reading the content of a cell in the shared memory, writing data in a cell of the shared memory, or performing a computation within its own registers. Thus all communication is done via the shared memory. There are many variants of the PRAM, differing from one another in the way read and/or write conflicts are treated. The CREW (Concurrent Read Exclusive Write) version of this model allows many processors to simultaneously read the content of a memory location, but forbids any two processors from simultaneously attempting to write in the same memory location (even if they are trying to write the same thing). The CRCW (Concurrent Read Concurrent Write) version of the PRAM differs from the CREW one in that it also allows many processors to write simultaneously in the same memory location: In any such common-write contest, only one processor succeeds, but it is not known in advance which one. (There are other versions of the CRCW PRAM but we shall not concern ourselves with these here.) The EREW PRAM is the weakest version of the PRAM: It forbids both concurrent reading and concurrent writing. The PRAM has been extensively used in theoretical studies as a vehicle for designing parallel algorithms. Although it captures important parameters of a parallel computation, the PRAM does not account for communication and synchronization (more recent variations of the model do account for these factors, but we do not discuss them since essentially no parallel geometric algorithms have yet been designed for them). The PRAM is generally considered to be a rather unrealistic model of parallel computation. However, although there are no PRAMs commercially available, algorithms designed for PRAMs can often be efficiently simulated on some of the more realistic parallel models. The PRAM enables the algorithm designer to focus on the structure of the problem itself, without being distracted by architecture-specific issues. Another advantage of the PRAM is that, if one can give strong evidence (in the sense explained in the next paragraph) that a problem has no fast parallel solution on the PRAM, then there is no point in looking for a fast solution to it on more realistic parallel models (since these are weaker than the PRAM). We now review some basic notions concerning the speed and efficiency of PRAM computations. The time x processor product of a PRAM algorithm is called its work (i.e., the total number of operations performed by that algorithm). A parallel algorithm is said to run Deterministic parallel computational geometry 159 in poly logarithmic time if its time complexity is 0(log^ n), where n is the problem size and ^ is a constant independent of n (i.e., k = 0{). A problem solvable in polylogarithmic time using a polynomial number of processors is said to be in the class NC. It is strongly believed (but not proved) that not all problems solvable in polynomial time sequentially are solvable in polylogarithmic time using a polynomial number of processors (i.e., it is believed that P ^ NC). As in the theory of NP-completeness, there is an analogous theory in parallel computation for showing that a particular problem is probably not in NC: By showing that the membership of that problem in NC would imply that P = NC. Such a proof consists of showing that each problem in P admits an NC reduction to the problem at hand (an NC reduction is a reduction that takes polylogarithmic time and uses a polynomial number of processors). Such a problem is said to be V-complete. For a more detailed discussion of the class NC and parallel complexity theory, see (for example) [189] or [156]. A proof establishing P-completeness of a problem is viewed as strong evidence that the problem is "inherently sequential". Once one has established that a geometric problem is in NC, the next step is to design a PRAM algorithm for it that runs as fast as possible, while being efficient in the sense that it uses as few processors as possible. Ideally, the parallel time complexity of the PRAM algorithm should match the parallel lower bound of the problem (assuming such a lower bound is known), and its work complexity should match the best known sequential time bound of the problem. A parallel lower bound for a geometric problem is usually established by showing that such an algorithm can be used to solve some other (perhaps non-geometric) problem having that lower bound. For example, it is well known [94] that computing the logical OR of n bits has an Q (logn) time lower bound on a CREW PRAM. This can easily be used to show that detecting whether the boundaries of two convex polygons intersect also has an Q(\ogn) time lower bound in that same model, by encoding the n bits whose OR we wish to compute in two concentric regular n-gons such that the /th bit governs the relative positions of the /th vertices of the two n-gons. Interestingly, if the word "boundaries" is removed from the previous sentence then the lower bound argument falls apart and it becomes possible to solve the problem in constant time on a CREW PRAM, even using a sublinear number of processors [43,224]. Before reviewing the techniques that have resulted in many PRAM geometric algorithms that are fast and efficient in the above sense, a word of caution is in order. From a theoretical point of view, the class NC and the requirement that a "fast" parallel algorithm should run in polylogarithmic time, are eminently reasonable. But from a more practical point of view, not having a polylogarithmic time algorithm does not entirely doom a problem to being "non-parallelizable". One can indeed argue [221] that, e.g., a problem of sequential complexity G){n) that is solvable in 0{^) time by using ^ processors is "parallelizable" in a very real sense, even if no polylogarithmic time algorithm is known for it.

3. Basic subproblems This section reviews some basic subproblems that tend to be used as subroutines in the design of PRAM geometric algorithms.

160

M.J. Atallah and D.Z. Chen

3.1. Sorting and merging Sorting is probably the most frequently used subroutine in parallel geometric algorithms. Fortunately, for PRAM models we know how to sort n numbers optimally: 0(log«) time and n processors on the EREW PRAM [87,12]. Merging on the PRAM is easier than sorting [211,222,54,147]; on the CREW PRAM it is O(loglogn) time with n/\og\ogn processors, and O(logn) time with n/\ogn processors on the EREW PRAM.

3.2. Parallel prefix Given an array A of n elements and an associative operation denoted by +, the parallel prefix problem is that of computing an array Bofn elements such that B(i) = J2k=i Mk)Parallel prefix can be performed in O(logn) time and n/\ogn processors on an EREW PRAM [159,164], 0(log«/loglogn) time and n\og\ogn/\ogn processors on a CRCW PRAM [92]. Computing the smallest element in array A is a special case of parallel prefix: In the CRCW model, this can be done faster than general parallel prefix — in 0(1) time with n^~^^ processors for any positive constant e or, alternatively, in O(loglogn) time with n/loglogn processors [211].

3.3. List ranking List ranking is a more general version of the parallel prefix problem: The elements are given as a linked list, i.e., we are given an array A each entry of which contains an element as well as a pointer to the entry of A containing the predecessor of that element in the linked list. The problem is to compute an array B such that B(i) is the "sum" of the first / elements in the linked list. This problem is considerably harder than parallel prefix, and most tree computations as well as many graph computations reduce, via the Euler tour technique (described below), to solving this problem. EREW PRAM algorithms that run in O(logn) time and n/ \ogn processors are known for list ranking [90,24].

3.4. Tree contraction Given a (not necessarily balanced) rooted tree 7, the problem is to reduce T to a 3-node tree by a sequence of rake operations. A rake operation can be applied at a leaf v by removing V and the parent of v, and making the sibling of i; a child of f's grandparent (note that rake cannot be applied at a leaf whose parent is the root). This is done as follows: Number the leaves 1,2,..., etc., in left to right order, and apply the rake operation first to all the odd-numbered leaves that are left children, then to the other odd-numbered leaves. Renumber the remaining leaves and repeat this operation, until done. The number of iterations performed by such an algorithm is logarithmic because the number of leaves is reduced by half at each iteration. Note that applying the rake to all the odd-numbered leaves at the same time would not work, as can be seen by considering the situation where

Deterministic parallel computational

geometry

161

Fig. 2. The Euler tour of a tree T.

V is an odd-numbered left child, w is an odd-numbered right child, and the parent of v is the grandparent of w (what goes wrong in that case is that i; wants to remove its parent p and simultaneously w wants its sibling to become child of p). Tree contraction is an abstraction of many other problems, including that of evaluating an arithmetic expression tree [175]. Many elegant optimal EREW PRAM algorithms for it are known [1,90,128, 158], running in 0(logn) time with n/logn processors.

3.5. Brent's theorem This technique is frequently used to reduce the processor complexity of an algorithm without any increase in the time complexity. THEOREM 3.1 (Brent). Any synchronous parallel algorithm taking time T that consists of a total ofW operations can be simulated by P processors in time 0{{W/P) + T).

There are actually two qualifications to the above Brent's theorem [60] before one can apply it to a PRAM: (i) At the beginning of the /-th parallel step, we must be able to compute the amount of work Wt done by that step, in time 0{Wi/P) and with P processors, and (ii) we must know how to assign each processor to its task. Both (i) and (ii) are generally (but not always) easily satisfied in parallel geometric algorithms, so that the hard part is usually achieving W operations in time T.

3.6. Euler tour technique "Wrapping a chain" around a tree defines an Euler tour of that tree. More formally, if T is an undirected tree, the Euler tour of T is obtained in parallel by doing the following for every node vofT\ Letting WQ,W\, .. .,Wk-\ be the nodes of T adjacent to f, in the order in which they appear in the adjacency list of i;, we set the successor of each (directed)

162

MJ. Atallah and D.Z. Chen

edge {wi, v) equal to the (directed) edge (u, u;(/+i)mod k)- See Figure 2 for an illustration. Most tree computations as well as many graph computations reduce, via the Euler tour technique, to the list ranking problem [216], as the following examples demonstrate. 1. Rooting an undirected tree at a designated node i;: Create the Euler tour of the tree, "open" the tour at v (thus making the tour an Euler path), then do a parallel prefix along the linked list of arcs described by the successor function (with a weight of 1 for each arc). For each undirected edge [x,y] of the tree, if the prefix sum of the directed edge {x,y)m the Euler tour is less than that of the directed edge (y, x), then set X to be the parent of y. This parallel computation of parents makes the tree rooted at V. 2. Computing post-order numbers of a rooted tree, where the left-to-right ordering of the children of a vertex is the one implied by the Euler path: Do a list ranking on the Euler path, where each directed edge (jc, j ) of the Euler path has a weight of unity if y is the parent of x, and a weight of zero if x is the parent of y. 3. Computing the depth of each node of a rooted tree: Do a list ranking on the Euler path, where each directed edge {x,y) of the Euler path has a weight of — 1 if y is the parent of x, and a weight of -hi if JC is the parent ofy. 4. Numbering of descendants of each node: Same computation as for post-order numbers, followed by making use of the observation that the number of descendants of i; equals the fist rank of (f, parent(i;)) minus that of (parent(i;), i;). These examples of reductions of so many problems to list ranking demonstrate the importance of the list ranking problem. See [216,153] for other examples, and for more details about the above reductions.

3.7. Lowest common ancestors (LCA) The problem is to preprocess a rooted tree T so that a lowest common ancestor (LCA) query of any two nodes x,y of T can be answered in constant time by one processor. The preprocessing is to be done in logarithmic time and n/\ogn EREW PRAM processors. The problem is easy when T is a simple path (list ranking does the job), or when it is a complete binary tree (it is then solved by comparing the binary representations of the inorder numbers of x and y, specifically finding the leftmost bit where they disagree). For a general tree, the problem is reduced to that of the range minima: Create an Euler tour of the tree, where each node v knows its first and last appearance on that tour as well as its depth (i.e., the distance from the root) in the tree. This reduces the problem of answering an LCA query to determining, in constant sequential time, the smallest entry in between two given indices /, j in an array. This last problem is called the range-minima problem. The book [153] contains more details on the reduction of LCA to range minima, a solution to range minima, and references to the relevant literature for this problem. The above list of basic subproblems is not exhaustive in that (i) many techniques that are basic for general combinatorial problems were omitted (we have focused only on those most relevant to geometric problems rather than to general combinatorial problems), and (ii) among the techniques applicable to geometric problems, we have postponed covering the more specialized ones.

Deterministic parallel computational geometry

163

4. Inherently sequential geometric problems Most of the problems shown to be P-complete to date are not geometric (most are graph or algebra problems). This is no accident: Geometric problems in the plane tend to have enough structures to enable membership in NC. Even the otherwise P-complete problem of linear programming [119,120] is in NC when restricted to the plane. In the rest of this section, we mention the (very few) planar geometric problems that are known to be P-complete, and also a problem that is conjectured to be P-complete. Several of the problems known to be P-complete involve a collection of line segments in the plane. The P-completeness proofs of the three problems in the following subsections were given in [28]; for the third problem see also [149]. The proofs consist of giving NC reductions from the monotone circuit value problem and planar circuit value problem, which are known to be P-complete [129,160,181]. These reductions typically involve the use of geometry to simulate a circuit, by utilizing the relative positions of objects in the plane. 4.1. Plane-sweep triangulation One is given a simple n-vertex polygon P (which may contain holes) and asked to produce the triangulation that would be constructed by the following sequential algorithm: Sweep the plane from left to right with a vertical line L, such that each time L encounters a vertex f of P one draws all diagonals of P from v that do not cross previously drawn diagonals. This problem is a special case of the well-known polygon triangulation problem (see [124, 193]), and it clearly has a polynomial time sequential solution. 4.2. Weighted planar partitioning Suppose one is given a collection of n non-intersecting line segments in the plane, such that each segment s is given a distinct weight w{s), and asked to construct the partitioning of the plane produced by extending the segments in the sorted order of their weights. The extension of a segment "stops" at the first segment (or segment extension) that is "hit" by the extension. This problem has applications to "art gallery problems" [98,186], and is P-complete even if there are only 3 possible orientations for the line segments. It is straightforward to solve it sequentially in O(nlog^n) time (by using the dynamic point-location data structure of [194]), and in 0(n \ogn) time by a more sophisticated method [98]. 4.3. Visibility layers One is given a collection of n non-intersecting line segments in the plane, and asked to label each segment by its "depth" in terms of the following layering process (which starts with / = 0 ) : Find the segments that are (partially) visible from point (0, +oo), label each such segment as being at depth /, remove each such segment, increment /, and repeat until no segments are left. This is an example of a class of problems in computational geometry known as layering problems or onion peeling problems [63,165,187], and is P-complete even if all the segments are horizontal.

164

M.J. Atallah and D.Z. Chen

*:' I *

Fig. 3. The convex layers of a point set in the plane.

4.4. Open problems Perhaps the most famous open problem in the area of geometric P-completeness is that of the convex layers problem [63]: Given n points in the plane, mark the points on the convex hull of the n points as being layer zero, then remove layer zero and repeat the process, generating layers 1,2,..., etc. See Figure 3 for an example. Some recent work has shown that a generalization of the convex layers problem, called multi-list ranking [114], is indeed P-complete. Although the results in [114] shed some light on the convex layers problem, the P-completeness of the convex layers problem remains open. In view of the P-completeness of the above-mentioned visibility layers problem, it seems reasonable to conjecture that the convex layers problem is also P-complete; however not all layering problems are P-complete. For example, the layers of maxima problem (defined analogously to convex layers but with the words "maximal elements" playing the role of "convex hull") is easily shown to be in NC by a straightforward reduction to the computation of longest paths in a directed acyclic graph [31] (each input point is a vertex, and there is a directed edge from point p to point q iff both the x and y coordinates of p are ^ those of ^, respectively).

5. Parallel divide and conquer As in sequential algorithms, divide and conquer is a useful technique in parallel computation. Parallel divide and conquer comes in many flavors which we discuss next.

5.1. Two-way divide and conquer The sequential divide and conquer algorithms that have efficient PRAM implementations are those for which the "conquer" step can be done extremely fast (e.g., in constant time). Take, for example, an 0{n \ogn) time sequential algorithm that works by recursively solving two problems of size n/2 each, and then combining the answers they return in linear time. In order for a PRAM implementation of such an algorithm to run in O(logn) time with n processors, the n processors must be capable of performing the "combine" stage in constant time. For some geometric problems this is indeed possible (e.g., the convex hull

Deterministic parallel computational geometry

165

problem [43,224]). The time complexity T(n) and processor complexity P(n) of such a PRAM implementation then obey the recurrences T(n)^T(n/2)^cu P(n)^max{n,2P(n/2)}, with boundary conditions T(l) < C2 and P ( l ) = 1, where c\ and C2 are positive constants. These imply that T(n) = 0(logn) and P(n) = n. But for many problems, such an attempt at implementing a sequential algorithm fails because of the impossibility of performing the "conquer" stage in constant time. For these, the next approach often works.

5.2. ''Rootish " divide and conquer By "rootish", we mean partitioning a problem into n^/^ subproblems to be solved recursively in parallel, for some positive constant integer k (usually, k = 2). For example, instead of dividing the problem into two subproblems of size n/2 each, we divide it into (say) ^/n subproblems of size ^/n each, which we recursively solve in parallel. That the conquer stage takes O(logn) time (assuming it does) causes no harm with this subdivision scheme, since the time and processor recurrences in that case would be T(n)^T{^/n)-\-cilogn, P(n) < maxjw, ^/nP(^^/n)], with boundary conditions T(l) ^C2 and P ( l ) = 1, where ci and C2 are positive constants. These imply that T(n) = O(logn) and P(n) = n. The problems that can be solved using rootish divide and conquer scheme include the convex hull of points [4,42,131], the visibility of non-intersecting planar segments from a point [53], the visibility of a polygonal chain from a point [36], the convex hull of a simple polygon [71], detecting various types of weak visibility of a simple polygon [69,72-74], triangulating useful classes of simple polygons [71,132], and the determination of monotonicity of a simple polygon [76]. This scheme also finds success in other computational models such as the hypercube [32,70]. The scheme is useful in various ways and forms, and sometimes with recurrences very different from the above-mentioned ones, as the next example demonstrates.

5.3. Example: visibility in a polygon Given a source point q and a simple n-vertex polygonal chain P in the plane, this visibility problem is that of finding all the points of P that are visible from ^ if P is "opaque". We seek an algorithm that takes 0(log n) time and uses 0(n/ log n) FREW PRAM processors,

166

MJ. Atallah and D.Z. Chen

Fig. 4. The visibility chain VIS{C) of a polygonal chain C from the point q = (0, oo).

which is optimal to within a constant factor because (i) there is an obvious Q{n) sequential lower bound for the problem, and (ii) an Q(\ogn) lower bound on its EREW PRAM time complexity can be obtained by reducing to it the problem of computing the maximum of n entries, a problem with a known logarithmic time lower bound [94]. This is one instance of a problem in which one has to use a hybrid of two-way divide and conquer and rootish divide and conquer, in order to obtain the desired complexity bounds. The recursive procedure we sketch below follows [36] and takes two input parameters (one of which is the problem size) and uses either fourth-root divide and conquer or twoway divide and conquer, depending on the relative sizes of these two parameters. The role played by the geometry is central to the "combine" step (other algorithms of this kind can be found in [68,71-74,130-132] for solving many problems on polygons and point sets). We call VisChain the recursive procedure for computing the visibility chain of a simple polygonal chain from the given source point q (see Figure 4 for an example of the visibility chain VIS{C) from the point q = (0, oo)). The procedure is outlined below. Let \C\ denote the number of vertices of a polygonal chain C. The initial call to the procedure is VisChaiii(P,«, log«), where P is a simple polygonal chain and n = \P\. VisChain(C,m,J) Input: A simple polygonal chain C, m = |C|, and a positive integer d of our choice. Output: The visibility chain of C, V75(C), from the point ^. Step 1. If m ^ J, then compute VIS{C) with one processor in 0(m) time, using any of the known sequential linear-time algorithms. Step 2. \i d -dimensional convex hull of a set of points on a mesh ofprocessors, Proc. Scandinavian Workshop on Algorithms and Theory (1988), 154-162. 112] F. Dehne and I. Stojmenovic, An O(yrt) time algorithm for the ECDF searching problem for arbitrary dimensions on a mesh of processors. Inform. Process. Lett. 28 (1988), 67-70. 113] X. Deng, An optimal parallel algorithm for linear programming in the plane. Inform. Process. Lett. 35 (1990), 213-217. 114] A. Dessmark, A. Lingas and A. Maheshwari, Multi-list ranking: Complexity and applications, Theoret. Comput. Sci. 141 (1995), 337-350. 115] O. Devillers and A. Fabri, Scalable algorithms for bichromatic line segment intersection problems on coarse grained multicomputers, Intemat. J. Comput. Geom. Appl. 6 (1996), 487-506. 116] D.P. Dobkin and D.G. Kirkpatrick, Fast detection of polyhedral intersections, Theoret. Comput. Sci. 27 (1983), 241-253. 117] D.P. Dobkin and D.G. Kirkpatrick, A linear time algorithm for determining the separation of convex polyhedra, J. Algorithms 6 (1985), 381-392. 118] D.P. Dobkin and D.G. Kirkpatrick, Determining the separation of preprocessed polyhedra — a unified approach, Proc. of the Int. CoUoq. on Automata, Lang, and Programming (1990), 154—165. 119] D.P. Dobkin, R.J. Lipton and S. Reiss, Linear programming is log-space hard for P, Inform. Process. Lett. 9 (1979), 96-97. 120] D.P Dobkin and S. Reiss, The complexity of linear programming, Theoret. Comput. Sci. 11 (1980), 1-18. 121] J.R. DriscoU, N. Samak, D.D. Sleator and R.E. Tarjan, Making data structures persistent, Proc. 18th Annual ACM Symp. on Theory of Computing (1986), 109-121.

Deterministic parallel computational

geometry

197

[122] M.E. Dyer, Linear time algorithms for two- and three-variable linear programs, SIAM J. Comput. 13 (1984), 3 1 ^ 5 . [123] M.E. Dyer, A parallel algorithm for linear programming infixed dimension, Proc. 11th Annual Symp. on Computational Geometry (1995), 345-349. [124] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag, New York (1987). [125] H. ElGindy and M.T. Goodrich, Parallel algorithms for shortest path problems in polygons. The Visual Computer 3 (1988), 371-378. [126] G.N. Frederickson and D.B. Johnson, The complexity of selection and ranking in X -{-Y and matrices with sorted columns, J. Comput. System Sci. 24 (1982), 197-208. [127] M. Ghouse and M.T. Goodrich, Fast randomized parallel methods for planar convex hull construction, Comput. Geom.: Theory and Applications, to appear. [128] A. Gibbons and W. Rytter, An optimal parallel algorithm for dynamic expression evaluation and its applications, Proc. Symp. on Found, of Software Technology and Theoretical Comp. Sci., Springer-Verlag (1986), 453^69. [129] L.M. Goldschlager, The monotone and planar circuit value problems are log space complete for P, SIGACT News 9 (1977), 25-29. [ 130] M.T. Goodrich, Efficient parallel techniques for computational geometry, PhD thesis. Department of Computer Sciences, Purdue University (1987). [131] M.T. Goodrich, Finding the convex hull of a sorted point set in parallel. Inform. Process. Lett. 26 (1987), 173-179. [132] M.T. Goodrich, Triangulating a polygon in parallel, J. Algorithms 10 (1989), 327-351. [133] M.T. Goodrich, Intersecting line segments in parallel with an output-sensitive number ofprocessors, SIAM J. Comput. 20 (1991), 737-755. [134] M.T. Goodrich, Using approximation algorithms to design parallel algorithms that may ignore processor allocation, Proc. 32nd IEEE Symp. on Foundations of Computer Science (1991), 711-722. [135] M.T. Goodrich, Constructing arrangements optimally in parallel. Discrete Comput. Geom. 9 (1993), 371385. [136] M.T. Goodrich, Geometric partitioning made easier, even in parallel, Proc. 9th Annual ACM Symp. Computational Geometry (1993), 73-82. [137] M.T. Goodrich, Planar separators and parallel polygon triangulation, J. Comput. System Sci. 51 (1995), 374-389. [138] M.T. Goodrich, Fixed-dimensional parallel linear programming via relative Epsilon-approximations, Proc. 7th Annual ACM-SIAM Symp. Discrete Algorithms (1996), 132-141. [139] M.T. Goodrich, Parallel computational geometry, CRC Handbook of Discrete and Computational Geometry, I.E. Goodman and J. O'Rourke, eds, CRC Press, Inc. (1997), 669-682. [140] M.T. Goodrich, M. Ghouse and J. Bright, Sweep methods for parallel computational geometry, Algorithmica 15, 126-153. [141] M.T. Goodrich, C. O'Dunlaing and C. Yap, Computing the Voronoi diagram of a set of line segments in parallel, Algorithmica 9 (1993), 128-141. [142] M.T. Goodrich and E.A. Ramos, Bounded-independence derandomization of geometric partitioning with applications to parallel fixed-dimensional linear programming. Discrete Comput. Geom., to appear. [143] M.T. Goodrich, S.B. Shauck and S. Guha, Parallel method for visibility and shortest path problems in simple polygons, Algorithmica 8 (1992), 461^86. [144] S. Guha, Parallel computation of internal and external farthest neighbours in simple polygons, Intemat. J. Comput. Geom. Appl. 2 (1992), 175-190. [145] S. Guha, Optimal mesh computer algorithms for simple polygons, Proc. 7th International Parallel Processing Symp., Newport Beach, California (April 1993), 182-187. [146] N. Gupta and S. Sen, Faster output-sensitive parallel convex hulls for d ^3: Optimal sublogarithmic algorithms for small outputs, Proc. 12th Annual ACM Symp. Computational Geometry (1996), 176-185. [147] T. Hagerup and C. Riib, Optimal merging and sorting on the EREW-PRAM, Inform. Process. Lett. 33 (1989), 181-185. [148] D. Haussler and E. Welzl, Epsilon-nets and simplex range queries. Discrete Comput. Geom. 2 (1987), 127-151.

198

M.J. Atallah and D.Z. Chen

[149] J. Hershberger, Upper envelope onion peeling, Proc. 2nd Scandinavian Workshop on Algorithm Theory, Springer-Verlag (1990), 368-379. [150] J. Hershberger, Optimal parallel algorithms for triangulated simple polygons, Proc. 8th Annual ACM Symp. Computational Geometry (1992), 3 3 ^ 2 . [151] J.A. Holey and O.H. Ibarra, Triangulation in a plane and 3-d convex hull on mesh-connected arrays and hypercubes. Tech. Rep., University of Minnesota, Dept. of Computer Science (1990). [152] J.-W. Hong and H.T. Kung, I/O complexity: The red-blue pebble game, Proc. 13th Annual ACM Symp. on Theory of Computing (1981), 326-333. [153] J. Jaja, An Introduction to Parallel Algorithms, Addison-Wesley, Reading, MA (1992). [154] C.S. Jeong and D.T. Lee, Parallel geometric algorithms for a mesh-connected computer, Algorithmica 5 (1990), 155-177. [155] S.L. Johnsson, Combining parallel and sequential sorting on a Boolean n-cube, Proc. International Conf. on Parallel Processing (1984), 444-448. [156] R.M. Karp and V. Ramachandran, Parallel algorithms for shared-memory machines. Handbook of Theoretical Computer Science, J. van Leeuwen, ed.. Vol. 1, Elsevier Science Publishers (1990). [157] D.G. Kirkpatrick, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1983), 28-35. [158] S.R. Kosaraju and A. Delcher, Optimal parallel evaluation of tree-structured computations by raking. Lecture Notes in Comput. Sci. 319: VLSI Algorithms and Architectures, 3rd Aegean Workshop on Computing, Springer-Verlag (1988), 101-110. [159] C.R Kruskal, L. Rudolph and M. Snir, The power of parallel prefix, IEEE Trans. Comput. C-34 (1985), 965-968. [160] C.R Kruskal, L. Rudolph and M. Snir, A complexity theory of efficient parallel algorithms. Lecture Notes in Comput. Sci. 317, Proc. 15th Coll. on Autom., Lang, and Prog., Springer-Verlag (1988), 333-346. [161] V. Kumar and V. Sinch, Scalability ofparallel algorithms for the all-pairs shortest-path problem, J. Parallel Distribut. Comput. 13 (1991), 124-138. [162] M. Kunde, Optimal sorting on multidimensional mesh-connected computers, Proc. 4th Symp. on Theoretical Aspects of Computer Science, Lecture Notes in Comput. Sci., Springer (1987), 408^19. [163] H.T. Kung, F. Luccio and F.P. Preparata, On finding the maxima of a set of vectors, J. ACM 22(4) (1975), 469^76. [164] R.E. Ladner and M.J. Fischer, Parallel prefix computation, J. ACM 27 (1980), 831-838. [165] D.T. Lee and F.P. Preparata, Computational geometry — a survey, IEEE Trans. Comput. C-33 (1984), 872-1101. [166] D.T. Lee, F.P. Preparata, C.S. Jeong and A.L. Chow, SIMD parallel convex hull algorithms. Tech. Rep. AC-91-02, Northwestern University, Dept. of Electrical Eng. and Computer Science (1991). [167] F.T. Leighton, An Introduction to Parallel Algorithms and Architectures: Arrays, Trees, Hypercubes, Morgan Kaufmann Publishers, San Mateo, CA (1992). [168] C. Levcopoulos, J. Katajainen and A. Lingas, An optimal expected time algorithm for Voronoi diagrams, Proc. 1st Scandinavian Workshop on Algorithm Theory, Springer-Verlag (1988). [169] Z. Li and V. Milenkovic, Constructing strongly convex hulls using exact or rounded arithmetic, Algorithmica 8 (1992), 345-364. [170] A. Lingas, A. Maheshwari and J.-R. Sack, Optimal parallel algorithms for rectilinear link distance problems, Algorithmica 14 (1995), 261-289. [171] P.D. MacKenzie and Q. Stout, Asymptotically efficient hypercube algorithms for computational geometry, Proc. 3rd Symp. on the Frontiers of Massively Parallel Computation (1990), 8-11. [ 172] J.M. Marberg and E. Gafni, Sorting in constant number of row and column phases on a mesh, Proc. 24th Annual AUerton Conf. on Communication, Control and Computing, Monticello, Illinois (1986), 603-612. [173] J. Matousek, Epsilon-nets and computational geometry. New Trends in Discrete and Computational Geometry, J. Pach, ed., Algorithms and Combinatorics, Vol. 10, Springer-Verlag (1993), 69-89. [174] N. Megiddo, Linear time algorithms for linear programming in R^ and related problems, SIAM J. Comput. 12 (1983), 759-776. [175] G.L. Miller and J.H. Reif, Parallel tree contraction and its applications, Proc. 26th IEEE Symp. on Foundations of Comp. Sci. (1985), 478-489. [176] R. Miller and S.E. Miller, Convexity algorithms for digitized pictures on an Intel iPSC hypercube. Supercomputer J. 31 (VI-3) (1989), 45-53.

Deterministic parallel computational

geometry

199

[ 177] R. Miller and Q.F. Stout, Geometric algorithms for digitized pictures on a mesh-connected computer, IEEE Trans. PAMI 7 (1985), 216-228. [178] R. Miller and Q.F. Stout, Efficient parallel convex hull algorithms, IEEE Trans. Comput. C-37 (1988), 1605-1618. [179] R. Miller and Q.F. Stout, Mesh computer algorithms for computational geometry, IEEE Trans. Comput. C-38 (1989), 321-340. [180] R. Miller and Q.F. Stout, Parallel Algorithms for Regular Architectures, The MIT Press, Cambridge, Massachusetts (1991). [181] S. Miyano, S. Shiraishi and T. Shoudai, A list of P-complete problems. Technical Report RIFIS-TR-CS-17, Kyushu University (1989). [ 182] R. Motwani, J. Naor and M. Naor, The probabilistic method yields deterministic parallel algorithms, Proc. 30th Annual IEEE Symp. Found. Comput. Sci. (1989), 8-13. [183] H. Mueller, Sorting numbers using limited systolic coprocessors. Inform. Process. Lett. 24 (1987), 351354. [184] K. Mulmuley, Computational Geometry: An Introduction through Randomized Algorithms, Prentice-Hall, New Jersey (1994). [185] D. Nassimi and S. Sahni, Data broadcasting in SIMD computers, IEEE Trans. Comput. 30 (1981), 101106. [186] J. O'Rourke, Art Gallery Theorems and Algorithms, Oxford University Press (1987). [187] J. O'Rourke, Computational geometry, Ann. Rev. Comp. Sci. 3 (1988), 389-411. [188] J. O'Rourke, Computational Geometry in C, Cambridge University Press (1993). [189] I. Parberry, Parallel Complexity Theory, Pitman, London (1987). [190] W. Paul, U. Vishkin and H. Wagener, Parallel dictionaries on 2-3 trees, Proc. 10th Coll. on Autom., Lang. and Prog., Lecture Notes in Comput. Sci. 154, Springer, Berlin (1983), 597-609. [191] CO. Plaxton, Load balance, selection and sorting on the hypercube, Proc. 1st Annual ACM Symp. on Parallel Algorithms and Architectures (1989), 64-73. [192] C.G. Plaxton, On the network complexity of selection, Proc. 30th Annual IEEE Symp. on Foundations of Computer Science (1989), 396-401. [193] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag (1985). [194] F.P. Preparata and R. Tamassia, Fully dynamic techniques for point location and transitive closure in planar structures, Proc. 29th IEEE Symp. on Foundations of Computer Science (1988), 558-567. [195] R. Raman and U. Vishkin, Optimal parallel algorithms for totally monotone matrix searching, Proc. 5th Annual ACM-SIAM Symp. on Discrete Algorithms (1994), 613-621. [196] E.A. Ramos, Construction ofl-d lower envelopes and applications, Proc. 13th Annual ACM Symp. Computational Geometry (1997), 57-66. [197] J.H. Reif and S. Sen, Optimal randomized parallel algorithms for computational geometry, Algorithmica 7(1992), 91-117. [198] J.H. Reif and S. Sen, Polling: A new random sampling technique for computational geometry, SIAM J. Comput. 21 (1992), 466-485. [199] J.H. Reif and S. Sen, Randomized algorithms for binary search and load balancing on fixed connection networks with geometric applications, SIAM J. Comput. 23 (1994), 633-651. [200] J.H. Reif and Q.F. Stout, Manuscript. [201] J.H. Reif and L. Valiant, A logarithmic time sort for linear size networks, J. ACM 34 (1987), 60-76. [202] C. Riib, Line-segment intersection reporting in parallel, Algorithmica 8 (1992), 119-144. [203] K.W. Ryu and J. Jaja, Efficient algorithms for list ranking andfor solving graph problems on the hypercube, IEEE Trans. Parallel and Distributed Systems 1 (1990), 83-90. [204] S. Sairam, R. Tamassia and J.S. Vitter, An efficient parallel algorithm for shortest paths in planar layered digraphs, Algorithmica 14 (1995), 322-339. [205] J.L.C. Sanz and R. Cypher, Data reduction and fast routing: A strategy for efficient algorithms for message-passing parallel computers, Algorithmica 7 (1992), 77-89. [206] B. Schieber, Computing a minimum-weight k-link path in graphs with the concave Monge property, Proc. 6th Annual ACM-SIAM Symp. on Discrete Algorithms (1995), 405-411. [207] C.P. Schnorr and A. Shamir, An optimal sorting algorithm for mesh-connected computers, Proc. 18th ACM Symp. on Theory on Computing (1986), 255-261.

200

MJ. Atallah and D.Z. Chen

[208] S. Sen, A deterministic Poly (log log «) time optimal CRCW PRAM algorithm for linear programming in fixed dimension. Technical Report 95-08, Dept. of Computer Science, University of Newcastle (1995). [209] S. Sen, Parallel multidimensional search using approximation algorithms: With applications to linearprogramming and related problems, Proc. 8th ACM Symp. Parallel Algorithms and Architectures (1996), 251-260. [210] M. Sharir and P.K. Agarwal, Davenport-Schinzel Sequences and Their Geometric Applications, Cambridge University Press, New York (1995). [211] Y. Shiloach and U. Vishkin, Finding the maximum, merging, and sorting in a parallel computation model, J. Algorithms 2 (1981), 88-102. [212] I. Stojmenovic, Manuscript (1988). [213] Q.F. Stout, Constant-time geometry on PRAMs, Proc. 1988 Int'l. Conf. on Parallel Computing, Vol. HI, IEEE, 104-107. [214] R. Tamassia and J.S. Vitter, Parallel transitive closure and point location in planar structures, SIAM J. Comput. 20 (1991), 708-725. [215] R. Tamassia and J.S. Vitter, Optimal cooperative search in fractional cascaded data structures, Algorithmica 15 (1996), 154-171. [216] R.E. Tarjan and U. Vishkin, Finding biconnected components and computing tree functions in logarithmic parallel time, SIAM J. Comput. 14 (1985), 862-874. [217] CD. Thompson and H.T. Kung, Sorting on a mesh-connected parallel computer, Comm. ACM 20 (1977), 263-271. [218] G.T. Toussaint, Solving geometric problems with rotating calipers, Proc. IEEE MELECON '83, Athens, Greece (May 1983). [219] J.-J. Tsay, Optimal medium-grained parallel algorithms for geometric problems. Technical Report 942, Dept. of Computer Sciences, Purdue University (1990). [220] J.-J. Tsay, Parallel algorithms for geometric problems on networks ofprocessors, Proc. 5th IEEE Symp. on Parallel and Distributed Processing, Dallas, Texas (Dec. 1993), 200-207. [221] P. Vaidya, Personal communication. [222] L. Valiant, Parallelism in comparison problems, SIAM J. Comput. 4 (1975), 348-355. [223] V.N. Vapnik and A.Y. Chervonenkis, On the uniform convergence of relative frequencies of events to their probabilities. Theory Probab. Appl. 16 (1971), 264-280. [224] H. Wagener, Optimally parallel algorithms for convex hull determination. Manuscript (1985). [225] H. Wagener, Optimal parallel hull construction for simple polygons in 0(log log^i) time, Proc. 33rd Annual IEEE Sympos. Found. Comput. Sci. (1992), 593-599. [226] D.E. Willard and Y.C. Wee, Quasi-valid range querying and its implications for nearest neighbor problems, Proc. 4th Annual ACM Symp. on Computational Geometry (1988), 34-43. [227] C.K. Yap, Parallel triangulation of a polygon in two calls to the trapezoidal map, Algorithmica 3 (1988), 279-288.

CHAPTER 5

Voronoi Diagrams^ Franz Aurenhammer Institutfiir Grundlagen der Informationsverarbeitung, Technische Universitdt Graz, Klosterwiesgasse 32/2, A-8010 Graz, Austria

Rolf Klein Praktische Informatik VI, Fern Universitdt Hagen, Informatikzentrum, D-58084 Hagen, Germany

Contents 1. Introduction 2. Definitions and elementary properties 3. Algorithms 3.1. A lower bound 3.2. Incremental construction 3.3. Divide & conquer 3.4. Sweep 3.5. Lifting to 3-space 4. Generalizations and structural properties 4.1. Characterization of Voronoi diagrams 4.2. Optimization properties of Delaunay triangulations 4.3. Higher dimensions, power diagrams, and order-A: diagrams 4.4. Generalized sites 4.5. Generalized spaces and distances 4.6. General Voronoi diagrams 5. Geometric applications 5.1. Distance problems 5.2. Subgraphs of Delaunay triangulations 5.3. Geometric clustering 5.4. Motion planning 6. Concluding remarks and open problems References

* Partially supported by the Deutsche Forschungsgemeinschaft, grant Kl 655 2-2. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V All rights reserved

201

203 204 209 209 211 215 217 220 221 221 225 229 239 248 260 264 264 270 275 278 280 281

Voronoi diagrams

203

1. Introduction The topic of this chapter, Voronoi diagrams, differs from other areas of computational geometry, in that its origin dates back to the 17th century. In his book on the principles of philosophy [87], R. Descartes claims that the solar system consists of vortices. His illustrations show a decomposition of space into convex regions, each consisting of matter revolving round one of the fixed stars; see Figure 1. Even though Descartes has not explicitly defined the extension of these regions, the underlying idea seems to be the following. Let a space M, and a set S of sites p in M he given, together with a notion of the influence a site p exerts on a point x of M. Then the region of p consists of all points x for which the influence of p is the strongest, over all seS. This concept has independently emerged, and proven useful, in various fields of science. Different names particular to the respective field have been used, such as medial axis transform in biology and physiology, WignerSeitz zones in chemistry and physics, domains of action in crystallography, and Thiessen polygons in meteorology and geography. The mathematicians Dirichlet [95] and Voronoi [253,252] were the first to formally introduce this concept. They used it for the study of quadratic forms; here the sites are integer lattice points, and influence is measured by the Euclidean distance. The resulting structure has been called Dirichlet tessellation or Voronoi diagram, which has become its standard name today. Voronoi [253] was the first to consider the dual of this structure, where any two point sites are connected whose regions have a boundary in common. Later, Delaunay [86] obtained the same by defining that two point sites are connected iff (i.e. if and only if) they lie on a circle whose interior contains no point of S. After him, the dual of the Voronoi diagram has been denoted Delaunay tessellation or Delaunay triangulation. Besides its applications in other fields of science, the Voronoi diagram and its dual can be used for solving numerous, and surprisingly different, geometric problems. Moreover, these structures are very appealing, and a lot of research has been devoted to their study (about one out of 16 papers in computational geometry), ever since Shamos and Hoey [232] introduced them to the field. The reader interested in a complete overview over the existing literature should consult the book by Okabe et al. [210] who list more than 600 papers, and the surveys by Aurenhammer [27], Bemal [39], and Fortune [124]. Also, Chapters 5 and 6 of Preparata and Shamos [215] and Chapter 13 of Edelsbrunner [104] could be consulted. Within one chapter, we cannot review all known results and applications. Instead, we are trying to highlight the intrinsic potential of Voronoi diagrams, that lies in its structural properties, in the existence of efficient algorithms for its construction, and in its adaptability. We start in Section 2 with a simple case: the Voronoi diagram and the Delaunay triangulation of n points in the plane, under the Euclidean distance. We state elementary structural properties that follow directly from the definitions. Further properties will be revealed in Section 3, where different algorithmic schemes for computing these structures are presented. In Section 4 we complete our presentation of the classical two-dimensional case, and turn to generalizations. Next, in Section 5, important geometric applications of the Voronoi diagram and the Delaunay triangulation are discussed. The reader who is mainly

204

F. Aurenhammer

and R. Klein

Fig. 1. Descartes' decomposition of space into vortices.

interested in these applications can proceed directly to Section 5, after reading Section 2. Finally, Section 6 concludes the chapter and mentions some open problems.

2. Definitions and elementary properties Throughout this section we denote by 5 a set of w ^ 3 point sites /?, ^, r , . . . in the plane. For points p = (pi, p2) and x = (x\,X2) let d(p,x) = ^J{p\ — x\)'^ -\- {p2 — xi)^ denote their Euclidean distance. By ~pq we denote the line segment from p to q. The closure of a set A will be denoted by A. DEFINITION 2.1. For p,q

eSlei

B(p,q) = {x \d(p,x)

= d(q,x)]

Voronoi diagrams

205

be the bisector of p and q. B{p,q) is the perpendicular Une through the center of the Hne segment ~pq. It separates the halfplane D{p, q) = i^x\ d(p, x) < d(q, x)] containing p from the halfplane D(q, p) containing q. We call

YR(p,S)=

P I D(p,q) qeS,q^p

the Voronoi region of p with respect to S. Finally, the Voronoi diagram of S is defined by V{S)=

U

VR(/7,5)nVR(^,5).

p,q^S,p^q

By definition, each Voronoi region VR(/^, S) is the intersection of n — 1 open halfplanes containing the site p. Therefore, VR(/7, S) is open and convex. Different Voronoi regions are disjoint. The common boundary of two Voronoi regions belongs to V{S) and is called a Voronoi edge, if it contains more than one point. If the Voronoi edge e borders the regions of p and q then e C B{p, q) holds. Endpoints of Voronoi edges are called Voronoi vertices', they belong to the common boundary of three or more Voronoi regions. There is an intuitive way of looking at the Voronoi diagram V{S). Let x be an arbitrary point in the plane. We center a circle, C, at x and let its radius grow, from 0 on. At some stage the expanding circle will, for the first time, hit one or more sites of S. Now there are three different cases. LEMMA 2.L If the circle C expanding from x hits exactly one site, p, then x belongs to VR(/7, S).IfC hits exactly two sites, p and q, then x is an interior point of a Voronoi edge separating the regions of p and q. If C hits three or more sites simultaneously, then x is a Voronoi vertex adjacent to those regions whose sites have been hit. PROOF. If only site p is hit then p is the unique element of S closest to x. Consequently, X e Dip, r) holds for each site r e S with r ^ p.lfC hits exactly p and q, then x is contained in each halfplane D(p,r), D(q,r), where r ^ {p,q}, and in B(p,q), the common boundary of D(p, q) and D{q, p). By Definition 2.1, x belongs to the closure of the regions of both p and q, but of no other site in 5. In the third case, the argument is analogous.

n This lemma shows that the Voronoi regions form a decomposition of the plane; see Figure 2. Conversely, if we imagine n circles expanding from the sites at the same speed, the fate of each point x of the plane is determined by those sites whose circles reach x first. This "expanding waves" view has been systematically used by Chew and Drysdale [66] and Thurston [248].

206

F. Aurenhammer

and R. Klein

Fig. 2. A Voronoi diagram of 11 points in the Euclidean plane.

The Voronoi vertices are of degree at least three, by Lemma 2.1. Vertices of degree higher than three do not occur if no four point sites are cocircular. The Voronoi diagram V(S) is disconnected if all point sites are colinear; in this case it consists of parallel lines. From the Voronoi diagram of S one can easily derive the convex hull of 5, i.e. the boundary of the smallest convex set containing S. LEMMA 2.2. A point p of S lies on the convex hull of S iff its Voronoi region VR(/7, S) is unbounded.

The Voronoi region of p is unbounded iff there exists some point q e S such that V(S) contains an unbounded piece of B{p, q) as a Voronoi edge. Let x e B(p, q), and let C(x) denote the circle through p and q centered at x, as shown in Figure 3. Point x belongs to V(S) iff C(x) contains no other site. As we move x to the right along B(p, q), the part of C(x) contained in halfplane R keeps growing. If there is another site r in R,it will eventually be reached by C(JC), causing the Voronoi edge to end at x. Otherwise, all other sites of S must be contained in the closure of the left halfplane L. Then p and q both lie on the convex hull of 5. D PROOF.

Sometimes it is convenient to imagine a simple closed curve F around the "interesting" part of the Voronoi diagram, so large that it intersects only the unbounded Voronoi edges; see Figure 2. While walking along F, the vertices of the convex hull of S can be reported in cyclic order. After removing the halflines outside F, a connected embedded planar graph with n -\- I faces results. Its faces are the n Voronoi regions and the unbounded face outside F. We call this graph the finite Voronoi diagram.

207

Voronoi diagrams

L

I

R

B(p,q)

Fig. 3. As jc moves to the right, the intersection of circle C{x) with the left half plane shrinks, while C(x) H /? grows.

One virtue of the Voronoi diagram is its small size. LEMMA 2.3. The Voronoi diagram V{S) has 0(n) many edges and vertices. The average number of edges in the boundary of a Voronoi region is less than 6. PROOF. By the Euler formula (see, e.g. [129]) for planar graphs, the following relation holds for the numbers u, e, / , and c of vertices, edges, faces, and connected components.

V— e+ f =

l+c.

We apply this formula to the finite Voronoi diagram. Each vertex has at least three incident edges; by adding up we obtain e ^ 3^/2, because each edge is counted twice. Substituting this inequality together with c = 1 and f = n^l yields v^2n

—2

and

^ ^ 3 n —3.

Adding up the numbers of edges contained in the boundaries of all w + 1 faces results in 2e ^6n — 6 because each edge is again counted twice. Thus, the average number of edges in a region's boundary is bounded by {6n — 6)/(n -f 1) < 6. The same bounds apply to V{S). U Now we turn to the Delaunay tessellation. In general, a triangulation of 5 is a planar graph with vertex set S and straight line edges, which is maximal in the sense that no further straight line edge can be added without crossing other edges. Each triangulation of S contains the edges of the convex hull of S. Its bounded faces are triangles, due to maximality. Their number equals 2n — k — 2, where k denotes the size of the convex hull. We call a connected subset of edges of a triangulation a tessellation of S

208

F. Aurenhammer

and R. Klein

Fig. 4. Voronoi diagram and Delaunay tessellation.

if it contains the edges of the convex hull, and if each point of S has at least two adjacent edges. 2.2. The Delaunay tessellation DT(S) is obtained by connecting with a line segment any two points p,q of 5 for which a circle C exists that passes through p and q and does not contain any other site of S in its interior or boundary. The edges of DTC^S) are called Delaunay edges. DEFINITION

The following equivalent characterization is a direct consequence of Lemma 2.1. LEMMA 2.4. Two points of S are joined by a Delaunay edge iff their Voronoi regions are edge-adjacent.

Since each Voronoi region has at least two neighbors, at least two Delaunay edges must emanate from each point of 5. By the proof of Lemma 2.2, each edge of the convex hull of S is Delaunay. Finally, two Delaunay edges can only intersect at their endpoints, because they allow for circumcircles whose respective closures do not contain other sites. This shows that DT(5) is in fact a tessellation of S. Two Voronoi regions can share at most one Voronoi edge, by convexity. Therefore, Lemma 2.4 implies that DTC^") is the graph-theoretical dual of V(S), realized by straight hne edges. An example is depicted in Figure 4; the Voronoi diagram V(S) is drawn by solid lines, and DTC^S) by dashed lines. Note that a Voronoi vertex (like w) need not be contained in its associated face of DTC^S). The sites p,q,r,s art cocircular, giving rise to a Voronoi vertex V of degree 4. Consequently, its corresponding Delaunay face is bordered by four edges. This cannot happen if the points of S are in general position.

Voronoi diagrams

209

THEOREM 2.1. If no four points of S are cocircular then DT(^), the dual of the Voronoi diagram V{S), is a triangulation of S, called the Delaunay triangulation. Three points of S give rise to a Delaunay triangle iff their circumcircle does not contain a point of S in its interior.

3. Algorithms In this section we present several ways of computing the Voronoi diagram and its dual, the Delaunay tessellation. For simplicity, we assume of the n point sites of S that no four of them are cocircular, and that no three of them are colinear. According to Theorem 2.1 we can then refer to DT(5) as to the Delaunay triangulation. All algorithms presented herein can be made to run without the general position assumption. Also, they can be generalized to metrics other than the Euclidean, and to sites other than points. This will be discussed in Subsections 4.5 and 4.4. Data structures well suited for working with planar graphs like the Voronoi diagram are the doubly connected edge list, DCEL, by Muller and Preparata [202], and the quad edge structure by Guibas and Stolfi [136]. In either structure, a record is associated with each edge e that stores the following information: the names of the two endpoints of e; references to the edges clockwise or counterclockwise next to e about its endpoints; finally, the names of the faces to the left and to the right of e. The space requirement of both structures is 0(n). Either structure allows to efficiently traverse the edges incident to a given vertex, and the edges bounding a face. The quad edge structure offers the additional advantage of describing, at the same time, a planar graph and its dual, so that it can be used for constructing both the Voronoi diagram and the Delaunay triangulation. From the DCEL of V(S) we can derive the set of triangles constituing the Delaunay triangulation in linear time. Conversely, from the set of all Delaunay triangles the DCEL of the Voronoi diagram can be constructed in time 0(n). Therefore, each algorithm for computing one of the two structures can be used for computing the other one, within 0(n) extra time. It is convenient to store structures describing the finite Voronoi diagram, as introduced before Lemma 2.3, so that the convex hull of the point sites can be easily reported by traversing the bounding curve F; see Figure 2. 3,1. A lower bound Before constructing the Voronoi diagram we want to establish a lower bound for its computational complexity. Suppose that n real numbers x i , . . . , x^ are given. From the Voronoi diagram of the point set S = [pi = (xi ,Xi^)\l^i^n} one can derive, in linear time, the vertices of the convex hull of 5, in counterclockwise order. From the leftmost point in S on, this vertex sequence contains all points pt, sorted by increasing values of Xf; see Figure 5(i). This argument due to Shamos [231] shows that constructing the convex hull and, a fortiori, computing the Voronoi diagram, is at least as difficult as sorting n real numbers, which requires 0(n logn) time in the algebraic computation tree model.

F. Aurenhammer

210

\

Y

Fig. 5. Proving the Q(n\ogn)

and R. Klein

.Y

lower bound for constructing the Voronoi diagram (i) by transformation from sorting, and (ii) by transformation from ^-closeness.

However, a fine point is lost in this reduction. After sorting n points by their x-values, their convex hull can be computed in linear time [101], whereas sorting does not help in constructing the Voronoi diagram. The following result has been independently found by Djidjev and Lingas [96] and by Zhu and Mirzaian [262]. 3.1. It takes time Q{n\ogn) to construct the Voronoi diagram of n points Pn whose X-coordinatesare strictly increasing.

THEOREM

p\,...,

PROOF. By reduction from the e-closeness problem which is known to be in 0(nlogn). Let y\,.. .,yn be positive real numbers, and let £ > 0. The question is if there exist / / j such that \yi — yj\ < e holds. We form the sequence of points pi = (is/n, yi), 1 ^ / < n, and compute their Voronoi diagram; see Figure 5(ii). In time 0(«), we can determine the Voronoi regions that are intersected by the >^-axis, in bottom-up order (such techniques will be detailed in Subsection 3.3). If, for each /?/, its projection onto the >'-axis lies in the Voronoi region of pt then the values yi are available in sorted order, and we can easily answer the question. Otherwise, there is a point pi whose projection lies in the region of some other point pj. Because of

\yi -yj\^

d{(0, yi), Pj) < J((0, yd, pi) = ^ ^ ^,

in this case the answer is positive.

D

On the other hand, sorting n arbitrary point sites by x-coordinates is not made easier by their Voronoi diagram, as Seidel [225] has shown.

Voronoi diagrams

211

With Definition 2.1 in mind one could think of computing each Voronoi region as the intersection ofn — l halfplanes. This would take time G{n logn) per region, see [215]. In the following subsections we describe various algorithms that compute the whole Voronoi diagram within this time; due to Theorem 3.1, these algorithms are worst-case optimal. 3.2. Incremental construction A natural idea first studied by Green and Sibson [133] is to construct the Voronoi diagram by incremental insertion, i.e. to obtain V{S) from V(5 \ {p}) by inserting the site p. As the region of p can have up to n — 1 edges, for n = \S\, this leads to a runtime of 0{n^). Several authors have fine-tuned the technique of inserting Voronoi regions, and efficient and numerically robust implementations are available nowadays; see Ohya et al. [209] and Sugihara and Iri [242]. In fact, runtimes of 0{n) can be expected for well distributed sets of sites. The insertion process is, maybe, better described, and implemented in the dual environment, for the Delaunay triangulation: construct DT/ = DT({/7i,..., p / - i , p/}) by inserting the site pi into DT/_i. The advantage over a direct construction of V(S) is that Voronoi vertices that appear in intermediate diagrams but not in the final one need not be constructed and stored. We follow Guibas and Stolfi [136] and construct DT/ by exchanging edges, using Lawson's [176] original edge flipping procedure, until all edges invalidated by pi have been removed. To this end, it is useful to extend the notion of triangle to the unbounded face of the Delaunay triangulation. If 'pq is an edge of the convex hull of S we call the supporting halfplane H not containing S an infinite triangle with edge 'pq. Its circumcircle is H itself, the limit of all circles through p and q whose center tend to infinity within H\ compare Figure 3. As a consequence, each edge of a Delaunay triangulation is now adjacent to two triangles. Those triangles of DT/_i (finite or infinite) whose circumcircles contain the new site. Pi, are said to be in conflict with pi. According to Theorem 2.1, they will no longer be Delaunay triangles. Let ^ be an edge of DT/_i, and let T{q,rJ)ht the triangle adjacent to 'qr that lies on the other side of ^ than pi\ see Figure 6. If its circumcircle C{q,r, t) contains pi then each circle through q, r contains at least one of pi,t\ see Figure 3 again. Consequently, 'qr cannot belong to DT/, due to Definition 2.2. Instead, ^ will be a new Delaunay edge, because there exists a circle contained in C(^, r, t) that contains only pi and t in its interior or boundary. This process of replacing edge 'qr by p7? is called an edge flip. The necessary edge flips can be carried out efficiently if we know the triangle T(q,s,r) of DTj_i that contains pt, see Figure 7. The line segments connecting pt to q, r, and s will be new Delaunay edges, by the same argument from above. Next, we check if, e.g. edge 'qr must be flipped. If so, the edges 'qt and Jr are tested, and so on. We continue until no further edge currently forming a triangle with, but not containing pi, needs to be flipped, and obtain DT/. LEMMA 3.1. If the triangle ofDTt-i containing pi is known, the structural work needed for computing DT/ from DT/_i is proportional to the degree d of pi in DT/.

212

F. Aurenhammer

and R. Klein

t

C(q,r,t) Fig. 6. If triangle T(q,r, t) is in conflict with pj then former Delaunay edge qr must be replaced by pit.

(iii) Fig. 7. Updating DT/_i after inserting the new site pj. In (ii) the new Delaunay edges connecting pi to q,r,s have been added, and edge ^ has already been flipped. Two more flips are necessary before the final state shown in (iii) is reached.

PROOF. Continued edge flipping replaces d — 2 conflicting triangles of DT/_i by d new triangles in DT/ that are adjacent to pi; compare Figure 7. D

Lemma 3.1 yields an obvious O(n^) time algorithm for constructing the Delaunay triangulation ofn points: we can determine the triangle of DT/_i containing pi within linear time, by inspecting all candidates. Moreover, the degree of pi is trivially bounded by n. The last argument is quite crude. There can be single vertices in DT/ that do have a high degree, but their average degree is bounded by 6, as Lemma 2.3 and Lemma 2.4 show. This fact calls for randomization. Suppose we pick pn at random in 5, then choose pn-\ randomly from S — {pn}, and so on. The result is a random permutation {p\, pi^ ---^ Pn) of the site set S.

Voronoi diagrams

213

If we insert the sites in this order, each vertex of DT/ has the same chance of being pi. Consequently, the expected value of the degree of /?/ is 0(1), and the expected total number of structural changes in the construction of DT^ is only 0(w), due to Lemma 3.1. In order to find the triangle that contains /?/ it is sufficient to inspect all triangles that are in conflict with pi. The following lemma shows that the expected total number of all conflicting triangles so far constructed is only logarithmic. LEMMA 3.2. For each h < i, let dh denote the expected number of triangles in DT/^ \ DT/j_i that are in conflict with pi. Then,

^J/,=O(log0. Let C denote the set of triangles of DT/j that are in conflict with pi. A triangle T eC belongs to DT/^ \ DT/^-i iff it has pu as a vertex. As ph is randomly chosen in DT/^, this happens with probability 3//z. Thus, the expected number of triangles in C \ Tflh-i equals 3 • \C\/h. Since the expected size of C is less than 6 we have dh < 18//z, hence PROOF.

i : l = \ 4 < i8El=\ i/h = e(iogi).

n

Suppose that 7 is a triangle of DTj adjacent to pt, see Figure 7(iii). Its edge Jr is in DT/_i adjacent to two triangles: To its father, F, that has been in conflict with pi; and to its stepfather, SF, who is still present in DT/. Any further site in conflict with T must be in conflict with its father or with its stepfather, as illustrated by Figure 8. This property can be exploited for quickly accessing all conflicting triangles. The Delaunay tree due to Boissonnat and Teillaud [46] is a directed acyclic graph that contains one node for each Delaunay triangle ever created during the incremental construction. Pointers run from fathers and stepfathers to their sons. The triangles of DT3 are the sons of a dummy root node. When P/+1 must be inserted, a Delaunay tree including all triangles up to DT/ is available. We start at its root and descend as long as the current triangle is in conflict with /?/+i. The above property guarantees that each conflicting triangle of DT/ will be found. The expected number of steps this search requires is O(log0, due to Lemma 3.2. Once DT/+1 has been computed, the Delaunay tree can easily be updated to include the new triangles. Thus, we have the following result. THEOREM 3.2. The Delaunay triangulation of a set ofn points in the plane can be constructed in expected time 0{n\ogn), using expected linear space. The average is taken over the different orders of inserting the n sites.

As a nice feature, the insertion algorithm is on-line. That is, it is capable of constructing DT/ from DT/_i without knowledge of /7/+1,..., p^. Note also that we did not make any assumptions concerning the distribution of the sites in the plane; the incremental algorithm achieves its 0{n\ogn) time bound for every pos-

214

F. Aurenhammer

and R. Klein

Fig. 8. The circumcircle of T is contained in the union of the circumcircles of F and SF.

sible input set. Only under a "poor" insertion order can a quadratic number of structural changes occur, but this is unlikely. Randomized geometric algorithms are presented in more detail in a separate chapter of this book. Though conceptually simple, they tend to be tricky to analyze. Since Clarkson and Shor [74] introduced their technique, many researchers have been working on generalizing and simplifying the methods used. To mention but a few results, Boissonnat et al. [43] and Guibas et al. [135] have refined the methods of storing the past in order to locate new conflicts quickly, Clarkson et. al. [73] have generaHzed and simplified the analytic framework, and Seidel [230] systematically applied the technique of backward analysis first used by Chew [62]. The method in [135] for storing the past is briefly described in Subsection 4.3.3 for constructing a generalized planar Voronoi diagram. If the set S of sites can be expected to be well distributed in the plane, bucketing techniques for accessing the triangle that contains a new site /?/ have been used for speed-up. Joe [152], who implemented Sloan's algorithm [238], and Su and Drysdale [240], who used a variant of Bendey et al.'s spiral search [36], report on fast experimental runtimes. The arising issues of numerical stability have been addressed in Fortune [123], Sugihara [241], and JUnger et al. [154]. A technique similar to incremental insertion is incremental search. It starts with a single Delaunay triangle, and then incrementally discovers new ones, by growing triangles from edges of previously discovered triangles. This basic idea is used, e.g., in Maus [189] and in Dwyer [103]. It leads to efficient expected-time Delaunay algorithms in higher dimensions; see [103]. The paper [240] gives a thorough experimental comparison of available Delaunay triangulation algorithms.

Voronoi diagrams

215

3.3. Divide & conquer The first deterministic worst-case optimal algorithm for computing the Voronoi diagram has been presented by Shamos and Hoey [232]. In their divide & conquer approach, the set of point sites, S, is split by a dividing line into subsets L and R of about the same sizes. Then, the Voronoi diagrams V(L) and V(R) are computed recursively. The essential part is in finding the split line, and in merging V(L) and V(R), to obtain V(S). If these tasks can be carried out in time 0(n) then the overall running time is 0(n logn). During the recursion, vertical or horizontal split lines can be found easily if the sites in S are sorted by their x- and y-coordinates beforehand. The merge step involves computing the set B(L, R) of all Voronoi edges of V(S) that separate regions of sites in L from regions of sites in R. Suppose that the split line is vertical, and that L lies to its left. LEMMA 3.3. The edges of B{L, R) form a single y-monotonepolygonal chain. In V{S), the regions of all sites in L are to the left of B(L, R), whereas the regions of the sites of R are to its right. PROOF. Let b be an arbitrary edge of B(L, R), and let / G L and r e Rhe the sites whose regions are adjacent to b. Since / has a smaller x-coordinate than r, b cannot be horizontal, and the region of / must be to its left. D

Thus, V(S) can be obtained by glueing together B(L, R), the part of V(L) to the left of B(L, R), and the part of V(R) to its right; see Figure 9, where V(R) is depicted by dashed lines. The polygonal chain B(L, R) is constructed by finding a starting edge at infinity, and by tracing B(L,R) through V(L) and V(R). Due to Shamos and Hoey [232], an unbounded starting edge of B(L, R) can be found inO(n) time by determining a line tangent to the convex hulls of L and R, respectively. Here we describe an alternative method by Chew and Drysdale [66] since that method also works for generalized Voronoi diagrams (Subsection 4.5.2). The unbounded regions of V(L) and V(R) are scanned simultaneously in cyclic order. For each non-empty intersection VR(/, L) n VR(r, R), we test if it contains an unbounded piece of B(l,r).lf so, this must be an edge of B(L, R), by Definition 2.1. Since B(L, R) has two unbounded edges, by Lemma 3.3, this search will be successful. It takes time | V(L)\ + | V(R)\ = 0(n). Now we describe how B(L, R) is traced. Suppose that the current edge b of B(L, R) has just entered the region VR(/, L) at point v while running within VR(r, R), see Figure 10. We determine the points VL and VR where b leaves the regions of / resp. of r. The point VL is found by scanning the boundary of VR(/, L) counterclockwise, starting from v. In our example, VR is closer to v than VL, SO that it must be the endpoint of edge b. From VR, B{L,R) continues with an edge Z?2 separating / and r2. Now we have to determine the points UL,2 and VR^2 where b2 hits the boundaries of the regions of / and r2- The crucial observation is that VL,2 cannot be situated on the boundary segment of VR(/, L) from v to VL that we have just scanned; this can be inferred from the convexity of VR(/, S). Therefore, we need to scan the boundary of VR(/, L) only from VL on, in counterclockwise direction.

216

F. Aurenhammer and R. Klein B(L,R)

V(R)

Fig. 9. Merging V{L) and V{R) into V{S).

The same reasoning applies to V{R)\ only here, region boundaries are scanned clockwise. Even though the same region might be visited by B{L, R) several times, no part of its boundary is scanned more than once. The edges of V(L) that are scanned all lie to the right of B{L, R). This part of V(L), together with B(L, R), forms a planar graph each of whose faces contains at least one edge of B(L, R) in its boundary. As a consequence of Lemma 2.3, the size of this graph does not exceed the size of B(L, R), times a constant. The same holds for V(R). Therefore, the cost of constructing B(L, R) is bounded by its size, once a starting edge is given. This leads to the following result. THEOREM 3.3. The divide SL conquer algorithm allows the Voronoi diagram ofn point sites in the plane to be constructed within time 0(n logn) and linear space, in the worst case. Both bounds are optimal.

Of course, the divide & conquer paradigm can also be applied to the computation of the Delaunay triangulation DT(5). Guibas and Stolfi [136] give an implementation that uses the quad-edge data structure and only two geometric primitives, an orientation test and an in-circle test. Fortune [123] showed how to perform these tests accurately with finite precision.

Voronoi diagrams

217

Bd.rs) K /

\ \ I

, / /

/ B(l,r2) '

/

/ /

'

'

B(l,r)

IVR(I,L)

"B(r2,r3)

b^

•r2

B(r,r2)

Fig. 10. Computing the chain B(L, R).

Dwyer's implementation [102] uses vertical and horizontal split lines in turn, and Katajainen and Koppinen's [157] merges square buckets in a quad-tree order. Both papers report on favorable results. Divide & conquer algorithms are candidates allowing for cffLcitnt parallelization. Several theoretically efficient algorithms for computing in parallel the Voronoi diagram or the Delaunay triangulation have been proposed. We refer to the recent paper by Blelloch et al. [41] for references and for a practical parallel algorithm for computing DT(5). They highlight an algorithm by Edelsbrunner and Shi [116] that uses the lifting map for S (see Subsection 3.5) to construct a chain of Delaunay edges that divides S. They show experimentally that their implementation is comparable in work to the best sequential algorithms.

3.4. Sweep The well-known line sweep algorithm by Bentley and Ottmann [34] computes the intersections of n line segments in the plane by moving a vertical line, H, across the plane. The line segments currently intersected by H are stored in bottom-up order. This order must be updated whenever H reaches an endpoint of a line segment, or an intersection point. To discover the intersection points in time, it is sufficient to check, after each update of the order, those pairs of line segments that have just become neighbors on H. It is tempting to apply the same approach to Voronoi diagrams, by keeping track of the Voronoi edges that are currently intersected by the vertical sweep line. The problem is in discovering new Voronoi regions in time. By the time the sweep line hits a new site it has been intersecting Voronoi edges of its region for a while.

218

F. Aurenhammer

and R. Klein

Pe Pe

-'

H

V

H'

Fig. 11. Voronoi diagrams of the sweep line, H, and of the points to its left.

Fortune [125] was the first to find a way around this difficulty. He suggested a planar transformation under which each point site becomes the leftmost point of its Voronoi region, so that it will be the first point hit during a left-to-right sweep. His transformation does not change the combinatorial structure of the Voronoi diagram. Later, Seidel [228] and Cole [75] have shown how to avoid this transformation. They consider the Voronoi diagram of the point sites to the left of the sweep line H and of H itself, considered an additional site; see Figure 11. Because the bisector of a line and a non-incident point is a parabola, the boundary of the Voronoi region of / / is a connected chain of parabola segments whose top- and bottommost edges tend to infinity. This chain is called the wavefront, W. Let /? be a point site to the left of H. Any point to the left of, or on, the parabola B(p, H) is not farther from p than from //; hence, it is a fortiori closer to p than to any site to the right of H. Consequently, as the sweep line moves on to the right, the waves must follow because the sets D(pi, H) grow. On the other hand, each Voronoi edge to the left of W that currently separates the regions of two point sites /?/, pj will be (part of) a Voronoi edge in

y{s). During the sweep, there are two types of events that cause the structure of the wavefront to change, namely when a new wave appears in W, or when an old wave disappears. The

Voronoi diagrams

219

first happens each time the sweep line hits a new site, e.g. pe in Figure 11. At that very moment B(H, pe)is2i horizontal line through pe, according to Definition 2.1. A little later, its left halfline unfolds into a parabola that must be inserted into the wavefront by gluing it onto the wave of p4 (which now contributes two segments to W). Let p,q be two point sites whose waves are neighbors in W. Their bisector, B(p,q), gives rise to a Voronoi edge to the left of W. Its prolongation into the region of H is called a spike. In Figure 11 spikes are depicted as dashed lines; one can think of them as tracks along which the waves are moving. A wave disappears from W when it arrives at the point where its two adjacent spikes intersect. Its former neighbors become now adjacent in the wavefront. In Figure 11, the wave of p3 would disappear at point i;, if the new site, p^, did not exist. But after the wave of p^ has been inserted, there will be a previous event at v\ where the lower part of the wave of p4 disappears. While keeping track of the wavefront one can easily maintain the Voronoi diagram of H and of the point sites to its left. As soon as all point sites have been detected and all spike intersections have been processed, V(S) is obtained by removing the wavefront and extending all spikes to infinity. Even though one wave may contribute several segments to the wavefront, the following holds. LEMMA

3.4. The size of the wavefront is 0(n).

Since any two parabolic bisectors B(p, H), B(q, H) can cross at most twice, the size of the wavefront is bounded by A2(n) = 2n — 1, where Xs{n) denotes the maximum length of a Davenport-Schinzel sequence over n symbols in which no two symbols appear s times each in alternating positions; see [21]. D PROOF.

The wavefront can be implemented by a balanced binary tree that stores the segments in bottom-up order. This enables us to insert a wave, or remove a wave segment, in time OiXogn). Before the sweep starts, the point sites are sorted by increasing x-coordinates and inserted into an event queue. After each update of the wavefront, newly adjacent spikes are tested for intersection. If they intersect at some point f, we insert into the event queue the time, i.e. the position x of the sweep line, when the wave segment between the two spikes arrives at v. Since the point f is a Voronoi vertex of V(5), there are only 0(n) many events caused by spike intersections. In addition, each of the n sites causes an event. For each active spike we need to store only its first intersection event. Thus, the size of the event queue never exceeds 0(n). We obtain the following result. THEOREM 3.4. Plane sweep provides an alternative way of computing the Voronoi diagram ofn points in the plane within 0(n logn) time and linear space.

McAllister et al. [191] have pointed out a subtle difference between the sweep technique and the two methods mentioned before. The divide & conquer algorithm computes 0 (n log n) many vertices, even though only a linear number of them appears in the final diagram. The randomized incremental construction method performs an expected 0 (n log n)

220

F. Aurenhammer

and R. Klein

tz Xg-X^ +^2

Fig. 12. Lifting circles onto the paraboloid.

number of conflict tests. Both tasks, constructing a Voronoi vertex and testing a subset of sites for conflict, are usually handled by subroutines that deal directly with point coordinates, bisector equations etc. They can become quite costly if we consider sites more general than points, and distance measures more general than the Euclidean distance; see Sections 4.4, 4.5, and 4.6. The sweep algorithm, on the other hand, processes only 0(n) many spike events.

3.5. Lifting to 3-space The following approach employs the powerful method of geometric transformation. Let P = [{x\,X2,xi) I x^ -h x | = X3} denote the paraboloid depicted in Figure 12. For each point x = {x\,X2) in the plane, let x' = {x\,X2,x]-\- jc|) denote its lifted image on P. LEMMA

3.5. Let C bea circle in the plane. Then C' is a planar curve on the paraboloid P.

PROOF.

Suppose that C is given by the equation r^ = (X\ -C\)^

-\-(X2 -02)^

=x]+xl

-2x\C\

- 2X2C2 + c] + C^.

By substituting jc^ -h jc| = JC3 we obtain x^ — 2x\c\ — 2x2C2 + Cj + ^2 — r

=0

for the points of C. This equation defines a plane in 3-space.

D

This lemma has an interesting consequence. By the lower convex hull of a set of points in 3-space we mean that part of the convex hull which is visible from the {xi, jC2)-plane.

Voronoi diagrams

221

THEOREM 3.5. The Delaunay triangulation of S equals the projection onto the {x\, X2)plane of the lower convex hull of S'. PROOF. Let p,q,r denote three point sites of S. By Lemma 3.5, the hfted image, C\ of their circumcircle C Hes on a plane, E, that cannot be vertical. Under the lifting mapping, the points inside C correspond to the points on the paraboloid P that lie below the plane E. By Theorem 2.1, p,q,r define a triangle of the Delaunay triangulation iff their circumcircle contains no further site. Equivalently, no lifted site s^ is below the plane E that passes through p\ q\ r'. But this means that p\ q', r' define a face of the lower convex hull of S'.

D

Because there exist Oiji log/t) time algorithms for computing the convex hull of/i points in 3-space, see, e.g. Preparata and Shamos [215], we have obtained another optimal algorithm for the Voronoi diagram. The connection between Voronoi diagrams and convex hulls has first been studied by Brown [49] who used the inversion transform. The simpler lifting mapping has been used, e.g., in Edelsbrunner and Seidel [113]. We shall see several applications and generalizations in Subsection 4.3. In [113] also the following fact is observed. For each point p of 5, consider the paraboloid Pp = {(xi, X2, ^3) | {x\ — pi)^ + (^2 — P2)^ = X3}. If these paraboloids were opaque, and of pairwise different colors, an observer looking upwards from ^3 = — oc would see the Voronoi diagram V(S). In fact, the projection X = {x\, X2) of a point (x\, X2, X3) e Pp 0 Pq belongs to B{p, q); and there is no site s closer to x than p and q iff (xi, X2, X3) lies below all paraboloids Ps. Instead of the paraboloids Pp one could use the surfaces {(xi,X2, f((xi — pi)^ + (x2 — P2)^))] generated by any function / that is strictly increasing. For example, f(x) = ^ gives rise to cones of slope 45° with apices at the sites. This setting illustrates the concept of circles expanding from the sites at equal speed, as mentioned after the proof of Lemma 2.1. Coordinate X3 represents time. In order to visualize a Voronoi diagram on a graphic screen one can feed the n surfaces to a z-buffer, and eliminate by brute force those parts not visible from below. Finally, we would like to mention a nice connection between the two ways of obtaining the Voronoi diagram by means of paraboloids explained above; it goes back to [113]. For a point w = (wi, W2, W3), let -'W denote its mirror image (wi, W2, —w^). If we apply to 3-space the mapping which sends x to (x\, X2, ^3 — (xi — p\)^ — (x2 — P2)^) then, for each point p in the plane, the paraboloid Pp corresponds to the tangent plane of the paraboloid -"P at the point —"{p'), where p' denotes the lifted image of p\ compare the plane equation derived in the proof of Lemma 3.5, letting c = p and r = 0.

4. Generalizations and structural properties 4.1. Characterization of Voronoi diagrams The process of constructing the Voronoi diagram for n point sites can be seen as an assignment of a planar convex region to each of the sites, according to the nearest-neighbor

222

F. Aurenhammer and R. Klein

rule. We now address the following, in some sense inverse, question: Given a partition of the plane into n convex regions (which are then necessarily polygonal), do there exist sites, one for each region, such that the nearest-neighbor rule is fulfilled? In other words, when is a given convex partition the Voronoi diagram of some set of sites? Whether a given set of sites induces a given convex partition as its Voronoi diagram is, of course, easy to decide by exploiting symmetry properties among the sites. For the same reason, it is easy to check whether a given triangulation is Delaunay, by exploiting the empty circumcircle property of its triangles, stated in Theorem 2.1. Conditions for a given graph to be isomorphic to the Delaunay triangulation of some set of sites are mentioned, e.g., in the survey article by Fortune [124]. Below we concentrate on the recognition of Voronoi diagrams without knowing the sites. Questions of this kind arise in facility location and in the recognition of biological growth models (as report, e.g., in Suzuki and Iri [245]) and, in particular, in the so-called gerrymander problem mentioned in Ash and Bolker [20]: When the sites are regarded as polling places and election law requires that each person votes at the respective closest polling place, the election districts form a Voronoi diagram. If the legislature draws the district lines first, how can we tell whether election law is satisfied? Let Ri and Rj be two of the given regions. Assume that they share a common edge, and let hij be the line containing that edge. Further, let a/y denote the reflection at line htj. LEMMA 4.1. A convex partition R\,..., Rn of the plane defines a Voronoi diagram if and only if there exists a point pi for each region Ri such that the following holds. (1) Pi e Ri {containment condition), (2) crij(pi) = pj if Rj is adjacent to Ri (reflection condition). PROOF. If we do have a Voronoi diagram then its defining sites exist and obviously fulfill (1) and (2). To prove the converse, assume that points p\,..., pn fulfilling both conditions exist. Take any region Ri and any point x therein. We show that d(x, pi) is a minimum. To get a contradiction, suppose pj, j ^ i, is closest to x. Consider an edge of Rj that is intersected by xpj, and let Rk be the region adjacent to Rj at that edge; see Figure 13. Note that k = i may happen. By convexity of Rj and by (1), the line hjk separates pj from X. Hence by (2) we gQtd(x, pk) 0, and ^/pow(x, p) expresses the distance of x to the touching point of a line tangent to the sphere and through x. The locus of equal power with respect to two weighted sites p and ^ is a hyperplane called the power hyperplane of p and q. Let h(p,q) denote the closed halfspace bounded by this hyperplane and containing the points of less power with respect to p. The power cell of p is given by

cell(/7)= P I h{p,q). qeS\[p}

232

F. Aurenhammer

and R. Klein

Fig. 18. Power diagram for circles in the plane.

In analogy to the classical Voronoi regions, the power cells define a partition of J-space into convex polyhedra, the so-called power diagram, PD{S), of S. See Figure 18 for a planar example. PD(S) coincides with the Voronoi diagram of S if all weights are the same. In contrast to Voronoi regions, power cells might be empty if general weights are used; see cell(/7) in Figure 18. PD(S) is a face-to-face cell complex in J-space that consists of polyhedral faces of various dimensions j , for 0 ^ 7 ^ d. In the non-degenerate case, exactly d -\- I edges, ( J ) facets (faces of dimension d — I), and d + 1 cells meet at each vertex of PD(S). For storing a J-dimensional cell complex, the cell-tuple structure in Brisson [48] seems appropriate. This data structure represents the incidence and ordering information in a cell complex in a simple uniform way. When each weighted site p e S is interpreted as the sphere cTp = (p, ^Jw{p)), we can make the following nice observation. The part of Op that contributes to the union of all these spheres, Une^ ^p^ is just the part of cr^ within cell(/7). This means that PD(S) defines

Voronoi diagrams

233

a partition of this union into simply-shaped and algorithmically tractable pieces. Several algorithms concerning the union (and also the intersection) of spheres are based on this partition; see Avis et al. [32], Aurenhammer [24], and Edelsbrunner [106]. Power diagrams (and thus Voronoi diagrams) are, in a strong sense, equivalent to the boundaries of convex polyhedra in one dimension higher. This is a fact with far-ranging implications and has been observed in Brown [49], Klee [165], Edelsbrunner and Seidel [113], Paschinger [213], and Aurenhammer [22]. The power function pow(x, p) can be expressed by the hyperplane 7t(p):Xd-^i = 2x^p - p^p + w(p) in (d + l)-space, in the sense that a point x lies in cell(p) of PD(S) iff, at x, 7t(p) is vertically above all hyperplanes 7t(q) for q e S\ {p}. Hence PD(S) corresponds, by vertical projection, to the upper envelope of these hyperplanes, which is the surface of a convex polyhedron, 17(5), in (d + 1)-space. Conversely, it is not difficult to see that every upper envelope of n non-vertical hyperplanes in (d + 1)-space corresponds to the power diagram of n appropriately weighted sites in d-spact. The following upper bound is a direct consequence of the upper bound theorem for convex polyhedra proved in McMuUen [193]. The bound is trivially sharp for power diagrams, but is achieved also for Voronoi diagrams, as was shown in Seidel [224]. 4.4. Let S be a set ofn point sites in d-space. Any power diagram for S, and in particular, the Voronoi diagram for S, realizes at most fj faces of dimension j , for

THEOREM

Y^ /i\/n

— d-^i — 2\

^^-y /d — i -^ l\ /n — d -\- i — 2\

where a = \^'] and b = [f J. The numbers fj are 0(n^^^),for 0 < j < J — 1. For algorithmic issues, power diagrams can be brought in connection to convex hulls in (d + 1)-space, by exploiting a duality (actually, polarity) between upper envelopes of hyperplanes (or intersections of upper halfspaces) and convex hulls of points. This connection is best described by generalizing the lifting map in Subsection 3.5 to weighted points. A site p e S with weight w(p) is transformed into the point Up) = (\p^ T p -^ w(p)J r ^) in (d -h 1)-space. There is a interelation cdillQd polarity between the transforms k and n. The point k(p) is called the pole of the hyperplane 7t(p) which, in turn, is called the polar hyperplane ofk(p). Polarity defines a one-to-one correspondence between arbitrary points and non-vertical hyperplanes in (d + 1)-space. It is well known that polarity preserves the relative position of points and hyperplanes. To show the connection to convex hulls, consider an arbitrary face / of the polyhedron n(S). Let / be the intersection of m = d — j-\-l hyperplanes 7r(/7i),..., 7t(pm), such

234

F. Aurenhammer and R. Klein

that / is of dimension j . Each point x e f lies on these but above all other hyperplanes n(q) defined by S. Hence the polar hyperplane of x has the points X(pi),..., X{pm) on it and the remaining points X{q) above it. This shows that the points X(/7i),..., X(pm) span a face of dimension d — j of the convex hull of the point set {Xip) \ p e S}. We conclude that each 7-dimensional face of /7(5), and thus of PD(S), is represented by a (J — 7)-dimensional face of this convex hull. This implies a duaUty between power diagrams in J-space and convex hulls in (d + l)-space. In the special case of an unweighted point set 5 in the plane, the parts of the convex hull that are visible from the plane project to the vertices, edges, and triangles of the Delaunay triangulation of S, and we obtain Theorem 3.5 of Section 3.5. A triangulation which can be obtained by projecting a convex hull is called a regular triangulation in Edelsbrunner and Shah [115]. Regular triangulations are just those being dual to planar power diagrams. Once the convex hull of {k(p) \ p e S] has been computed, the faces of PD(S), as well as their incidence and ordering relations, can be obtained in time proportional to the size of PD(S). 4.5. Let Cd-\-\ (n) be the time needed to compute a convex hull ofn points in (d +1)-space. A power diagram (and in particular, the Voronoi diagram) of a given n-point set in d-space can be computed in Cj+i (n) time. THEOREM

Worst-case optimal convex hull algorithms working in general dimensions have been designed by Clarkson and Shor [74], Seidel [229], and Chazelle [58], yielding Q+i(«) = 0(n logn -h n^2^). So Theorem 4.5 is asymptotically optimal in the worst case. Note, however, that power diagrams in J-space may as well have a fairly small size, 0(/i), which emphasizes the use of output-sensitive convex hull algorithms. The algorithm in Seidel [226] achieves C^+i (n) = 0(n^ + / log / ) , where / is the total number of faces of the convex hull constructed. The latest achievements are C4 = 0((n -h / ) log^ / ) in Chan et al. [56] and C5 = 0((n + / ) log'^ / ) in Amato and Ramos [15]. Space constraints preclude our discussion of power diagrams. Still, some remarks are in order to point out their central role within the context of Voronoi diagrams. For a detailed discussion and references, see Aurenhammer and Imai [30]. The regions of a Voronoi diagram are usually defined by a set of sites and a distance function. If the regions are polyhedral, then any such Voronoi diagram can be shown to be the power diagram of a suitable set of weighted point sites. For instance, this is the case for the furthest site Voronoi diagram, whose regions consist of all points having the same furthest site in the given set. A polyhedral cell complex in J-space is called simple if exactly d-\-l cells meet at each vertex. For example, the Voronoi diagram of a set of point sites in J-space is simple if no d -\-2 sites are co-spherical. If J ^ 3, any simple cell complex can be shown to be a power diagram. The class of power diagrams is closed under taking cross-sections with a hyperplane. That is, the diagram obtained from intersecting a power diagram in J-space with a hyperplane is again a power diagram, in (d — 1)-space. Moreover, the class of power diagrams is closed under the modifications to higher order defined in Subsection 4.3.3.

Voronoi diagrams

235

Several generalized Voronoi diagrams in J-space have an embedding in a power diagram in {d + 1)-space, in the sense that they can be obtained by intersecting a power diagram with certain simple geometric objects and then projecting the intersection. For example, the additively weighted Voronoi diagram (i.e., the closest-point Voronoi diagram for spheres, or the Johnson-Mehl model [153]), and the multiplicatively weighted Voronoi diagram (or the Apollonius model) have this property. In all situations mentioned above, a set of weighted sites for the corresponding power diagram can be computed easily. Thus general methods of handling Voronoi diagrams and cell complexes become available. For example, the Voronoi diagram for spheres in 3-space, and the multiplicatively weighted Voronoi diagram in the plane, can both be computed in 0{n^) time which is optimal. The latter diagram is investigated in detail in Aurenhammer and Edelsbrunner [28] and in Sakamoto and Takagi [223]. 4.3.3. Higher-order Voronoi diagrams and arrangements. Higher-order Voronoi diagrams are natural and useful generalizations of classical Voronoi diagrams. Given a set S of n point sites in J-space, and an integer k between 1 and n — 1, the order-k Voronoi diagram of S, Vk{S), partitions the space into regions such that each point within a fixed region has the same k closest sites. V\ (S) just is the classical Voronoi diagram of S. The regions of Vk (S) are convex polyhedra, as they arise as the intersection of halfspaces bounded by symmetry hyperplanes of the sites. A subset Mofk sites in S has a non-empty region in Vk(S) iff there is a sphere that encloses M but no site in 5 \ M. In fact, the region of M in Vk(S) just is the set of centers of all such spheres. Figure 19 illustrates a planar order-2 Voronoi diagram. Two differences to the classical Voronoi diagram are apparent. A region need not contain its defining sites, and the bisector of two sites may contribute more than one facet. In the extreme case of k = n — 1, the furthest-site Voronoi diagram of S is obtained. It contains, for each site p e S, the region of all points x for which p is the furthest site in S. Exact upper bounds on the size of furthest-site Voronoi diagrams in J-space are derived in Seidel [227]. The family of all higher-order Voronoi diagrams for a given set S of sites in J-space is closely related to an arrangement of hyperplanes in (d -\-1)-space; see Edelsbrunner and Seidel [113]. We describe this relationship in the more general setting of power diagrams, by defining an order-/: power diagram, PDk(S), for a set S of weighted point sites in an analogous way. See Aurenhammer [22,27] for more details. Recall from Subsection 4.3.2 that the power function with respect to a site p e S can be expressed by a hyperplane 7t(p) in (d + l)-space. The set of hyperplanes {nip) \ p e S} dissects (d + 1)-space into a polyhedral cell complex called an arrangement. Arrangement cells are convex, and can be classified according to their relative position with respect to the hyperplanes in [7z{p) \ p ^ S). A cell C is said to be of level k if exactly k hyperplanes are vertically above C. For example, the upper envelope of [n^p) \ p e S} bounds the only cell, 11 (S), of level 0. All cells of level 1 share some facet with n(S), so that their vertical projection gives the (order-1) power diagram PD(S). More generally, the cells of level k project to the regions of PDk(S), for each k between 1 and n — 1. To see this, let x be a point in some ^-level cell C. Then k hyper-

236

F. Aurenhammer and R. Klein

Fig. 19. Region of {p,q} in V2('^)-

planes 7r(/?i),..., Tr(pk) are above x, and n — k hyperplanes 7T(pk-\-\),..., 7t(pn) are below X. That means that, for the vertical projection x^ of x onto J-space, we have pow(x^ Pi) < pow(jc', pj) for 1 ^ / ^ /: and k -\- I ^ j ^ n. Hence x^ is a point in the region of {p\,..., pk) in PDk(S). Hyperplane arrangements are well-investigated objects, concerning their combinatorial as well as their algorithmic complexity; see Edelsbrunner et al. [112,114]. We obtain: THEOREM 4.6. Let S be a set ofn {weighted or unweighted) point sites in d-space. The family of all higher-order power diagrams {or Voronoi diagrams) for S realizes a total of 0 (^^+1) faces, and it can be computed in optimal G {n^^ ^) time.

Clarkson and Shor [74] proved that the number of arrangement cells with levels up to a given value oik is 0{n^^^'^^k^^^'^^). The collection of these cells can be constructed within this time for J > 4, with the algorithm in Mulmuley [203]. A modification by Agarwal et al. [2] achieves roughly 0{nk^) time also in 3-space. An output-sensitive construction algorithm is given in Mulmuley [204]. All these results apply to families of order-/: diagrams in one dimension lower.

Voronoi diagrams

237

Most practical applications ask for the computation of a single order-^ Voronoi diagram Vk(S) in the plane, for a given value of k. (Typically, k does not depend on \S\=n but is a small constant.) As for the classical Voronoi diagram V(S), edges are pieces of perpendicular bisectors of sites. Vertices are centers of circles that pass through three sites. However, these circles are no longer empty; they enclose either /: — 1 or ^ — 2 sites. Lee [181] showed that this diagram has 0(k(n — k)) regions, edges, and vertices. It is easy to see that the regions of ViiS) are in one-to-one correspondence with the edges of V(S). Hence ViiS) realizes at most 3^ — 6 regions in the plane. Considerable efforts have been made to compute the single planar order-^ Voronoi diagram efficiently. Different approaches have been taken in Lee [181], Chazelle and Edelsbrunner [59], Aurenhammer [26], Clarkson [71], and Agarwal et al. [2]. In the last two papers randomized runtimes of 0(^n^+^) and (roughly) 0(k(n — k)\ogn) are achieved, respectively, which is close to optimal. Below we describe a (roughly) 0(k^(n — k) \ogn) time randomized incremental algorithm by Aurenhammer and Schwarzkopf [31], that can be modified to handle arbitrary on-line sequences of site insertions, site deletions, and knearest neighbor queries. Though not being most time efficient, the algorithm profits by its simplicity and flexibility. The heart of the algorithm is a duality transform that relates the diagram Vk (S) to a certain convex hull in 3-space. This transform allows us to insert and also delete sites in a simple fashion by computing convex hulls. Let M c S be any subset of k sites. M is transformed into a point q(M) in 3-space, by taking the centroid of M and lifting it up vertically. More precisely.

Now consider the set Qk (5) of all points that can be obtained from S in this way. That is, e^(5) = { ^ ( M ) | M c 5 } . LEMMA

4.2. The part of the convex hull of Qk (S) that is visible from the plane is dual to

Vkisy The lemma can be proved by first mapping each ^-subset M of 5 into a non-vertical plane 7t{M) in 3-space,

PGM

peM

and then considering the upper envelope HkiS) of all these planes. It is not difficult to show that the facets of Flk (S) project vertically to the regions of Vk(S). The lemma follows from observing the polarity (cf. Subsection 4.3.2) between the planes 7t(M) and the points To construct Vk(S), we could just compute Qk(S), determine its convex hull, and then dualize its triangles, edges, and vertices that are visible from the plane. However, Qk (S)

238

F. Aurenhammer and R. Klein

contains a point for each /^-subset of 5, and thus has cardinaHty (^) = 0 (n^). Only 0(k(n — k)) points He on the convex hull, as Vk{S) has this many regions. We use randomized incremental insertion of sites in order to compute this convex hull efficiently. Let S = [p\,..., pn), and let C/ denote the visible part of the convex hull of Qk{{p\,...,/?/}), for ^ 4-1 ^ / ^n. Points of Qk (S) lying on the triangular surface C/ are called corners of C/. We start by determining Q + i . Qk({p\, "-, Pk+\}) contains k-\-\ points which can be calculated in time 0{k), so Oiklogk) time suffices. The generic step of the algorithm is the insertion of site /?/ into C/_ i, for / > /: + 2. (1) Identify all triangles of C/_i which are destroyed by pi and cut them out. Let B be the set of comers on the boundary of the hole. (2) Calculate the set P of all new comers created by pi. (3) Compute the convex hull of P U J5, and fill the hole with the visible part Ft of this convex hull. This gives C/. Each triangle A of C/_i is dual to a vertex of Vk{S). This vertex is the center of a circle that passes through three sites m S, A will be destroyed if this circle encloses pt. The destroyed triangles of C/_i form a connected surface I^i-\. Hence, if we know one of them in advance, iJ/_i can be identified in time proportional to the number ni of its triangles. Moreover, the set P of new comers can be calculated easily from the edges of Ui-i, as each such edge gives rise to a unique comer. LEMMA 4.3. Given C/_i we can construct Ci in time 0(/2/ log/i/), provided we know a triangle ofCi-\ that is destroyed by /?/.

When looking for a starting triangle of X',-!, we profit from another nice property of the duality transform: If the vertical projection A' of a triangle A of C/_i contains pt then A is destroyed by the insertion of pi. This leaves us with the problem of locating pt in the triangulation given by the planar projection of C/_ i. In fact, we get the desired point-location stmcture nearly for free. Adapting a technique used in Guibas et al. [135] for constmcting Delaunay triangulations, we do not remove the triangles of C/_ i that get destroyed by the insertion of pi, but mark them as old. When marked old, each triangle gets a pointer to the newly constmcted part Ft of C/. The next site then is located by scanning through the 'construction history' of C/. The structure for point location within each surface Fy, j ^ /, which is needed in addition, is a byproduct of the randomized incremental convex hull algorithm in [135], which we used for computing Fj. In summary, the order-/: Voronoi diagram for n sites in the plane can be computed in expected time 0{{k^{n — k))\ogn + nk\o^n), and optimal 0(k(n — k)) deterministic space, by an online randomized incremental algorithm. Full details and the following extensions are given in [31]. Deletion of a site can be done in the reverse order of insertion, again by computing a convex hull. The historybased point location structure used by the algorithm can be adapted to support ^-nearest neighbor queries (see Subsection 5.1.1). A dynamic data stmcture is obtained, allowing for insertions and deletions of sites in expected time 0(k^ \ogn -\- klog^ n), and A:-nearest neighbor queries in expected time 0(klog^n). This promises a satisfactory performance for small values of k.

Voronoi diagrams

239

4.4. Generalized sites It is commonly agreed that most geometric scenarios can be modeled with sufficient accuracy by polygonal objects. Two typical and prominent examples are the description of the workspace of a robot moving in the plane, and the geometric information contained in a geographical map. In both applications, robot motion planning and geographical information systems, the availability of proximity information for the scenario is crucial. This is among the reasons why considerable attention has been paid to the study of Voronoi diagrams for polygonal objects. Still, in some applications the scenario can be modeled more appropriately when curved objects, for instance, circular arcs are also allowed. Many Voronoi diagram algorithms working for line segments can be modified to work for curved objects as well. 4.4.1. Line segment Voronoi diagram and medial axis. Let G be a planar straight line graph on n points in the plane, that is, a set of non-crossing fine segments spanned by these points. For instance, G might be a tree, or a collection of disjoint line segments or polygons, or a complete triangulation of the points. The number of segments of G is maximum, 3n — 6, in the last case. We will discuss several types of diagrams for planar straight line graphs in the present and following subsections. The classical type is the {closestpoint) Voronoi diagram, V(G), of G. It consists of all points in the plane which have more than one closest segment in G. V{G) is known under different names in different areas, for example, as the line Voronoi diagram or skeleton of G, or as the medial axis when G is a simple polygon. Applications in such diverse areas as biology, geography, pattern recognition, computer graphics, and motion planning exist; see, e.g. Kirkpatrick [161] and Lee [180] for references. See Figure 20. V{G) is formed by straight line edges and parabolically curved edges, both shown as dashed lines. Straight edges are part of either the perpendicular bisector of two segment endpoints, or of the angular bisector of two segments. Curved edges consist of points equidistant from a segment endpoint and a segment's interior. There are two types of vertices, namely of type 2 having degree two, and of type 3 having degree three (provided G is in general position). Both are equidistant from a triple of objects (segment or segment endpoint), but for type-2 vertices the triple contains a segment along with one of its endpoints. Together with G's segments, the edges of V(G) partition the plane into regions. These can be refined by introducing certain normals through segment endpoints (shown dotted in Figure 20), in order to delineate/ace^ each of which is closest to a particular segment or segment endpoint. Two such normals start at each segment endpoint where G forms a reflex angle, and also at each terminal of G which is an endpoint belonging to only one segment in G. A normal ends either at a type-2 vertex of V(G) or extends to infinity. It is well known that the number of faces, edges and vertices of V{G) is linear in n, the number of segment endpoints for G. The number of vertices is shown to be at most An — 3 in Lee and Drysdale [182]. An exact bound, that also counts the 'infinite' vertices at unbounded edges and segment normals, is given below.

240

F. Aurenhammer

and R. Klein

..6

Fig. 20. Line segment Voronoi diagram.

LEMMA 4.4. Let G be a planar straight line graph on n points in the plane, and let G realize t terminals and r reflex angles. The number of {finite and infinite) vertices of V{G) is exactly 2n -\-1 -\- r — 2. PROOF. Suppose first that G consists of e disjoint segments (that do not touch at their endpoints). Then there are e regions, and each type-3 vertex belongs to three of them. By the Euler formula for planar graphs, there are exactly 2^ — 2 such vertices, if we also count those at infinity. To count the number of type-2 vertices, observe that each segment endpoint is a terminal and gives rise to two segment normals each of which, in turn, yields one (finite or infinite) vertex of type 2. Hence there are 4e such vertices, and 6^ — 2 vertices in total. Now let G be a general planar straight line graph with e segments. We simulate G by disjoint segments, by shortening each segment slightly such that the segment endpoints are in general position. Then we subtract from 6^ — 2 the number of vertices which have been generated by this simulation.

Voronoi diagrams

241

Consider an endpoint p that is incident to J ^ 2 segments of G. Obviously, p gives rise to d copies in the simulation. The Voronoi diagram of these copies has d — 2 finite vertices, which are new vertices of type 3. As the sum of the degrees J > 2 in G is 2e — /, we get 2e — t — 2(n — t) new vertices in this way. Each convex angle at p gives rise to two new normals emanating at the respective copies of /?, and thus to two (finite) type-2 vertices. A possible reflex angle at p gives rise to one (finite or infinite) type-3 vertex, on the perpendicular bisector of the corresponding copies of p. There are r reflex angles in G, and thus 2e — t — r convex angles. This gives D r + 2(2^ — t — r) new vertices in addition. The lemma follows by simple arithmetic. Surprisingly, the number of edges of G does not influence the bound in Lemma 4.4. The maximum number of vertices, ?>n — 2, is achieved, for example, if G is a set of disjoint segments {t = n and r = 0), or if G is a simple polygon P (t = 0 and r =n). In the latter case, the majority of appHcations concerns the part of V(P) interior to P. This part is commonly called the medial axis of P. The medial axis of an n-gon with r reflex interior angles has a tree-like structure and realizes exactly n -\- r — 2 vertices and at most 2(n + r) — 3 edges. Lee [180] first mentioned this bound, and also listed some applications of the medial axis. An interesting application to NC pocket machining is described in Held [139]. Several algorithms for computing V{G), for general or restricted planar straight line graphs G, have been proposed and tested for practical efficiency. V (G) can be computed in 0{n logn) time and 0{n) space by divide & conquer (Kirkpatrick [161], Lee [180], and Yap [261]), plane sweep (Fortune [125]), and randomized incremental insertion (Boissonnat et al. [43] and Klein et al. [170]). Burnikel et al. [51] give an overview of existing methods, and discuss implementation details of an algorithm in Sugihara et al. [243] that first inserts all segment endpoints, and then all the segments, of G in random order. An algorithm of comparable simplicity and practical efficiency (though with a worst-case running time of 0(n^)) is given in Gold et al. [130]. They first construct a Voronoi diagram for point sites by selecting one endpoint for each segment, and then maintain the diagram while expanding the endpoints, one by one, to their corresponding segments. During an expansion, the resulting topological updates in the diagram can be carried out efficiently. In fact, Voronoi diagrams for moving point sites are well-studied concepts; see, e.g. Guibas et al. [134] and Roos [221]. An efficient 0{n\o^n) work parallel algorithm for computing V(G) is given in Goodrich et al. [132]. This is improved to O(logn) parallel (randomized) time using 0(n) processors in Rajesekaran and Ramaswami [218]. (The latter result also implies an optimal parallel construction method for the classical Voronoi diagram.) If G is a connected graph then V{G) can be computed in randomized time 0{n log* n)\ see Devillers [88]. Recently, 0{n) time randomized, and deterministic, algorithms for the medial axis of a simple polygon have been designed by Klein and Lingas [169] and Chin et al. [68], settling open questions of long standing. The case of a convex polygon is considerably easier; see Subsection 4.4.3. Some of the algorithms above also work for curved objects. The plane-sweep algorithm in Fortune [125] elegantly handles arbitrary sets of circles (i.e., the additively weighted

242

F. Aurenhammer and R. Klein

Voronoi diagram, or Johnson-Mehl model) without modification from the point site case. Yap [261] allows sets of disjoint segments of arbitrary degree-two curves. A randomized incremental algorithm for general curved objects is given in Alt and Schwarzkopf [12]. They show that complicated curved objects can be partitioned into 'harmless' ones by introducing new points. All these algorithms achieve an optimal running time, 0{n \ogn). In dimensions more than two, the known results are sparse. The complexity of the Voronoi diagram for n line segments in J-space may be as large as Q{n^~^), as was observed by Aronov [17]. By the relationship of Voronoi diagrams to lower envelopes of hypersurfaces (see Subsection 4.6), the results in Sharir [234] imply an upper bound of roughly O(n^). No better upper bounds are known even for line segments in 3-space. The Voronoi diagram for n spheres in J-space has a size of only 0(nL^/^^+^), by its relationship to power diagrams proved in Aurenhammer and Imai [30]. A case of particular interest in several applications is the medial axis M(P) of a (generally non-convex) polyhedron P in 3-space. M(P) contains pieces of parabolic and hyperbolic surfaces and thus has a fairly complicated structure. A practical and numerically stable algorithm for computing M(P) is proposed in Milenkovic [198]. 4.4.2. Straight skeletons. In comparison to the Voronoi diagram for point sites, which is composed of straight edges, the occurrence of curved edges in the line segment Voronoi diagram V(G) is a disadvantage in the computer representation and construction, and sometimes also in the application, of V(G). There have been several attempts to linearize and simplify V(G), mainly for the sake of efficient point location and motion planning; see Canny and Donald [54], Kao and Mount [155], de Berg et al. [80], and McAlhster et al. [191]. The compact Voronoi diagram in [191] is particularly suited to these applications. It is defined for the case where G is a set of k disjoint convex polygons. Its size is only 0(k), rather than 0(n), and it can be computed in time 0(k logn); see Subsection 5.1.1 for more details. As a different alternative to V(G), we now describe the straight skeleton, S(G), of a planar straight line graph G. This structure is introduced, and discussed in much more detail, in Aichholzer and Aurenhammer [9]. 5(G) is composed of angular bisectors and thus does not contain curved edges. In general, its size is even less than that of V(G). Beside its use as a type of skeleton for G, 5(G) applies, for example, to the reconstruction of terrains from a given geographical map as will be sketched later. 5(G) is defined as the interference pattern of certain wavefronts propagated from the segments and segment endpoints of G. Let F be a connected component (called SL figure) of G. Imagine F as being surrounded by a belt of (infinitesimally small) width e. For example, a single segment s gives rise to a rectangle of length l^l -|- 26: and width 2s, and a simple polygon P gives rise to two homothetic copies of P with minimum distance 2s. In general, if F partitions the plane into c connected faces then F gives rise to c simple polygons called wavefronts for F. The wavefronts arising from all the figures of G are now propagated simultaneously, at the same speed, and in a self-parallel manner. Wavefront vertices move on angular bisectors of wavefront edges which, in turn, may increase or decrease in length during the propagation. This situation continues as long as wavefronts do not change combinatorially. Basically, there are two types of changes.

Voronoi diagrams

243

Fig. 21. Straight skeleton.

(1) Edge event: A wavefront edge collapses to length zero. (The wavefront may vanish due to three simultaneous edge events.) (2) Split event: A wavefront edge splits due to interference or self-interference. In the former case, two wavefronts merge into one, whereas a wavefront splits into two in the latter case. After either type of event, we are left with a new set of wavefronts which are propagated recursively. The edges of 5(G) are just the pieces of angular bisectors traced out by wavefront vertices. Each vertex of 5(G) corresponds to an edge event or to a split event. S{G) is a unique structure defining a polygonal partition of the plane; see Figure 21. During the propagation, each wavefront edge e sweeps across a certain area which we call ihtface of e. Each segment of G gives rise to two wavefront edges and thus to two faces, one on each side of the segment. Each terminal of G (endpoint of degree one) gives rise to one face. Faces can be shown to be monotone polygons and thus are simply connected. This gives a total of 2m + ^ = 0(^2) faces, if G realizes m edges and t terminals. There is also an exact bound on the number of vertices of S{G).

244

F. Aurenhammer and R. Klein

4.5. Let G be a planar straight line graph on n points, t of which are terminals. The number of (finite and infinite) vertices of S(G) is exactly 2n-\-t — 2.

LEMMA

From Lemma 4.4 in the previous subsection it is apparent that 5(G) has r vertices less than V{G) if G has r reflex angles. In particular, if G is a simple polygon with r reflex interior angles, then the part of S{G) interior to G is a tree with only n — 2 vertices, whereas the medial axis of G has n-\-r — 2 vertices. A wavefront model similar to that yielding S{G) is sometimes used to define the Voronoi diagram V{G) of G (cf. the expanding waves view in Section 2). There, the propagation speed of all points on the wavefront is the same, whereas, in the model for 5(G), the speed of each wavefront vertex is controlled by the angle between its incident wavefront edges. The sharper the angle, the faster is the movement of the vertex. This behaviour may make 5(G) completely different from the Voronoi diagram of G. It can be shown that, without prior knowledge of its structure, S(G) cannot be defined by means of distances from G. Moreover, S{G) does not fit into the framework of abstract Voronoi diagrams described in Subsection 4.6: The bisecting curve for two segments of G would be the interference pattern of the rectangular wavefronts they send out, but these curves do not fulfill condition (ii) in Definition 4.2. As a consequence, the well-developed machinery for constructing Voronoi diagrams (see Section 3) does not apply to S{G). An algorithm that simulates the wavefront propagation by maintaining a triangulation of the wavefront vertices is given in [9]. The method is simple and practically efficient but has a worst-case running time of 0(/i^ log«). S{G) has a three-dimensional interpretation, obtained by defining the height of a point X in the plane as the unique time when x is reached by a wavefront. In this way, S{G) lifts up to a polygonal surface EG, where points on G have height zero. In a geographical application, G may delineate rivers, lakes, and coasts, and Ec represents a corresponding terrain with fixed slope. EG has the nice property that every raindrop that hits a terrain facet / runs off to the segment or terminal of G defining / ; see Aichholzer et al. [8]. This may have applications in the study of rain water fall and its impact on the floodings caused by rivers in a given geographic area. The concept of 5(G) can be generalized by tuning the propagation speed or angle of the individual wavefront edges, in order to achieve prescribed facet slopes for EG, or individual elevations for the terrain points on G. The size of 5(G), and its construction algorithm, remain unaffected. When restricted to the interior of a simple polygon P, Ep is used in [8] as a canonical construction of a roof of given slope above P. For rectilinear (and axis-aligned) polygons P, the medial axis of P in the Loo-metric will do the job. 5(P) coincides with this structure for such polygons, and thus generalizes this roof construction technique to general shapes of P. Straight skeletons can be generalized to higher dimensions without much difficulties. They retain their piecewise-linear shape and thus, for example, offer a simpler alternative to the medial axis of a non-convex polyhedron in 3-space. 4.4.3. Convex polygons. Voronoi diagrams for a single convex polygon have a particularly simple structure. Tailor-made algorithms for their construction have been designed.

Voronoi diagrams

245

Let C be a convex n-gon in the plane. The medial axis M{C) of C is a tree whose edges are pieces of angular bisectors of C's sides. In fact, M{C) coincides with the part of the straight skeleton S{C) interior to C. M{C) realizes exactly n faces, n — 2 vertices, and 2/1 — 3 edges. There is a simple randomized incremental algorithm by Chew [62] that computes M{C) in 0{n) time. The algorithm first removes, in random order, the halfplanes whose intersection is C. Removing a halfplane means removing the corresponding side e, and extending the two sides adjacent to e so that they become adjacent in the new convex polygon. This can be done in constant time per side. The adjacency history of C is stored. That is, for each removed side e, one of its formerly adjacent sides is recorded. In a second stage, the sides are put back in reversed (still randomized) order, and the medial axis is maintained during these insertions. Let us focus on the insertion of the /-th side et. We have to integrate the face, /(e/), of Ci into the medial axis of the / — 1 sides that have been inserted before et. From the adjacency history, we already know a side e' of the current polygon that will be adjacent to et after its insertion. Hence we know that the angular bisector of et and e' will contribute an edge to /(e/). Having a starting edge available in 0(1) time, the face /(^/) now can be constructed in time proportional to its size. We construct /(^/) edge by edge, by simply tracing and deleting parts of the old medial axis interior to / ( ^ / ) . As the medial axis of an /-gon has 2/ — 3 edges, and each edge belongs to two faces, the expected number of edges of a randomly chosen face is less than 4. Thus fiei) can be constructed in constant expected time, which gives an 0{n) randomized algorithm for computing M{C). The same technique also applies to the Voronoi diagram for the vertices of a convex n-gon C, that is, to the Voronoi diagram of a set Sofn point sites in convex position. By Lemma 2.2, all regions in V{S) are unbounded, and the edges of V{S) form a tree. Hence V{S) has the same numbers of edges and (finite) vertices as the medial axis of C. For each p e S, its region VR(/?, S) shares an unbounded edge with the regions YR(p\ S) and YR(p^\ 5), where p' and p^^ are adjacent to p on the convex hull of S (which is the polygon C). An adjacency history can be computed in 0(n) time, by removing the sites in random order and maintaining their convex hull. For each site that is re-inserted, the expected number of edges is less than 4. So an 0(n) randomized construction algorithm is obtained. The diagrams V(S) and M(C) can also be computed in deterministic linear time; see Aggarwal et al. [4]. The details of this algorithm are much more involved, however. 4.4.4. Constrained Voronoi diagrams and Delaunay triangulations. In certain situations, unconstrained proximity among a set of sites is not enough information to meet practical needs. There might be reasons for not considering two sites as neighbors although they are geometrically close to each other. For example, two cities that are geographically close but separated by high mountains might be far from each other from the point of view of a truck driver. The concepts described below have been designed to model constrained proximity among a set of sites.

F. Aurenhammer

246

and R. Klein

Fig. 22. Bounded Voronoi diagram extended, and its dual.

Let 5 be a set of n point sites in the plane, and let L be a set of non-crossing line segments spanned by S. Note that \L\ ^3n — 6. The segments in L are viewed as obstacles: we define the bounded distance between two points x and y in the plane as

b{x,y) =

d{x,y)

\ixyr\L = 9i,

oo

otherwise,

where d stands for the Euclidean distance. In the resulting bounded Voronoi diagram y ( 5 , L), regions of sites that are close but not visible from each other are clipped by segments in L. Regions of sites being segment endpoints are nonconvex near the corresponding segment; see Figure 22. The dual of V{S, L) is not a full triangulation of S, even if the segments in L are included. However, V{S, L) can be modified to dualize into a triangulation which includes L and, under this restriction, is as much 'Delaunay' as possible. The modification is simple but nice. For each segment € G L, the regions clipped by I from the right are extended to the left of £, as if only the sites of these regions were present. The regions clipped by I from the left are extended similarly; see Figure 22. Of course, extended regions may overlap now, so they fail to define a partition of the plane. If we dualize now by connecting sites of regions that share an edge, a full triangulation that includes L is obtained: the constrained Delaunay triangulation Yyi{S, L). It is clear that the number of edges of DT(5', L) is at most 3n — 6, and that, in general, the number of edges of V(5, L) is even less. Hence both structures have a linear size.

Voronoi diagrams

247

The original definition of DT(5, L) in Lee and Lin [183] is based on a modification of the empty circle property: DTC^, L) contains L and, in addition, all edges between sites p,q e S that have b(p,q) < oo and that lie on a circle enclosing only sites r e S with at least one of b(r, p), b(r, q) = oo. Algorithms for computing V(S, L) and DTC^", L) have been proposed in Lee and Lin [183], Chew [63], Wang and Schubert [255], Wang [254], Seidel [228], and Kao and Mount [156]. The last two methods seem best suited to implementation. For an application of DT(»S, L) to quality mesh generation see Chew [65]. We sketch the 0(n logn) time plane sweep approach in [228]. If only V{S, L) is required then the plane sweep algorithm described in Subsection 3.4 can be applied without much modification. If DT(5, L) is desired then the extensions of V{S, L) as described above are computed in addition. To this end, an additional sweep is carried out for each segment i e L. The sweep starts from the line through i in both directions. It constructs, on the left side of this line, the (usual) Voronoi diagram of the sites whose regions in V(S, L) are clipped by I from the right, and vice versa. The special case where S and L are the sets of vertices, and sides, of a simple polygon has received special attention, mainly because of its applications to visibility problems in polygons. The bounded Voronoi diagram V{S, L) is constructable in 0(n) randomized time in this case; see Klein and Lingas [167]. If the Li-metric instead of the Euclidean metric is used to measure distances, the same authors [169] give a deterministic linear time algorithm. Both algorithms, as well as the linear time medial axis algorithms in [168] and in [68], first decompose the polygon into smaller parts called histograms. These are polygons whose vertices, when considered in cyclic order, appear in sorted order in some direction. An alternative concept that forces a set L of line segments spanned by S into DT(*S') is the conforming Delaunay triangulation. For each segment i E L that does not appear in DTC^), new sites on I are added such that i becomes expressible as the union of Delaunay edges in DT(5' U C), where C is the total set of added sites. For several site adding algorithms, \C\ depends on the size as well as on the geometry of L. See, e.g., the survey article by Bern and Eppstein [37] and references therein. Edelsbrunner and Tan [118] show that \C\= 0(k^n) is always sufficient, and construct a set of sites with this size in time

0{k^n-\-n^)Jork=\L\. A different, and more complicated, type of constrained Voronoi diagram is the geodesic Voronoi diagram. Here, the distance between a point site p and a point x in the plane is equal to the length of the shortest obstacle-avoiding path between p and x. The obstacles are usually modeled by a set of non-crossing line segments. If all segment endpoints are sites then the bounded Voronoi diagram is obtained. However, this is typically not the case. The fact that computing geodesic distances is not a constant-time operation complicates the construction of geodesic Voronoi diagrams. The only known subquadratic algorithm is by Mitchell [199]. An 0((^ -h k) log(n + k)) time algorithm for the geodesic Voronoi diagram of k sites inside a simple n-gon is given in Papadopoulou and Lee [212], improving over an earlier approach in Aronov [16].

248

F. Aurenhammer and R. Klein

4.5. Generalized spaces and distances So far we have mainly discussed Voronoi diagrams of sites in J-space, that are defined with respect to the Euchdean distance function. Now we want to generaUze both the space in which the sites are situated and the distance measure used; but we shall only discuss the case of point sites. The main questions are which of the structural properties the standard Voronoi diagram enjoys will be preserved, and will the remaining properties be strong enough to apply one of the algorithmic approaches for computing the Voronoi diagram introduced in Section 3. 4.5.1. Generalized spaces. Since the surface of earth is not flat, it seems very natural to ask about Voronoi diagrams of point sites on curved surfaces in 3-space. The distance between two points on the surface is the minimum Euclidean length of a curve that connects the points and runs entirely inside the surface. Such a curve will be called a shortest path. Brown [50] has addressed the Voronoi diagram of points on the surface of the twodimensional sphere. Here great circles play the role of lines in the Euchdean plane. In fact, the bisector of two points is a great circle, and the shortest paths are segments of great circles, too. (One can show that the only other metric space in which all bisector segments are shortest paths is the hyperbolic space; see Busemann [52].) For each pair of antipodal points on the sphere there is a continuum of shortest paths connecting them. But this does not affect the Voronoi diagram of n points; it can be computed in optimal 0(/i log n) time and linear space, by adaption of the algorithms mentioned in Section 3. Quite different is the situation on the surface of a cone. In order to determine the bisector of two points, p and q, we can cut the cone along a halfline emanating from the apex, and unfold it; in Figure 23 the halfline diametrically opposed to p has been chosen. Since curve length does not change in this process, each shortest path on the cone that does not cross the cut is transformed into a shortest path in the plane, i.e. into a line segment. In order to represent those shortest paths that cross the cut, we add to the unfolded cone two more copies, as shown in Figure 23(ii). Now the shortest path on the cone from some point x to site q corresponds to the shortest one of the line segments 'qx, q'x, and q^'x. This explains why the unfolded bisector B(p,q) consists of segments of the planar bisectors of p,q and

p,q\ In spite of this strong connection to the plane, the Voronoi diagram of points on a cone has structural properties surprisingly different from the planar Voronoi diagram. If the unfolded cone forms a wedge of angle less than 180° then the bisector of two points can be a closed curve. If three points p,q,r are placed, in this order, on a halfline emanating from the apex of such a cone, the bisector B(q, r) fully encircles B{p, q) which in turn encircles the apex. This causes the Voronoi region of q in V{{p,q, r}) to be not simply connected. Also, the closures of two Voronoi regions can have more than one Voronoi edge in common. Such a situation is shown in Figure 24, on the unfolded cone. The bisectors of the three points cross twice, at the Voronoi vertices v and w\ the latter happens to lie on the cut. (It is interesting to observe that none of these phenomena occurs on the sphere, although there, too, bisectors are closed curves and cross twice.) Despite these fundamental differences to the plane, the Voronoi diagram of n points on the surface of a cone can be constructed in optimal time and space, using a sweep circle that

Voronoi diagrams

249

Fig. 23. A cone sliced and unfolded, showing the bisector of p and q.

Fig. 24. The common border of the Voronoi regions of q and r consists of two Voronoi edges.

expands from the apex; see Dehne and Klein [83]. This approach works without unfolding the cone. Mazon and Recio [190] have independently pointed out the algebraic background of the unfolding procedure illustrated by Figure 23(i), and obtained the following generalization.

250

F. Aurenhammer and R. Klein

Let P denote the Euclidean plane or two-dimensional sphere, and let G be a discrete group of motions on P: a group of bijections that leave the distance between any pair of points of P invariant, such that for each point p e P there exists a constant c satisfying

Pl^gip)"^

\p-gip)\

^c

for all motions g eG. Examples in the plane are the group generated by a rotation of rational angle about some given point, or the group generated by two translations that move each point afixeddistance to the right and a fixed distance upwards, respectively. In the 19th century, mathematicians have completely classified all discrete groups. Two points p, p^ e P axQ equivalent if there exists a motion in G that takes pio p'', the equivalence class, [/?], of p is called the orbit of p. The quotient space, P/G, consists of all orbits. In order to geometrically represent P/G one starts with a connected subset of P that contains a representative out of every orbit; equivalent points must be on the boundary. Such a set is called a fundamental domain, if it is convex. The following lemma provides a nice way of obtaining a fundamental domain; a proof can be found in Ehrlich and Im Hof[120]. 4.6. Let p be a point of P that is left fixed only by the unit element ofG. Then its Voronoi region VR(/7, [p]) is a fundamental domain.

LEMMA

In Figure 23(ii), for example, the point set {p, p\ p") is the orbit of p under a clockwise rotation by 120°. The Voronoi region VR(/7, {/?, p\ p'^]) equals the master copy of the unfolded cone, as drawn by solid lines. Each interior point x is the only point of [x] contained in this region, only the points on the boundary (i.e. the cut) of the unfolded cone are mapped into each other by rotation. If we identify these two halflines we obtain the cone depicted in Figure 23(i), a model of the quotient space of the Euclidean plane over the cyclic group of order 3. In a similar way we would obtain a rectangle as fundamental domain of the group of two translations mentioned above, and identifying opposite edges would result in a torus. If we want to compute the Voronoi diagram of a set S of point sites on a surface associated with such a quotient space P/G,WQ can proceed as follows. Let So denote a set of representatives of 5 in a fundamental domain D c P. First, we compute the Voronoi diagram V([5o]), where [So] denotes the union of the orbits of the elements of 5o, an infinite but periodic set. Due to [190], ^([^o]) can be obtained by applying the motions in G to the Voronoi diagram of a finite set of points of 5o and translated copies of ^oTHEOREM

4.7. There exists a finite subset U of [So] such that V([So]) = [V(U) (1 D]

holds. If one removes from y([5o]) all Voronoi edges that separate points of the same orbit and intersects the resulting structure with the fundamental domain D, the desired diagram V(S) results, after identifying equivalent points. Although the set ^o can be constructed effectively, it seems hard to establish an upper bound for the efficiency of this step.

Voronoi diagrams

Fig. 25. By dc ip,q) = ,.

251

/. a convex distance function dc with unit circle C is defined.

To mention a few other spaces considered, Ehrlich and Im Hof [120] have studied, from a differential geometrist's point of view, structural properties of the Voronoi diagram in such Riemannian manifolds where any two points are connected by a unique shortest path. In order to compute the Voronoi diagram of n points on SL polyhedral surface in 3-space containing m vertices, one can make use of its discrete structure and apply the continuous Dijkstra technique usually employed for computing shortest paths. It allows the Voronoi diagram to be computed in O(A^^logiV) time and O(N^) space, where A^ = max(m, n); see Mitchell et al. [200]. 4.5.2. Convex distance functions. In numerous appHcations the Euclidean metric does not provide an appropriate way of measuring distance. In the following subsections we consider the Voronoi diagram of point sites under distance measures different from the Euclidean metric. We start with convex distance functions, a concept that generalizes the Euchdean distance but slightly. Whereas this generalization does not cause serious difficulties in the plane, surprising changes will occur as we move to 3-space. Let C denote a compact, convex set in the plane that contains the origin in its interior. Then a convex distance function can be defined in the following way. In order to measure the distance from a point p to some point q, the set C is translated by the vector p. The half line from p through q intersects the boundary of C at a unique point q'\ see Figure 25. Now one puts

d{p,q) dc(p,q) = ~ -. d{p,q') By definition, C equals the unit circle of d, that is, the set of all points q satisfying dc(0,q) ^ 1. The value of dc(p,q) does not change if both p and q are translated by the same vector. One can show that the triangle inequality dc(p,r) ^dc(p,q) -\-dc(q,r) is fulfilled, with equality holding for colinear points p,q,r.ln general, we have dc(p,q) = dc'iq, p), where C' denotes the reflected image of C about the origin. We can define the Voronoi diagram based on an arbitrary convex distance function by associating with each site p all points x of the plane such that dc(p,x) = 0, ay^^ - 2Py^j,y + yy^^ = 0, where

p = x^Xy + y^yv

y = ^l + yl'

Mesh generation

303

Software designed to solve these systems often includes an additional source term on the right-hand sides of the harmonic system in (4) to control the local point spacing in the domain [129]. The elliptic method just discussed, though motivated by conformal mapping, does not compute true conformal mappings. A true conformal mapping induces a structured mesh with certain advantages; for example, the Laplacian is the limit of the second-order difference on such a grid. True conformal mapping, however, does not seem to be widely used in mesh generation, perhaps because algorithms to compute such mappings are relatively slow, or because they do not allow local control of point spacing. In the case that ^ is a simple polygon, the Schwarz-Christoffel formula offers an explicit form for the conformal mappings from the unit disk D io Q. Such a mapping can in turn be used to find conformal mappings from ^ to a square or rectangle. Let the points in the complex plane defining the polygon (in counterclockwise order) be z i , . . . , Z/i, the interior angles at these points be a i , . . . , a ^ , and define the normalized angles as P/^=ak/7t — 1. Using coi,.. .,(On as the preimages of z\, • - •,Zn on the edge of the disk, the Schwarz-Christoffel formula gives the form of the conformal mapping as f{a,) = A-\-B

f](l-§M)^^df •^^

(5)

k=\

There are several programs available to solve for the unknown cok values: SCPACK by Trefethen [133], the SC Toolbox by Driscoll [47], and CRDT by DriscoU and Vavasis [48]. One difficulty in the numerical solution is "crowding", enormous variation in spacing between the (Dk points. CRDT, the latest and apparently best Schwarz-Christoffel algorithm, overcomes this difficulty by repeatedly remapping so that crowding does not occur near the points being evaluated.

5. Unstructured two-dimensional meshes We have already mentioned the advantages of unstructured meshes: flexibility in fitting complicated domains, rapid grading from small to large elements, and relatively easy refinement and derefinement. Unlike structured mesh generation, unstructured mesh generation has been part of mainstream computational geometry for some years, and there is a large literature on the subject. We consider three principled approaches to unstructured mesh generation in some detail; these approaches use Delaunay triangulation, constrained Delaunay triangulation, and quadtrees. Then we discuss mesh refinement and improvement. In the final section, we describe some geometric problems abstracted from unstructured mesh generation.

5.1. Delaunay triangulation Our first approach to unstructured mesh generation partitions the task into two phases: placement of mesh vertices, followed by triangulation. (Added points are called Steiner

304

M. Bern and P. Plassmann

Mesh

generation

305

Fig. 6. Delaunay triangulation of points placed by an advancing front (T. Barth).

Fig. 7. (a) Delaunay triangulation. (b) A reversed quadrilateral.

There are a number of practical Delaunay triangulation algorithms [56]. We describe only one, called the edge flipping algorithm, because it is most relevant to our subsequent discussion. Its worst-case running time of O(n^) is suboptimal, but it performs quite well in practice. The edge flipping algorithm starts from any triangulation of S and then locally optimizes each edge. Let e be an internal (non-convex-hull) edge and Qe be the triangulated quadrilateral formed by the triangles sharing e. Quadrilateral Qe is reversed if the two angles without the diagonal sum to more than 180°, or equivalently, if each triangle circumcircle contains the opposite vertex as in Figure 7(b). If Qe is reversed, we "flip" it by exchanging e for the other diagonal. compute an initial triangulation of S place all internal edges onto a queue while the queue is not empty do remove the first edge e if quadrilateral Qe is reversed then flip it and add the outside edges of Qe to the queue endif endwhile An initial triangulation can be computed by a sweep-line algorithm. This algorithm adds the points of S by x-coordinate order. Upon each addition, the algorithm walks around the

306

M. Bern and P. Plassmann ^4.

Fig. 8. A sweep-line algorithm for computing an initial triangulation.

convex hull of the already-added points, starting from the rightmost previous point and adding edges until the slope reverses, as shown in Figure 8. The following theorem [45] guarantees the success of edge flipping: a triangulation in which no quadrilateral is reversed must be a completion of the Delaunay triangulation.

5.2. Constrained Delaunay triangulation There is another way, besides conforming Delaunay triangulation, to extend Delaunay triangulation to polygonal domains. The constrained Delaunay triangulation of a (possibly multiple) domain ^ does not use Steiner points, but instead redefines Delaunay triangulation in order to force the edges of Q into the triangulation. A point p is visible to a point q'mQ li the open line segment pq Hes within Q and does not intersect any edges or vertices of ^ . The constrained Delaunay triangulation CDT(^) contains each triangle not cut by an edge of i?, that has an an empty circumcircle, where empty now means that the circle does not contain any vertices of Q visible to points inside the triangle. The visibility requirement means that external proximities, where ^ wraps around to nearly touch itself, have no effect. Figure 9 provides an example; here vertex v is not visible to any point in the interior of triangle abc. The edge flipping algorithm can be generalized to compute the constrained Delaunay triangulation, only this time we do not allow edges of I? onto the queue. Obtaining an initial triangulation is somewhat more difficult for polygonal domains than for point sets. The textbook by Preparata and Shamos [103] describes an 0(«logn)-time algorithm for computing an initial triangulation. This algorithm first adds edges to Q to subdivide it into easy-to-triangulate "monotone" faces. Ruppert [111], building on work of Chew [38], gave a mesh-generation algorithm based on constrained Delaunay triangulation. (Subsequently, Mitchell [90] sharpened Ruppert's analysis, and Shewchuk [117,118] further refined the algorithm and made an implementation available on the Web.) Ruppert's algorithm computes the constrained Delaunay triangulation at the outset and then adds Steiner points to improve the mesh, thus uniting the two phases of the approach described in the last section. In choosing this approach, the

Mesh

generation

307

Fig. 9. The constrained Delaunay triangulation of a polygon with holes.

Fig. 10. A mesh computed by Ruppert's algorithm (J. Ruppert).

user gives up some control over point placement, but obtains a more efficient mesh with fewer and "rounder" triangles. The first step of Ruppert's mesh generator cuts off all vertices of the domain Q at which the interior angle measures less than 45°. The cutting line at such a vertex v should not introduce a new small feature to ^ ; it is best to cut off an isosceles triangle whose base is about halfway from v to its closest visible neighbor. If v has degree greater than two, as might be the case in a multiple domain, then the bases of the isosceles triangles around v should match up so that no isosceles triangle receives a Steiner point on one of its legs. Next the algorithm computes the constrained Delaunay triangulation of the modified domain. The algorithm then goes through the loop given below. The last line of the loop repairs a constrained Delaunay triangulation after the addition of a new Steiner point c. To accomplish this step, there is no need to recompute the entire triangulation. The removed

308

M. Bern and P. Plassmann

old triangles are exactly those with circumcircles containing c, which can be found by searching outwards from the triangle that contains c, and the new triangles that replace the removed triangles must all be incident to the new vertex c. while there exists a triangle t with an angle smaller than 20° do let c be the center of r's circumcircle if c lies within the diameter semicircle of a boundary edge e then add the midpoint m of ^ else add c endif recompute the constrained Delaunay triangulation endwhile The loop is guaranteed to halt with all angles larger than 20°. At this point, the cutoff isosceles triangles are returned to the domain, and the mesh is complete. Ruppert's algorithm comes with a strong theoretical guarantee: all new angles, that is, angles not present in the input, are greater than 20°, and the total number of triangles in the mesh is at most a constant times the minimum number of triangles in any such no-small-angle mesh. To prove this efficiency result, Ruppert shows that each triangle in the final mesh is within a constant factor of the local feature size at its vertices. The local feature size at point p e Q is defined to be the radius of the smallest circle centered at p that touches two nonadjacent edges of the boundary; this is a spacing function intrinsic to the domain.

5.3. Quadtrees A quadtree mesh generator [8,25,143] starts by enclosing the entire domain ^ inside an axis-aligned square. It splits this root square into four congruent squares, and continues splitting squares recursively until each minimal — or leaf — square intersects ^ in a simple way. Further splits may be dictated by a user-defined spacing function or balance condition. Quadtree squares are then warped and cut to conform to the boundary. A final triangulation step gives an unstructured triangular mesh. We now describe a particular quadtree mesh generator due to Bern, Eppstein, and Gilbert [25]. As first presented, the algorithm assumes that ^ is a polygon with holes; however, the algorithm can be extended to multiple and even to curved domains. In fact, the quadtree approach handles curved domains more gracefully than the Delaunay and constrained Delaunay approaches, because the splitting phase can automatically adapt to the curvature of enclosed boundary pieces. The algorithm of Bern et al. splits squares until each leaf square contains at most one connected component of ^ ' s boundary, with at most one vertex. Mitchell and Vavasis [91] improved the splitting phase by "cloning" squares that intersect Q in more than one connected component, so that each copy contains only a single connected component of Q. The algorithm then splits squares near vertices of Q two more times, so that each vertex lies within a buffer zone of equal size squares. Next the mesh generator imposes a balance condition: no square should be adjacent to one less than one-half its size. This causes more splits to propagate across the quadtree, increasing the total number of leaf squares by a constant factor (at most 8). Squares are

Mesh

generation

309

Fig. 11. A mesh computed by a quadtree-based algorithm (S. Mitchell).

then warped to conform to the domain Q. Various warping rules work; we give just one possibihty. In the following pseudocode, \b\ denotes the side length of square b. for each vertex u of i? do let y be the closest quadtree vertex to v move y iov endfor for each leaf square b still crossed by an edge e do move the vertices of b that are closer than \b\/Aio eio their closest points on e endfor discard faces of the warped quadtree that lie outside Q Finally, the cells of the warped quadtree are triangulated so that all angles are bounded away from 0°. Figure 11 gives a mesh computed by a variant of the quadtree algorithm. This figure shows that cloning ensures appropriate element sizes around holes and "almost holes". Notice that a quadtree-based mesh exhibits preferred directions — horizontal and vertical. If this artifact poses a problem, mesh improvement steps can be used to redistribute element orientations. The quadtree algorithm enjoys the same efficiency guarantee as Ruppert's algorithm. In fact, the quadtree algorithm was the first to be analyzed in this way [25].

5.4. Mesh refinement and derefinement Adaptive mesh refinement places more grid points in areas where the PDF solution error is large. Local error estimates based on an initial solution are known as a posteriori error estimates [7] and can be used to determine which elements should be refined. For elliptic

310

M. Bern and P. Plassmann

problems these estimators asymptotically bound the true error and can be computed locally using only the information on an element [138]. One approach to mesh refinement [71] iteratively inserts extra vertices into the triangulation, typically at edge bisectors or triangle circumcenters as in Section 5.2. New vertices along the boundaries of curved domains should be computed using the curved boundary rather than the current straight edge, thereby giving a truer approximation of the domain as the mesh refines [36]. Iterative vertex insertion may be viewed as a mesh improvement step (Section 5.5), and indeed several generators [29,119,139] have combined insertion/deletion, flipping, and smoothing into a single loop. Iterative vertex insertion gives a finer mesh, but not a nesting or edge conforming, refinement of the original mesh, meaning a mesh that includes the boundaries of the original triangles. Nesting refinements simplify the interpolation step in the multigrid method (Section 2.2). To compute such a refinement, we turn to another approach. This approach splits triangles in need of refinement, by adding the midpoints of sides. The pseudocode below gives the overall approach. solve the differential equation on the initial mesh TQ estimate the error on each triangle while the maximum error on a triangle is larger than the given tolerance do based on error estimates, mark a set of triangles Sk to refine * divide the triangles in Sk, along with adjacent invalid triangles to get T^^i solve the differential equation on T^+i estimate the error on each triangle k = k+\ endwhile There are a number of popular alternatives for step *, in which the current mesh Tk is adaptively refined. In regular refinement [11,12], the midpoints of the sides of a marked triangle are connected, as in Figure 12(b), to form four similar triangles. Unmarked triangles that received two or three midpoints are split in the same way. Unmarked triangles that received only one midpoint are bisected by connecting the midpoint to the opposite vertex as in Figure 12(a). Before the next iteration of •, bisected triangles are glued back together and then marked for refinement; this precaution guarantees that each triangle in Tk^\ will either be similar to a triangle in To or be the bisection of a triangle similar to a triangle in TQ. Thus, regular refinement — regardless of the number of times through the refinement loop — produces a mesh with minimum angle at least half the minimum angle in 7b. Hence the angles in T^+i are bounded away from 0 and n. Rivara [107-109] proposed several alternatives for step • based on triangle bisection. One method refines each marked triangle by cutting from the opposite vertex to the midpoint of the longest edge. Neighboring triangles are now invalid, meaning that one side contains an extra vertex; these triangles are then bisected in the same way. Bisections continue until there are no remaining invalid triangles. Refinement can propagate quite far from marked triangles; however, propagation cannot fall into an infinite loop, because along a propagation path each bisected edge is longer than its predecessor. This approach, like the previous one, produces only a finite number of different triangle shapes — similarity

Mesh

generation

311

Fig. 12. A triangle divided by (a) bisection, and (b) regular refinement.

Fig. 13. The bisection algorithm given in the pseudocode splits invalid children of refined triangles to their subdivision points, rather than to their longest edges.

classes — and the minimum angle is again at least half the smallest angle in TQ. Quite often longest-edge refinement actually improves angles. A second Rivara refinement method is given in the pseudocode below and illustrated in Figure 13. This method does not always bisect the longest edge, so bisections tend to propagate less, yet the method retains the same final angle bound as the first Rivara method. Qi = Sk {Q denotes "marked" triangles to be refined} Ri =0 {R denotes children of refined triangles} while (Q/U/?/) 7^0 do bisect each triangle in Qi across its longest edge bisect each triangle in Rt across its subdivided edge add all invalid children of Qi triangles to Ri^\ add all other invalid triangles to 2/+i /= /+1 endwhile We now discuss the reverse process: coarsening or derefinement of a mesh. This process helps reduce the total number of elements when tracking solutions to time-varying differential equations. Coarsening can also be used to turn a single highly refined mesh into a sequence of meshes for use in the multigrid method [98]. Figure 14 shows a sequence of meshes computed by a coarsening algorithm due to Ollivier-Gooch. The algorithm marks a set of vertices to delete from the fine mesh, eliminates all marked vertices, and then retriangulates the mesh. The resulting mesh is node

312

M. Bern and P. Plassmann

Fig. 14. A sequence of meshes used by the multigrid method for solving the Unear systems arising in modeUng airflow over an airfoil (C. OUivier-Gooch).

conforming, meaning that every vertex of the coarse mesh appears in the fine mesh, but not edge conforming. One difficulty is that the shapes of the triangles degrade as the mesh is coarsened, due to increasing disparity between the interior and boundary point densities. Meshes produced by refinement methods are typically easier to coarsen than are less hierarchical meshes such as Delaunay triangulations. Teng, Talmor, and Miller [87] have recently devised an algorithm using Delaunay triangulations of well-spaced point sets, which produces a sequence of bounded-aspect-ratio, node-conforming meshes of approximately minimum depth.

5.5. Mesh improvement The most common mesh improvement techniques are flipping and smoothing. These techniques have proved to be very powerful in two dimensions, and together they can transform very poor meshes into very good ones, so long as the mesh starts with enough vertices. Flipping exchanges the diagonals of a triangulated quadrilateral as in the edge flipping algorithm for computing Delaunay triangulation (Section 5.1), only the criterion for making the exchange need not be the Delaunay empty circle test. Flipping can be used to regularize vertex degrees, minimize the maximum angle, or improve almost any other quality measure of triangles. For quality measures optimized by the Delaunay triangulation (Section 5.6.1), flipping computes a true global optimum, but for other criteria it computes only a local optimum. Mesh smoothing adjusts the locations of mesh vertices in order to improve element shapes and overall mesh quality [2,3,33,55,100]. In mesh smoothing, the topology of the mesh remains invariant, thus preserving important features such as the nonzero pattern of the linear system. Laplacian smoothing [55,77] is the most commonly used smoothing technique. This method sweeps over the entire mesh several times, repeatedly moving each adjustable vertex to the arithmetic average of the vertices adjacent to it. Variations weight each adjacent vertex by the total area of the elements around it, or use the centroid of the incident elements rather than the centroid of the neighboring vertices [139]. Laplacian smoothing is computationally inexpensive and fairly effective, but it does not guarantee improvement

Mesh

generation

313

Fig. 15. (a) A mesh resulting from bisection refinement without smoothing, (b) The same mesh after local optimization-based smoothing.

in element quality. In fact, Laplacian smoothing can even invert an element, unless the algorithm performs an explicit check before moving a vertex. Another class of smoothing algorithms uses optimization techniques to determine new vertex locations. Both global and local optimization-based smoothing offer guaranteed mesh improvement and validity. Global techniques simultaneously adjust all unconstrained vertices; such an approach involves an optimization problem as large as the number of unconstrained vertices, and consequently, is computationally very expensive [33,100]. Local techniques adjust vertices one by one — or an independent set of vertices in parallel [58] — resulting in a cost more comparable to Laplacian smoothing. Many quality measures, including maximum angle and area divided by sum of squared edge lengths, can be optimized by techniques related to linear programming [2]. Figure 15 shows the results of a local optimization-based smoothing algorithm developed by Freitag et al. [58]. The algorithm was applied to a mesh generated adaptively during the finite element solution of the linear elasticity equations on a two-dimensional rectangular domain with a hole. The mesh on the left was generated using the bisection algorithm for refinement; the edges from the coarse mesh are still evident after many levels of refinement. The mesh on the right was generated by a similar algorithm, only with vertex locations optimized after each refinement step. Overall, the global minimum angle has improved from 11.3°to21.7° and the average minimum element angle from 35.7° to 41.1°.

5.6. Theoretical questions We have mentioned some theoretical results — conforming Delaunay triangulation, nosmall-angle triangulation — in context. In this section, we describe some other theoretical work related to mesh generation.

314

M. Bern and P. Plassmann

5.6.1. Optimal triangulation. Computational geometers have studied a number of problems of the following form: given a planar point set or polygonal domain, find a best triangulation, where "best" is judged according to some specific quality measure such as maximum angle, minimum angle, maximum edge length, or total edge length. If the input is a simple polygon, most optimal triangulation problems are solvable by dynamic programming in time 0(f2^), but if the input is a point set, polygon with holes, or multiple domain, these problems become much harder. The Delaunay triangulation — constrained Delaunay triangulation in the case of polygonal domains — optimizes any quality measure that is improved by flipping a reversed quadrilateral; this statement follows from the theorem that a triangulation without reversed quadrilaterals must be Delaunay. Thus Delaunay triangulation maximizes the minimum angle, along with optimizing a number of more esoteric quality measures, such as maximum circumcircle radius, maximum enclosing circle radius, and "roughness" of a piecewiselinear interpolating surface [105]. As mentioned in Section 5.5, edge flipping can also be used as a general optimization heuristic. For example, edge flipping works reasonably well for minimizing the maximum angle [53], but it does not in general find a global optimum. A more powerful local improvement method called edge insertion [23,53] exactly solves the minmax angle problem, as well as several other minmax optimization problems. Edge insertion starts from an arbitrary triangulation and repeatedly inserts candidate edges. If minimizing the maximum angle is the goal, the candidate edge e subdivides the maximum angle; in general the candidate edge is always incident to a "worst vertex" of a worst triangle. The algorithm then removes the edges that are crossed by e, forming two polygonal holes alongside e. Holes are retriangulated by repeatedly removing ears (triangles with two sides on the boundary, as shown in Figure 16) with maximum angle smaller than the old worst angle Lcab. If retriangulation runs to completion, then the overall triangulation improves and edge be is eliminated as a future candidate. If retriangulation gets stuck, then the overall triangulation is returned to its state before the insertion of e, and e is eliminated as a future candidate. Each candidate insertion takes time 0{n), giving a total running time of 0(«^). compute an initial triangulation with all (2) edge slots unmarked while 3 an unmarked edge e cutting the worst vertex a of worst triangle abc do add e and remove all edges crossed by e try to retriangulate by removing ears better than abc if retriangulation succeeds then mark be else mark e and undo e's insertion endif endwhile Edge insertion can compute the minmax "eccentricity" triangulation or the minmax slope interpolating surface [23] in time 0{n^). By inserting candidate edges in a certain order and saving old partial triangulations, the running time can be improved to 0{n^ log n) for minmax angle [53] and maxmin triangle height. We close with some results for two other optimization criteria: maximum edge length and total length. Edelsbrunner and Tan [51] showed that a triangulation of a point set that minimizes the maximum edge length must contain the edges of a minimum spanning tree.

Mesh generation

315

Fig. 16. Edge insertion retriangulates holes by removing sufficiently good ears. Dotted lines indicate the old triangulation.

The tree divides the input into simple polygons, which can be filled in by dynamic programming, giving an 0(n-^)-time algorithm (improvable to 0(n^)). Whether a triangulation minimizing total edge length — "minimum weight triangulation" — can be solved in polynomial time is still open. The most promising approach [46] incrementally computes a set of edges that must appear in the triangulation. If the required edges form a connected spanning graph, then the triangulation can be completed with dynamic programming as in the minmax problem. 5.6.2. Steiner triangulation. The optimal triangulation problems just discussed have limited applicability to mesh generation, since they address only triangulation and not Steiner point placement. Because exact Steiner triangulation problems appear to be intractable, typical theoretical results on Steiner triangulation prove either an approximation bound such as the guarantees provided by the mesh generators in Sections 5.2 and 5.3, or an order of complexity bound such as Edelsbrunner and Tan's 0{n^) algorithm for conforming Delaunay triangulation. The mesh generators in Sections 5.2 and 5.3 give constant-factor approximation algorithms for what we may call the no-small-angle problem: triangulate a domain Q using a minimum number of triangles, such that all new angles are bounded away from 0°. The provable constants tend to be quite large — in the hundreds — although the actual performance seems to be much better. The number of triangles in a no-small-angle triangulation depends on the geometry of the domain, not just on the number of vertices n; an upper bound is given by the sum of the aspect ratios of triangles in the constrained Delaunay triangulation. We can also consider the no-large-angle problem: triangulate Q using a minimum number of triangles, such that all new angles are bounded away from 180°. The strictest bound on large angles that does not imply a bound on small angles is nonobtuse triangulation: triangulate a domain Q such that the maximum angle measures at most 90°. Moreover, a nonobtuse mesh has some desirable numerical and geometric properties [9,135]. Bern, Mitchell, and Ruppert [27] developed a circle-based algorithm for nonobtuse triangulation

316

M. Bern and P. Plassmann

Fig. 17. Steps in circle-based nonobtuse triangulation.

of polygons with holes; this algorithm gives a triangulation with 0(n) triangles, regardless of the domain geometry. Figure 17 shows the steps of this algorithm: the domain is packed with nonoverlapping disks until each uncovered region has either 3 or 4 sides; radii to tangencies are added in order to split the domain into small polygons; and finally small polygons are triangulated with right triangles, without adding any new subdivision points. It is currently unknown whether multiple domains admit polynomial-size nonobtuse triangulations. Mitchell [93], however, gave an algorithm for triangulating multiple domains using 0{n^ log n) triangles with maximum angle 157.5^. Tan [ 126] improved the maximum angle bound to 132° and the complexity to the optimal O(n^).

6. Hexahedral meshes Mesh generation in three dimensions is not as well developed as in two, for a number of reasons: lack of standard data representations for three-dimensional domains, greater software complexity, and — most relevant to this article — some theoretical difficulties. This section and the next one survey approaches to three-dimensional mesh generation. We have divided this material according to element shape, hexahedral or tetrahedral. This classification is not completely strict, as many hexahedral mesh generators use triangular prisms and tetrahedra in a pinch. Careful implementations of numerical methods can handle degenerate hexahedra such as prisms [66,67]. In this section, we describe three approaches to hexahedral mesh generation that vary in their degree of structure and strictness.

6.1. Multiblock meshes We start with the approach that produces meshes with the most structure (and quite often the highest quality elements). A multiblock mesh contains a number of small structured

Mesh

generation

317

Fig. 18. A multiblock hexahedral mesh of a submarine, showing (a) block structure, and (b) a vertical slice through the mesh (ICEM CFD).

meshes that together form a large unstructured mesh. Typically a user must supply the topology of the unstructured mesh, but the rest of the process is automated. Figure 18 shows a multiblock mesh created by ICEM Hexa, a system developed by ICEM CFD Engineering. In this system the user controls the placement of the block comers, and then the mesh generator projects the implied block edges onto domain curves and surfaces automatically. Due to the need for human interaction, multiblock meshes are not well suited to adaptive meshing, nor to rapidly iterated design and simulation.

6.2. Cartesian meshes We move on to a recently developed "quick and dirty" approach to hexahedral mesh generation. The Cartesian approach offers simple data structures, explicit orthogonality of mesh edges, and robust and straightforward mesh generation. The disadvantage of this approach is that it uses non-hexahedral elements around the domain boundary, which then require special handling. A Cartesian mesh is formed by cutting a rectangular box into eight congruent boxes, each of which is split recursively until each minimal box intersects the domain ^ in a simple way or has reached some small target size. (This construction is essentially the same as an octree, described in Section 7.3.) Requiring neighboring boxes to differ in size by at most a factor of two ensures appropriate mesh grading. Boxes cut by the boundary are classified into a number of patterns by determining which of their vertices lie interior and exterior to Q. Each pattern corresponds to a different type of non-hexahedral element. Boxes adjacent to ones half their own size can similarly be classified as non-hexahedral elements, or alternatively the solution value at their subdivision vertices can be treated as implicit variables using Lagrange multipliers [1]. Recent fluid dynamics simulations have used Cartesian meshes quite successfully in both finite element and finite volume formulations [41,42,144]. The approach can be adapted even to very difficult meshing problems. For example, Berger and Oliger [21] and Berger

318

M Bern and P. Plassmann

Fig. 19. A two-dimensional Cartesian mesh for a biplane wing (W. Coirier).

and Colella [20] have developed adaptive Cartesian-based methods for rotational IBiows and flows with strong shocks.

6.3. Unstructured hexahedral meshes Hexahedral elements retain some advantages over tetrahedral elements even in unstructured meshes. Hexahedra fit man-made objects well, especially objects produced by CAD systems. The edge directions in a box-shaped hexahedron often have physical significance; for example, hexahedra show a clear advantage over tetrahedra for a stress analysis of a beam [19]. The face normals of a box meet at the center of the element; this property can be used to define control volumes for finite volume methods. These advantages are not inherent to hexahedra, but rather are properties of box-shaped elements, which degrade as the element grows less rectangular. Thus it will not suffice to generate an unstructured hexahedral mesh by transforming a tetrahedral mesh. Armstrong et al. [4] are currently developing an unstructured hexahedral mesh generator based on the medial axis transform. The medial axis of a domain is the locus of centers of spheres that touch the boundary in two or more faces. This construction is closely related to the Voronoi diagram of the faces of the domain; Srinivasan et al. [124] have previously applied this construction to two-dimensional unstructured mesh generation. The medial axis is a natural tool for mesh generation, as advancing fronts meet at the medial axis in the limit of small, equal-sized elements. By precomputing this locus, a mesh generator can more gracefully handle the junctures between sections of the mesh. Tautges and Mitchell [127] are developing an all-hexahedral mesh generation algorithm called whisker weaving. Whisker weaving is an advancing front approach that fixes the topology of the mesh before the geometry. It starts from a quadrilateral surface mesh.

Mesh generation

319

which can itself be generated by an advancing-front generator within each face [28]. The algorithm forms the planar dual of the surface mesh, and then finds closed loops in the planar dual around the surface of the polyhedron. Each loop will represent the boundary of a layer of hexahedra in the eventual mesh. A layer of hexahedra can be represented by its dual, called a sheet, which has one vertex per hexahedron and edges between adjacent hexahedra. As the algorithm runs, it fills in sheets from the boundary inwards. This approach to hexahedral meshing raises an interesting theoretical question: which quadrilateral surface meshes can be extended to hexahedral volume meshes? Mitchell [94] and Thurston [132] (see also Eppstein [54]) answered this question in a topological sense by showing that any surface mesh on a simple polyhedron with an even number of quadrilaterals can be extended to a volume mesh formed by (possibly curved) topological cubes. The geometric question remains open.

7. Tetrahedral meshes Tetrahedra have several important advantages over hexahedra: unique linear interpolation from vertices to interior, greater flexibility in fitting complicated domains, and ease of refinement and derefinement. In order to realize the last two of these advantages, tetrahedral meshes are almost always unstructured. Most of the approaches to unstructured triangular mesh generation that we surveyed in Section 5 can be generalized to tetrahedral mesh generation, but not without some new difficulties. Before describing Delaunay, advancing front, and octree mesh generators we discuss three theoretical obstacles to unstructured tetrahedral meshing, ways in which M^ differs from M^. First, not all polyhedral domains can be triangulated without Steiner points. Figure 20(a) gives an example of a non-tetrahedralizable polyhedron, a twisted triangular prism in which each rectangular face has been triangulated so that it bends in towards the interior. None of the top three vertices is visible through the interior to all three of the bottom vertices; hence no tetrahedron formed by the vertices of this polyhedron can include the bottom face. Chazelle [37] gave a quantitative bad example, shown in Figure 20(b). This polyhedron includes ^(n) grooves that nearly meet at a doubly-ruled curved surface; any triangulation of this polyhedron must include Q{n^) Steiner points and Q(n^) tetrahedra. Bad examples such as these appear to rule out the possibility of generalizing constrained Delaunay triangulation to three dimensions. Second, the very same domain may be tetrahedralized with different numbers of tetrahedra. For example, a cube can be triangulated with either five or six tetrahedra. As we shall see below, the generalization of the edge flip to three dimensions exchanges two tetrahedra for three or vice versa. This variability does not usually pose a problem, except in the extreme cases. For example, n points in M? can have a Delaunay triangulation with Q{n^) tetrahedra, even though some other triangulation will have only 0(n). Finally, tetrahedra can be poorly shaped in more ways than triangles. In two dimensions, there are only two types of failure, angles close to 0° and angles close to 180°, and no failures of the first kind implies no failures of the second. In three dimensions, we can classify poorly shaped tetrahedra according to both dihedral and solid angles [22]. There are then

320

M. Bern and P. Plassmann

Fig. 20. (a) Schonhardt's twisted prism cannot be tetrahedralized without Steiner points, (b) Chazelle's polyhedron requires Q{n ) Steiner points.

Needle

Wedge

Fig. 21. The five types of bad tetrahedra.

five types of bad tetrahedra, as shown in Figure 21. A needle permits arbitrarily small solid angles, but not large solid angles and neither large nor small dihedral angles. A wedge permits both small solid and dihedral angles, but neither large solid nor large dihedral angles, and so forth. Notice that a sliver or a cap can have all face angles bounded away from both 0° and 180°, although the tetrahedron itself may have arbitrarily small solid angles and interior volume. An example is the sliver with vertex coordinates (0, 0,0), (0, 1, £), (1,0, e), and (1, 1,0), where ^ ^- 0. Many measures of tetrahedron quality have been proposed [75], most of which have a maximum value for an equilateral tetrahedron and a minimum value for a degenerate tetrahedron. One suitable measure, which forbids all five types of bad tetrahedra, is the minimum solid angle. A weaker measure, which forbids all types except slivers, is the ratio of the minimum edge length to the radius of the circumsphere [88].

7.1. Delaunay triangulation As in two dimensions, point placement followed by Delaunay triangulation is a popular approach to mesh generation, especially in aerodynamics. The same point placement methods

Mesh

generation

321

Fig. 22. In three dimensions, an edge flip exchanges three tetrahedra sharing an edge for two tetrahedra sharing a triangle, or vice versa.

work fairly well: combining structured meshes [68], advancing front [10,78,79], and random scattering with filtering [137]. As in two dimensions, the placement phase must put sufficiently many points on the domain boundary to ensure that the Delaunay triangulation will be conforming. Although the three-dimensional conforming Delaunay triangulation problem is not too hard for most domains of practical interest, we do not know of published solutions. The first two point placement methods suffer from the same liability in three dimensions as in two: points may be improperly spaced at junctures between fronts or patches. All three methods suffer from a new sort of problem: even a well spaced point set may include sliver tetrahedra in its Delaunay triangulation, because a sliver does not have an unusually large circumsphere compared to the lengths of its edges. For this reason, some Delaunay mesh generators [10] include a special postprocessing step that finds and removes slivers. Chew (personal communication) has recently devised an algorithm that removes slivers by adding Steiner points at a random location near their circumcenters. The triangulation phase of mesh generation also becomes somewhat more difficult in three dimensions. The generalization of edge flipping exchanges the two possible triangulations of five points in convex position, as shown in Figure 22. We call a flip a Delaunay flip if, after the flip, the triangulation of the five points satisfies the empty sphere condition — no circumsphere encloses a point. In three dimensions, it is no longer true that any tetrahedralization can be transformed into the Delaunay triangulation by a sequence of Delaunay flips [69], and it is currently unknown whether any tetrahedralization can be transformed into the Delaunay triangulation by arbitrary flips. Nevertheless, there are provably correct, incremental Delaunay triangulation algorithms based on edge flipping [50,70, 104]. There are other practical three-dimensional Delaunay triangulation algorithms as well. Bowyer [30] and Watson [136] gave incremental algorithms with reasonable expected-case performance. Barber [15] implemented a randomized algorithm in arbitrary dimension. This algorithm can be used to compute Delaunay triangulations through a well-known reduction [31] which "lifts" the Delaunay triangulation of points in W^ to the convex hull of points in IR^+^

322

M. Bern and P. Plassmann

Fig. 23. The surface of a tetrahedral mesh computed by an advancing front generator (ANSYS, Inc.).

7.2. Advancing front We have already mentioned an advancing front approach to placing Steiner points for Delaunay triangulation. A pure advancing front mesh generator [77,79,97,101] places the elements themselves, rather than just the Steiner points. This approach gives more direct control of element shapes, especially near the boundary, which is often a region of special interest. Advancing front generators seem to be especially popular in aerodynamics simulations [64,65,79,85,101]. We describe an advancing front algorithm of Lohner and Parikh [79,80] as it contains the essential ideas. Desired element size (and perhaps stretching directions) are defined at the vertices of a coarse "background" tetrahedralization and interpolated to the rest of the domain. The background mesh can also be defined by an octree, the three-dimensional generahzation of a quadtree. To get started, the boundaries of the domain are triangulated; the initial front consists of the boundary faces. The algorithm then iteratively chooses a face of the front and builds a tetrahedron over that face. The algorithm attempts to fill in clefts left by the last layer of tetrahedra before starting the next layer; within a layer, the algorithm chooses small faces first in order to minimize collisions. The fourth vertex of the tetrahedron will be either an already existing vertex or a vertex specially created for the tetrahedron. In the latter case, the algorithm tries to choose a smart location for the new vertex; for example, the new vertex may be placed along a normal to the base face at a distance determined by aspect ratios and length functions ultimately derived from the background triangulation [59]. In either case, cleft or new vertex, the tetrahedron must be tested for collisions before final acceptance. Figure 23 shows the surface of a fairly isotropic tetrahedral mesh computed by an advancing front mesh generator developed by ANSYS, Inc. This generator, like the one just described, places elements directly.

Mesh

generation

323

Fig. 24. The surface of a tetrahedral mesh derived from an octree (M. Yerry and M. Shephard).

Marcum and Weatherill [81] have devised an algorithm somewhere between pure advancing front and advancing-front point placement followed by Delaunay triangulation. Their algorithm starts with a coarse mesh, and then uses advancing front to place additional Steiner points, simply subdividing the coarse tetrahedra to maintain a triangulation. This mesh is then improved first by Delaunay and then by minmax-solid-angle flips. Other researchers agree that applying flips in this order is more effective than using either type of flip alone. 7.3. Octrees An octree is the natural generalization of a quadtree. An initial bounding cube is split into eight congruent cubes, each of which is split recursively until each minimal cube intersects the domain .Q in a simple way. As in two dimensions, a balance condition ensures that no cube is next to one very much smaller than itself; balancing an unbalanced quadtree or octree expands the number of boxes by a constant multiplicative factor. The balance condition need not be explicit, but rather it may be a consequence of an intrinsic local spacing function [134]. Shephard and his collaborators [114-116,142] have developed several octree-based mesh generators for polyhedral domains. Their original generator [142] tetrahedralizes leaf cubes using a collection of predefined patterns. To keep the number of patterns manageable, the generator makes the simplifying assumption that each cube is cut by at most three facets of the input polyhedron. Perucchio et al. [102] give a more sophisticated way to conform to boundaries. Buratynski [32] uses rectangular octrees and a hierarchical set of warping rules. The octree is refined so that each domain edge intersects boxes of only one size. Boxes are warped to domain vertices, then edges, and finally faces. Mitchell and Vavasis [91] generalized the quadtree mesh generator of Bern et al. [25] to three dimensions. The generalization is not straightforward, primarily because vertices of

324

M. Bern and P. Plassmann

Fig. 25. The tetrahedron on the left is bisected to form two new tetrahedra.

polyhedra may have very complicated local neighborhoods. This algorithm is guaranteed to avoid allfivetypes of bad tetrahedra, while producing a mesh with only a constant times the minimum number of tetrahedra in any such bounded-aspect-ratio tetrahedralization. So far this is the only three-dimensional mesh generation algorithm with such a strong theoretical guaranty. Vavasis [134] has recently released a modified version of the algorithm (called QMG for "Quality Mesh Generator"), including a simple geometric modeler and equation solver to boot. The modified algorithm includes a more systematic set of warping rules; in particular, the new warping method for an octree cube cut by a single facet generalizes to any fixed dimension [92].

7.4. Refinement and improvement We discuss improvement before refinement, because less is known on the subject. As we mentioned above, edge flipping generalizes to three dimensions, and flipping first by the Delaunay empty sphere criterion and then by the minmax solid angle criterion seems to be fairly effective. Laplacian smoothing also generalizes, although experimental results [57] indicate that it is no longer as effective as in two dimensions. Optimization-based smoothing [2,57] appears to be more powerful than simple Laplacian smoothing. Freitag and Ollivier-Gooch [57] recommend combining Delaunay flipping with smoothing for maxmin dihedral angle or maxmin dihedral-angle sine. We now move on to refinement and discuss two different refinement algorithms based upon the natural generalization of bisection to three dimensions. To bisect tetrahedron vov\V2V2> across edge V{)V\, we add the triangle foi 1^21^3, where VQ\ is the midpoint of VQV\, as shown in Figure 25. This operation creates two child tetrahedra, uofo 11^21^3 and VQ\V\V2V^, and bisects the faces VQV\V2 and fofi 1^3, which, unless they lie on the domain boundary, are each shared with an adjacent tetrahedron. Two tetrahedra that share a face must agree on how it is to be bisected; otherwise an invalid mesh will be constructed. A single bisection of a tetrahedron can approximately square the minimum solid angle, unlike in two dimensions where the minimum angle of a triangle is decreased by no more than a factor of two. Consider the wedge tetrahedron with vertex coordinates (0,^,0),

Mesh

generation

325

Fig. 26. The first three levels of longest-edge bisection of the canonical tetrahedron. Note that the tetrahedra generated at each level are similar. For the final level of refinement we show only the four tetrahedra obtained from fo^^oi ^2^3- Four similar tetrahedra are obtained from vo\v\V2V2>.

(0,—e, 0),(1,0,^), and (1, 0, — e). Bisection of the longest ^dgt of this tetrahedron creates a new tetrahedron with minimum soHd angle about s^. Rivara and Levin [110] suggested an extension of longest-edge Rivara refinement (Section 5.4) to three dimensions. Notice that splitting the longest edge in a tetrahedron also splits the longest edge on the two subdivided faces, and thus the bisection of shared faces is uniquely defined. (Ties can be broken by vertex labels.) Neighboring invalid tetrahedra, meaning all those sharing the subdivided longest edge, are refined recursively. Rivara and Levin provide experimental evidence suggesting that repeated rounds of longest-edge refinement cannot reduce the minimum solid angle below a fixed threshold, but this guarantee has not been proved. The guarantee would follow if it could be shown that the algorithm generates only a finite number of tetrahedron similarity classes. A bisection algorithm first introduced by Bansch [14] does indeed generate only a finite number of similarity classes. Before describing the algorithm, we sketch the argument of Liu and Joe [74] which motivates the algorithm. The key observation is that there exists an affine transformation that maps any tetrahedron to a canonical tetrahedron for which longest-edge bisection generates only a finite number of similarity classes. Consider the canonical tetrahedron tc with coordinates ( - 1 , 0 , 0 ) , (1,0, 0), (0, 1/V2, 0), and (0, 0,1). In Figure 26 we illustrate the first three levels of longest-edge bisection of tc = V{)V\ V2V^. It can be shown that all the tetrahedra generated at each level of refinement are similar and that the eight tetrahedra generated after three levels of refinement are similar to tc. Refinement in the canonical space induces a refinement in the original space with only a finite number of different similarity classes. A subtlety: the similarity classes in the original space correspond to homothets (identical up to scaling and translation), not similarity classes, in the canonical space. Hence the number of similarity classes turns out to be 36 rather than 8 [5,83]. Bansch [14], Liu and Joe [76], and Arnold et al. [5] give essentially equivalent [71] algorithms for generating the bisection order; we follow Bansch's presentation. Each face in each tetrahedron elects one of its edges to be its refinement edge, so that two conditions hold: the choice for a face is consistent between the two tetrahedra that share it, and exactly

326

M. Bern and P. Plassmann

one edge in each tetrahedron — the global refinement edge — is chosen by pairs of faces of the tetrahedron. These conditions hold initially if each face picks its longest edge and ties are broken in any consistent manner, for example, by vertex or edge label order. In the pseudocode below, a child face is a triangle like vo\V2V\ in Figure 25, and a new face is one like V{)\V2V^. mark the refinement edge of every face in the current mesh let 7b be the set of marked tetrahedra; / = 0 while (7/ ^ 0) do bisect each tetrahedron in 7/ across its global refinement edge pick the old edge in each child face as its refinement edge pick the longest edge in each new face as its refinement edge /= /+1 let Ti be the set of invalid tetrahedra enddo

8. Conclusions We have described the current state of the art in mesh generation for finite element methods. Practical issues in mesh generation are — roughly in order of importance — algorithm robustness, fit with underlying physics, element quality, and mesh efficiency. Unstructured triangular and tetrahedral mesh generation already makes frequent use of data structures and algorithms familiar in computational geometry. We expect this trend to continue. We also expect — and recommend — computational geometers to focus some attention on structured meshes and hexahedral meshes. We close with a short list of open problems of both practical and theoretical interest. It is no coincidence that these problems focus on three-dimensional mesh generation. 1. Is the flip graph for a point set in B? connected? In other words, is it possible to convert any triangulation of a point set (even a point set in convex position) into any other using only flips (Figure 22)? 2. Is there a smoothing algorithm guaranteed to remove slivers? A sliver (Figure 21) is the only type of bad tetrahedron with well spaced vertices and small circumspheres. 3. Is there an algorithm for conforming Delaunay triangulation in R-^? In other words, place vertices on the boundary of a polyhedron, so that the Delaunay triangulation of all vertices, original and new, contains the polyhedron. 4. Is there an algorithm for unstructured tetrahedral mesh generation that guarantees an M-matrix for the finite element formulation of Poisson's equation? 5. Give an algorithm for computing the blocks in a multiblock mesh. Such an algorithm should give a small number of nicely shaped blocks, quadrilaterals in R^ and hexahedra in R^. 6. Can any quadrilateral surface mesh with an even number of quadrilaterals be extended to a hexahedral volume mesh?

Mesh generation

327

Ackonwledgements We would like to thank Lori Freitag, Paul Heckbert, Scott Mitchell, Carl Ollivier-Gooch, Jonathan Shewchuk, and Steve Vavasis for help in preparing this survey.

References [1] M. Aftosmis, J. Melton and M. Berger, Adaptation and surface modeling for Cartesian mesh methods, AIAA Paper 95-1725, 12th AIAA CFD Conf., San Diego, CA (June 1995). [2] N. Amenta, M.W. Bern and D. Eppstein, Optimal point placement for mesh smoothing, Proc. 8th ACMSIAM Symp. Disc. Algorithms (1997), 528-537. [3] E. Amezua, M.V. Hormaza, A. Hernandez and M.B.G. Ajuria, A method of the improvement of 3d solid finite-element meshes. Adv. Eng. Software 22 (1995), 45-53. [4] C.G. Armstrong, D.J. Robinson, R.M. McKeag, T.S. Li and S.J. Bridgett, Medials for meshing and more, Proc. 4th International Meshing Roundtable, Sandia National Laboratories (1995). [5] D.N. Arnold, A. Mukherjee and L. Pouly, Locally adapted tetrahedral meshes using bisection. Manuscript (1997). [6] I. Babuska and A. Aziz, On the angle condition in the finite element method, SIAM J. Numer. Anal. 13 (1976), 214-227. [7] I. Babuska and W.C. Rheinboldt, Error estimates for adaptive finite element computations, SIAM J. Numer. Anal. 15 (1978), 736-754. [8] PL. Baehmann, S.L. Wittchen, M.S. Shephard, K.R. Grice and M.A. Yerry, Robust geometrically-based automatic two-dimensional mesh generation. Internal. J. Numer. Methods Eng. 24 (1987), 1043-1078. [9] B.S. Baker, E. Grosse and C.S. Rafferty, Nonobtuse triangulation ofpolygons. Discrete Comput. Geom. 3 (1988), 147-168. [10] T.J. Baker, Automatic mesh generation for complex three-dimensional regions using a constrained Delaunay triangulation, Eng. Comput. 5 (1989), 161-175. [11] R.E. Bank, PLTMG: A Software Package for Solving Elliptic Partial Differential Equations, Users' Guide 6.0, SIAM Pubhcations, Philadelphia, PA (1990). [12] R.E. Bank, A.H. Sherman and A. Weiser, Refinement algorithms and data structures for regular local mesh refinement. Scientific Computing, R. Stepleman et al., eds, IMACS/North-HoUand Publishing Company, Amsterdam (1983), 3-17. [13] R.E. Bank and R.K. Smith, Mesh smoothing using a posteriori error estimates, SIAM J. Num. Anal., to appear. ftp://math.ucsd.edU/pub/scicomp/reb/ftpfiles/a67.ps.Z. [14] E. Bansch, Local mesh refinement in 2 and 3 dimensions. Impact Comput. Sci. Eng. 3 (1991), 181-191. [15] C.B. Barber, D.P. Dobkin and H.T. Huhdanpaa, The Quickhull algorithm for convex hulls. Submitted to ACM Trans. Math. Software. See http: //www.geom.umn.edu/software/qhull/ (1995). [16] W.D. Barfield, An optimal mesh generator for Lagrangian hydrodynamic calculations in two space dimensions, J. Comput. Phys. 6 (1970), 417^29. [17] R. Barrett, M. Berry, T.F. Chan, J. Demmel, J. Donato, J. Dongarra, V. Eijkhout, R. Pozo, C. Romine and H. Van der Vorst, Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, SIAM, Philadelphia (1994). [18] T.J. Barth, Aspects of unstructured grids and finite-volume solvers for the Euler and Navier-Stokes equations. Technical Report, von Karman Institute for Fluid Dynamics, Lecture Series 1994-05 (1994). [19] S.E. Benzley, E. Perry, K. Merkley, B. Clark and G. Sjaardema, A comparison of all-hexahedral and alltetrahedral finite element meshes for elastic and elasto-platic analysis, Proc. 4th International Meshing Roundtable, Sandia National Laboratories (1995), 179-191. [20] M.J. Berger and P. Colella, Local adaptive mesh refinement for shock hydrodynamics, J. Comput. Phys. 82 (1989), 64-84. [21] M.J. Berger and J. Oliger, Adaptive mesh refinement for hyperbolic partial differential equations, J. Comput. Phys. 53 (1984), 484-512.

328

M. Bern and P. Plassmann

[22] M. Bern, L.R Chew, D. Eppstein and J. Ruppert, Dihedral bounds for mesh generation in high dimensions, Proc. 6th ACM-SIAM Symp. Disc. Algorithms (1995), 189-196. [23] M. Bern, H. Edelsbrunner, D. Eppstein, S. Mitchell and T.-S. Tan, Edge-insertion for optimal triangulations. Discrete Comput. Geom. 10 (1993), 47-65. [24] M. Bern and D. Eppstein, Mesh generation and optimal triangulation. Computing in Euclidean Geometry, 2nd ed., D.-Z. Du and EK. Hwang, eds. World Scientific, Singapore (1995), 47-123. [25] M. Bern, D. Eppstein and J.R. Gilbert, Provably good mesh generation, J. Comput. System Sci. 48 (1994), 384^09. [26] M. Bern, D. Eppstein and F. Yao, The expected extremes in a Delaunay triangulation, Intemat. J. Comput. Geom. Appl. 1 (1991), 79-92. [27] M. Bern, S. Mitchell and J. Ruppert, Linear-size nonobtuse triangulation of polygons. Discrete Comput. Geom. 14 (1995), 411^28. [28] T.D. Blacker, Paving: A new approach to automated quadrilateral mesh generation, Intemat. J. Numer. Methods Eng. 32 (1991), 811-847. [29] F. Bossen, Anisotropic mesh generation with particles. Technical Report CMU-CS-96-134, CarnegieMellon University, School of Computer Science (1996). http: //ltswww.epfl.ch/~bossen/. [30] A. Bowyer, Computing Dirichlet tessellations. Computer J. 24 (1981), 162-166. [31] K.Q. Brown, Voronoi diagrams from convex hulls. Inform. Process. Lett. 9 (1979), 223-228. [32] E.K. Buratynski, A fully automatic three-dimensional mesh generator for complex geometries, Intemat. J. Numer. Methods Eng. 30 (1990), 931-952. [33] S. Canann, M. Stephenson and T. Blacker, Optismoothing: An optimization-driven approach to mesh smoothing. Finite Elements in Analysis and Design 13 (1993), 185-190. [34] G.F. Carey and J.T Oden, Finite Elements: Computational Aspects, Prentice-Hall (1984). [35] J.E. Castillo, Mathematical Aspects of Grid Generation, Society for Industrial and Applied Mathematics, Philadelphia (1991). [36] M.J. Castro-Diaz, F. Hecht and B. Mohammadi, New progress in anisotropic grid adaptation for inviscid and viscid flows simulations, Proc. 4th Intemational Meshing Roundtable, Sandia National Laboratories (1995). [37] B. Chazelle, Convex partitions of polyhedra: A lower bound and worst-case optimal algorithm, SIAM J. Comput. 13 (1984), 488-507. [38] L.R Chew, Guaranteed-quality triangular meshes. Technical Report TR-89-983, Comp. Science Dept., Comell University (1989). [39] RG. Ciarlet, The Finite Element Method for Elliptic Problems, North-Holland (1978). [40] RG. Ciarlet and PA. Raviart, Maximum principle and uniform convergence for the finite element method, Comput. Methods Appl. Mech. Eng. 2 (1973), 17-31. [41] W.J. Coirier, An adaptively-refined, Cartesian cell-based scheme for the Euler and Navier-Stokes equations, NASA Technical Memorandum 106754, NASA (October 1994). [42] W.J. Coirier and K.G. Powell, An accuracy assessment of Cartesian-mesh approaches for the Euler equations, J. Comput. Phys. 117 (1995), 121-131. [43] E.F D'Azevedo and R.B. Simpson, On optimal interpolation triangle incidences, SIAM J. Sci. Stat. Comput. 10 (1989), 1063-1075. [44] L. De Floriani and B. Falcidieno, A hierarchical boundary model for solid object representation, ACM Transactions on Graphics 7 (1988), 42-60. [45] B. Delaunay, Sur la sphere vide, Izv. Akad. Nauk SSSR, VII Seria, Otd. Mat. i Estestv. Nauk 7 (1934), 793-800. [46] M.T. Dickerson and M.H. Montague, A (usually?) connected subgraph of the minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geometry (1996), 204-213. [47] T.A. DriscoU, A Matlab toolbox for Schwarz-Christojfel mapping, ACM Trans. Math. Software, to appear. [48] T.A. DriscoU and S.A. Vavasis, Numerical conformal mapping using cross-ratios and Delaunay triangulation. Available under http: //www.cs.comell.edu/Info/People/vavasis/vavasis.html (1996). [49] A.S. Dvinsky, Adaptive grid generation from harmonic maps. Numerical Grid Generation in Computational Fluid Dynamics '88, S. Sengupta, J. Hauser, PR. Eiseman and J.F. Thompson, eds, Pineridge Press Limited, Swansea, U.K. (1988).

Mesh generation

329

[50] H. Edelsbrunner and N.R. Shah, Incremental topological flipping works for regular triangulations, Proc. 8th ACM Symp. Comp. Geometry (1992), 43-52. [51] H. Edelsbrunner and T.-S. Tan, A quadratic time algorithm for the minmax length triangulation, Proc. 32nd IEEE Symp. Foundations of Comp. Science (1991), 414-^23. [52] H. Edelsbrunner and T.-S. Tan, An upper boundfor conforming Delaunay triangulations, Discrete Comput. Geom. 10 (1993), 197-213. [53] H. Edelsbrunner, T.S. Tan and R. Waupotitsch, A polynomial time algorithm for the minmax angle triangulation, SIAM J. Sci. Stat. Comp. 13 (1992), 994-1008. [54] D. Eppstein, Linear complexity hexahedral mesh generation, Proc. 12th ACM Symp. Comp. Geom. (1996), 58-67. [55] D.A. Field, Laplacian smoothing and Delaunay triangulations, Comm. Appl. Numer. Methods 4 (1988), 709-712. [56] S. Fortune, Voronoi diagrams and Delaunay triangulations. Computing in Euclidean Geometry, 2nd ed., FK. Hwang and D.-Z. Du, eds. World Scientific, Singapore (1995), 225-265. [57] L. Freitag and C. OUivier-Gooch, A comparison of tetrahedral mesh improvement techniques, Proc. 5th International Meshing Roundtable, Sandia National Laboratories (1996), 87-100. http://sass577.endo. sandia.gov:80/9225/Personnel/samitch/roundtable96/. [58] L.A. Freitag, M.T Jones and RE. Plassmann, An efficient parallel algorithm for mesh smoothing, Proc. 4th International Meshing Roundtable, Sandia National Laboratories (1995), 47-58. [59] P.J. Frey, H. Borouchaki and P.-L. George, Delaunay tetrahedralization using an advancing-front approach, Proc. 5th International Meshing Roundtable, Sandia National Laboratories (1996), 31-46. http://www.cs.cmu.edu/~ph. [60] PL. George, Automatic Mesh Generation, Wiley, New York (1991). [61] PL. George, F Hecht and E. Saltel, Fully automatic mesh generator for 3D domains of any shape. Impact of Com. in Sci. andEng. 2 (1990), 187-218. [62] A.S. Glassner, Maintaining winged-edge models, Graphics Gems II, E.J. Arvo, ed.. Academic Press Professional, Boston, MA (1991), 191-201. [63] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans. Graphics 4 (1985), 74-123. [64] O. Hassan, K. Morgan, E.J. Probert and J. Peraire, Mesh generation and adaptivity for the solution of compressible viscous high-speed flows, Intemat. J. Numer. Methods Eng. 38 (1995), 1123-1148. [65] O. Hassan, K. Morgan, E.J. Probert and J. Peraire, Unstructured tetrahedral mesh generation for threedimensional viscous flows, Intemat. J. Numer. Methods Eng. 39 (1996), 549-567. [66] T. J.R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element Analysis, PrenticeHall, Inc., Englewood Cliffs, NJ (1987). [67] T.J.R. Hughes and J.E. Akin, Techniques for developing 'special' finite element shape functions with particular reference to singularities, Intemat. J. Numer. Methods Eng. 15 (1980), 733-751. [68] A. Jameson, T.J. Baker and N.P. Weatherill, Calculation ofinviscid transonic flow over a complete aircraft, Proc. AIAA 24th Aerospace Sciences Meeting, Reno (1986). [69] B. Joe, Three-dimensional triangulations from local transformations, SIAM J, Sci. Stat. Comput. 10 (1989), 718-741. [70] B. Joe, Construction of three-dimensional Delaunay triangulations using local transformations, Comput. Aided Geom. Design 8 (1991), 123-142. [71] M.T. Jones and RE. Plassmann, Adaptive reflnement of unstructured finite-element meshes. Finite Elements in Analysis and Design 25 (1-2) (March 1997), 41-60. [72] M.S. Khaira, G.L. Miller and T.J. Sheffler, Nested dissection: A survey and comparison of various nested dissection algorithms. Technical Report CMU-CS-92-106R, School of Computer Science, Camegie Mellon University, Pittsburgh, Pennsylvania (1992). [73] P. Knupp and S. Steinberg, Fundamentals of Grid Generation, CRC Press (1994). [74] A. Liu and B. Joe, On the shape of tetrahedra from bisection. Math. Comput. 63 (207) (1994), 141-154. [75] A. Liu and B. Joe, Relationship between tetrahedron shape measures, BIT 34 (1994), 268-287. [76] A. Liu and B. Joe, Quality local refinement of tetrahedral meshes based on bisection, SIAM J. Sci. Comput. 16 (6) (1995), 1269-1291.

330

M. Bern and P. Plassmann

Mesh generation

331

[104] V.T. Rajan, Optimality of the Delaunay triangulation in R^, Proc. 7th ACM Symp. Comp. Geometry (1991), 357-363. [105] S. Rippa, Minimal roughness property of the Delaunay triangulation, Comput. Aided Geom. Design 7 (1990), 489^97. [106] S. Rippa, Long and thin triangles can be good for linear interpolation, SIAM J. Numer. Anal. 29 (1992), 257-270. [107] M.-C. Rivara, Algorithms for refining triangular grids suitable for adaptive and multigrid techniques, Intemat. J. Numer. Methods Eng. 20 (1984), 745-756. [108] M.-C. Rivara, Design and data structure of fully adaptive, multigrid, finite-element software, ACM Trans. Math. Software 10 (3) (1984), 242-264. [109] M.-C. Rivara, Mesh refinement processes based on the generalized bisection ofsimplices, SIAM J. Numer. Anal. 21 (3) (1984), 604-613. [110] M.-C. Rivara and C. Levin, A 3-d refinement algorithm suitable for adaptive and multi-grid techniques, Comm. Appl. Numer. Methods 8 (1992), 281-290. [ I l l ] J. Ruppert, A Delaunay refinement algorithm for quality 2-dimensional mesh generation, J. Algorithms 18 (3) (1995), 548-585. [112] A. Saalfeld, Delaunay edge refinements, Proc. 3rd Canadian Conf. Comp. Geometry (1991), 33-36. [113] R. Schneiders, Finite element mesh generation, http: //www-users.informatik.rwth-aachen.de/ ~roberts/ meshgeneration.html (1995). [114] W.J. Schroeder and M.S. Shephard, A combined octree/Delaunay method for fully automatic 3-D mesh generation, Intemat. J. Numer. Methods Eng. 29 (1990), 37-55. [115] M. Shephard and M. Georges, Automatic three-dimensional mesh generation by the finite octree technique, Intemat. J. Numer. Methods Eng. 32 (1991), 709-749. [116] M.S. Shephard, F. Guerinoni, I.E. Flaherty, R.A. Ludwig and PL. Baehmann, Finite octree mesh generation for automated adaptive three-dimensional flow analysis, Proc. 2nd Int. Conf. Numer. Grid Generation in Computational Fluid Mechanics (1988), 709-718. [117] J.R. Shewchuk, Triangle: A two-dimensional quality mesh generator and Delaunay triangulator, see http: //www.cs.cmu.edu/%7Equake/triangle.html (1995). [118] J.R. Shewchuk, Adaptive precision floating-point arithmetic and fast robust geometric predicates in C, Proc. 12th ACM Symp. Comp. Geometry (1996). [119] K. Shimada, Physically-based mesh generation: Automated triangulation of surfaces and volumes via bubble packing, PhD thesis, ME Dept., MIT (1993). [120] K. Shimada and D.C. Gossard, Computational methods for physically-based FE mesh generation, Proc. IFIP TC5AVG5.3 8th Int. Conference on PROLAMAT, Tokyo (1992). [121] R.B. Simpson, Anisotropic mesh transformations and optimal error control, Appl. Numer. Math. 14 (1-3) (1994), 183-198. [122] B. Smith, P. Bj0rstad and W. Gropp, Domain Decomposition: Parallel Multilevel Algorithms for Elliptic Partial Differential Equations, Cambridge University Press, New York (1996). [123] PW. Smith and S.S. Sritharan, Theory of harmonic grid generation. Complex Variables 10 (1988), 359369. [124] V. Srinivasan, L.R. Nackman, J.-M. Tang and S.N. Meshkat, Automatic mesh generation using the symmetric axis transformation ofpolygonal domains. Technical Report RC 16132, Comp. Science, IBM Research Division, Yorktown Heights, NY (1990). [125] G. Strang and G.J. Fix, An Analysis of the Finite Element Method, Prentice-Hall (1973). [126] T.-S. Tan, An optimal bound for conforming quality triangulations, Proc. 10th ACM Symp. Comp. Geometry (1994), 240-249. [127] T.J. Tautges and S.A. Mitchell, The whisker weaving algorithm for constructing all-hexahedral finite element meshes, Proc. 4th Intemational Meshing Roundtable, Sandia National Laboratories (1995). [128] J.W. Thomas, Numerical Partial Diff^erential Equations: Finite Difference Methods, Springer, New York (1995). [129] J.F. Thompson, Numerical Grid Generation, Elsevier, Amsterdam (1982). [130] J.F. Thompson, Z.U.A. Warsi and C.W. Mastin, Numerical Grid Generation: Foundations and Applications, North-Holland (1985).

332

M. Bern and P. Plassmann

[131] J.F. Thompson and N.P. Weatherill, Aspects of numerical grid generation: Current science and art, Proc. 11th AIAA Applied Aerodynamics Conference (1993), 1029-1070. [132] W. Thurston, Re: Hexahedral decompostion of polyhedra, a posting to sci.math newsgroup, http: //www.ics.uci.edu/~eppstein/junkyard/Thurston-hexahedra (1993). [133] L.N. Trefethen, Numerical computation of the Schwarz—Christojfel transformation, SI AM J. Sci. Statist. Comput. 1 (1980), 82-102. [134] S. Vavasis, QMG: Mesh generation and related software, http: //www.cs.comell.edu/Info/People/vavasis/ qmg-home.html (1995). [135] S.A. Vavasis, Stable finite elements for problems with wild coefficients. Technical Report TR93-1364, Dept. of Comp. Science, Cornell University (1993). [136] D.F. Watson, Computing the n-dimensional Delaunay tessellation with application to Voronoi polytopes. Computer J. 24 (1981), 167-171. [137] N.P. Weatherill and O. Hassan, Efficient three-dimensional Delaunay triangulation with automatic point creation and imposed boundary constraints. Internal. J. Numer. Methods Eng. 37 (1994), 2005-2039. [138] A. Weiser, Local-mesh, local-order, adaptive finite element methods with a posteriori error estimates for elliptic partial differential equations. Technical Report 213, Yale University, New Haven, Connecticut (1981). [139] W. Welch, Serious putty: Topological design for variational curves and surfaces, PhD thesis, CS Dept, Carnegie Mellon University (Dec. 1995). CMU-CS-95-217, ftp: //reports.adm.cs.cmu.edu/usr/anon/1995/ CMU-CS-95-217A.ps, 217B.ps, 217C.ps. [140] J. Xu, Iterative methods by space decomposition and subspace correction, SI AM Review 34 (4) (1992), 581-613. [141] J. Xu and L. Zikatanov, A monotone finite element scheme for convection diffusion equations. Math. Comput., to appear. [142] M.A. Yerry and M.S. Shephard, Automatic three-dimensional mesh generation by the modified-octree technique, Internat. J. Numer. Methods Eng. 20 (1984), 1965-1990. [143] M.A. Yerry and M.S. Shephard, A modified quadtree approach to finite element mesh generation, IEEE Comput. Graphics Appl. 3 (1983), 3 9 ^ 6 . [144] D.P. Young, R.G. Melvin, M.B. Bieterman and J.E. Bussoletti, A locally refined rectangular grid finite element method: Application to computational fluid dynamics and computational physics, J. Comput. Phys. 92(1991), 1-66. [145] R. Young and I. MacPhedran, Internet finite element resources, http: //www.engr.usask.ca/~macphed/ finite/fe_resources/fe_resources.html (1995).

CHAPTER 7

Applications of Computational Geometry to Geographic Information Systems Leila de Floriani, Paola Magillo and Enrico Puppo Dipartimento di Informatica e Scienze delVInformazione - Universita di Genova, Via Dodecaneso, 35 -16146 Genova, Italy E-mail: (deflo, magillo,puppo) @ disi. unige. it

Contents 1. Introduction 2. Map data modeling 2.1. Two-dimensional spatial entities and relations 2.2. Raster and vector models 2.3. Subdivisions as cell complexes 2.4. Topological data structures 2.5. Multiresolution data structures 3. Map data processing 3.1. Spatial queries 3.2. Map overlay 3.3. Geometric problems in map generalization 3.4. Map labeling 3.5. Other analysis issues 4. Terrain data modeling and processing 4.1. Classical terrain models 4.2. Construction and conversion algorithms 4.3. Terrain generalization 4.4. Multiresolution terrain models 5. Terrain analysis 5.1. Visibility 5.2. Topographic features 5.3. Drainage networks 5.4. Path problems 6. Three-dimensional GIS 7. Concluding remarks References

335 336 336 338 339 340 341 342 342 343 347 349 350 351 352 354 356 358 364 364 370 371 372 373 374 377

333

Applications

of computational

geometry to geographic information systems

335

1. Introduction During the last decade, Geographical Information Systems (GISs) have gained a great impact over a variety of important application fields [171]. According to Goodchild, Kemp, and Poiker [119] "a GIS can be seen as a system of hardware, software and procedures designed to support the capture, management, analysis, modeling and display of spatiallyreferenced data for solving complex planning and management problems." Geographic data are characterized by spatial properties (location, shape, size) and nonspatial properties, called attributes, usually expressed in textual or numerical form. GIS as a discipline involves many different issues, such as hardware and software equipment for data acquisition, data standards, storage and transmission, database management issues (such as integrity and consistency), etc. In this chapter, we consider only issues related to representation and processing of the geometric aspects of geographic data, with a special emphasis on the application of computational geometry techniques. In the past, classical information retrieval methods were adopted to handle geographic data, while the importance of geometric aspects was often underestimated: geometric problems in GIS were solved through ad hoc empirical methods. Such solutions often suffered from lack of foundations, both from a geometric point of view (e.g., the result of an operation defined just as the output of a certain algorithm), and from a computer science perspective (e.g., no complexity analysis), and sometimes had poor practical performances. The needs for a solid theoretical background and for high performances in geometric reasoning have become urgent in GIS. This makes GIS a field of primary importance for application of computational geometry. Representation and manipulation of spatial entities in a geographic information system involve modeling and computational issues. The need to store and process huge data sets yields a demand for data structures and algorithms that achieve a good tradeoff between a high computational efficiency and low storage space. In this chapter, we review classical as well as new problems in geometric modeling and computational geometry arising in GIS. We follow a broad classification of classical geometric data in a GIS into map data and terrain data. Such a classification is not standard in the GIS community, but it is convenient here to identify data characterized by different spatial dimensionality, and different classes of problems. The map data are located on the surface of the Earth and are basically two-dimensional, i.e., they are points, lines, and polygonal regions, which are combined together to form either subdivisions or arrangements, sometimes organized into layers. The terrain data are related with the threedimensional configuration of the surface of the Earth. The geometry of a terrain is modeled as a 2^-dimensional surface, i.e., a surface in a 3D space described by a bivariate function. In addition to these two kinds of classical GIS data, we also cover new research issues in GIS related to the management of fully three-dimensional data. The first part of this chapter is devoted to the map data. The representation of map data involves designing models and data structures capable of encoding geometric structures more general than those studied in the geometric modeling literature, like regions with holes, non-regular structures, isolated points, and line features. Spatial indices also play an important role in the design of efficient methods for geometric queries of map data. Geometric aspects of map data processing involve query operations (e.g., point location, range search); spatial joins (map overlay); and more specific operations based on geometric

336

L. de Floriani et al.

search, such as map generahzation, map labehng, map conflation (i.e., reconcihation of two variants of a map of the same area), computation of optimal paths. Terrain representation and processing are an even richer source for geometric problems. The construction of terrain models involves conversions among raw point and line data, raster grids, triangulated surfaces, and contour line representations. Algorithms for converting among different representations involve several problems in computational geometry, from point location to computation of Voronoi diagrams, Delaunay and other optimal triangulations of points and lines. Terrain analysis and visualization include several geometric operations, such as contour line extraction, computation of drainage networks and topographic features, extraction of models at resolution variable on the domain, computation of paths on a surface. The problems related to terrain visibility which have been extensively studied in computational geometry, are of primary interest in geographic data processing. The rest of this chapter is organized as follows. In Section 2, we deal with map data modeling in GIS. We first define geographic maps mathematically in terms of spatial entities and relations, and then introduce two major map models used in GIS (the raster and the vector model). Since the vector map data are much a stronger source of applications for computational geometry techniques, the attention is focused on this kind of map representations. Computational issues related to map data processing and analysis are treated in Section 3. In Section 4, we consider terrain data modeling and processing. We describe classical terrain models used in GIS and review basic issues in converting the terrain data among the various possible formats. The survey also covers approximate and multiresolution terrain models. In Section 5, we examine some of the most classical terrain analysis problems: visibility problems, extraction of topographic features, computation of drainage networks and determination of optimal paths on a terrain. Issues on a three-dimensional GIS are briefly discussed in Section 6. Finally, Section 7 gives a summary of the chapter, by providing a list of computational geometry techniques and tools that can be useful in GIS, as well as a list of open geometric problems in GIS. This survey is far from being complete. Several problems and geometric structures are just mentioned here and the reference is given to available publications, or to other chapters of this book. In particular, we do not cover parallel algorithms (treated in Chapter 4) and raster representations, since techniques used to manipulate raster data are more typical of digital geometry [165] than of classical Computational Geometry. 2. Map data modeling 2.1. Two-dimensional spatial entities and relations Two-dimensional entities considered in the context of geographic data processing are points, lines, and regions embedded in a two-dimensional space. Datasets covering small portions of the Earth are often projected onto a flat surface and modeled using classical Cartesian coordinates. Several kinds of projections can be used [119]: azimuthal projections using a plane tangent to the Earth in the center of the area to be mapped, conical projections, cylindrical projections using a cylinder tangent to the Earth along the Equator (Mercator projection) or along the line of longitude (Transverse Mercator projection).

Applications

of computational

geometry to geographic information

systems

337

rail

Fig. 1. A toy example of a geographic map.

A more challenging problem is defining a global reference system. Various conventions are used for such a purpose. One approach involves subdividing the Earth surface into zones, each of which is projected separately (the Universal Transverse Mercator uses 60 different zones); other approaches use a spherical coordinate system based on long-lat coordinates, or projection onto an ellipsoid [75,76,182]. However, in the sequel we will always assume the local convention that the map data are embedded in a Euclidean plane. GIS entities are more general than those usually adopted in Computational Geometry. In some cases, lines may not be simple; regions may not be simply connected (i.e., they may contain holes), and may have intQmsil features, i.e., dangling lines (cuts), and isolated points (punctures). Figure 1 shows a toy example of a geographic map. The presence of holes and features may affect the design of data structures and algorithms for processing geographic entities. Most computational methods in GIS deal only with piecewise-linear geometric entities. Although data structures and techniques for representing and manipulating curved entities also exist, they are beyond the scope of this chapter. Spatial relations are defined on pairs of spatial entities, and depend on their relative positions in space. There is a flourishing literature on the definition, classification, evaluation, and study of invariants of spatial relations [42,43,58,85,86,130,155,156,291,292]. In spite of all such work, a homogeneous and complete characterization (e.g., based on an algebraic approach) is still missing. It is not uncommon to find practical contexts and applications for which none of the models proposed in the literature is satisfactory. However, spatial relations are usually classified as follows: • topological relations are characterized in terms of the geometric intersections between boundaries, interiors, and complements of entities: examples are incidence, adjacency, containment, overlapping, etc. (see [42] for a survey); • metric relations are defined in terms of distance between entities: examples are the nearest neighbors and range queries;

338

L. de Floriani et al.

• directional relations are characterized in terms of a relative position of entities with respect to some oriented direction: examples are before, after, right-of, left-of, north, south, etc.; • order relations are defined by properties that induce a partial order on sets of entities. An example is given by containment [157]. Spatial relations play a central role in GISs because many tasks involve the evaluation of spatial relations between a query object and a collection of spatial entities. A broad classification of spatial datasets, which is convenient for both modeling and computational purposes, is as follows: • collections of spatial entities (sometimes organized into distinct layers) that can take any possible relative position on the plane, and intersect arbitrarily; • subdivisions of a compact planar domain into a set of non-overlapping entities. Collections may define arrangements which are more general than those studied in computational geometry, since they can contain irregular entities of any shape and dimension. Similarly, subdivisions are more also general than those used in computational geometry, since they may contain multiply-connected regions with features. Subdivisions are simpler than collections. The combinatorial complexity of a subdivision is linear in the total size of its entities, while the arrangement induced by a collection may have a quadratic complexity. A pair of entities in a collection may assume any possible topological relationship, while possible topological relations in the context of subdivision consist just of adjacency and incidence among its constituent entities, and inclusion of features.

2.2. Raster and vector models There is a long-running debate in the GIS community on whether it is better to represent spatial information based on a vector or on a raster model. Neither model appears to be superior in all tasks. As outlined by Frank [106]: "A traditional view is to differentiate between an entity based view — space is constructed from objects that fill space — and a space oriented view, where each point in space has some properties. This view is philosophically well established...". The vector and raster approaches seem to correspond to these two alternative views of spatial concepts. In a vector model, spatial entities are represented explicitly through their geometry and attributes. Either collections or subdivisions may be represented, and topological relations among entities can be stored explicitly. An explicit representation can support an arbitrarily good level of accuracy. The vector model is obviously entity-based, hence it is well suited to access a spatial database by using spatial entities as search keys. On the other hand, efficient space-oriented access may require sophisticated search structures and techniques. Early representations in vector data modeling, called spaghetti models, are collections of unrelated simple polygonal lines and points. In a spaghetti model, regions are not explicitly encoded, while they are implicitly described by their boundaries. The spaghetti model may encode either a collection or a subdivision, since it is just a collection of entities without any stored relation. The drawback is an almost total lack of support for efficient query processing. More effective data structures are discussed separately in the following subsections.

Applications

of computational

geometry to geographic information systems

339

In a raster model, the domain is regularly subdivided into a large number of atomic regions, similar to the pixels in a digital image. Each pixel carries information about the portion of space it covers. Points are identified with the pixels they lie in, while lines and regions are obtained as aggregations of pixels (digital lines and regions) on the basis of membership attributes. Therefore, spatial entities are not explicitly represented in a raster, while they can be obtained as relations that cluster pixels according to their common attribute. The raster model intrinsically defines a subdivision of the domain, while a collection can be obtained by using multiple members for pixels (i.e., each pixel may belong to more than one entity). The raster representation is obviously space-oriented, and it provides direct access to information about a given location or extent of space. It has the disadvantage of providing an approximate geometry, whose accuracy is dependent on the resolution of the grid, but, on the other hand, its regular structure greatly helps organizing spatial information. Not all operations are supported in both models (e.g., some systems compute buffer zones around vector features by converting to the raster domain and back). In general, raster models are more suitable to support queries by location, while vector models are more suitable to support queries by content [244]. As a consequence, many commercial systems adopt hybrid representations, which permit using either model depending on the specific task and data analyzed. Hybrid models involve the use of algorithms to convert from one model to the other. The techniques used to store, process and analyze data in the raster model, as well as conversion algorithms, are more typical of digital geometry [165], and image processing [220,234] than of classical Computational Geometry. Therefore, in the sequel we will focus on models and methods for vector models. 2.3. Subdivisions as cell complexes The algebraic topology provides a well-established theory on subdivisions of a topological space into cells. In the mathematical literature there are different definitions of cell complexes, none of which is general enough to model regions and features as those manipulated in GISs. However, many models have been developed on the basis of classical cell complexes, and some efforts have been undertaken to extend the classical theory to entities manipulated in a GIS. Simplicial complexes are a special class of cell complexes with good combinatorial properties that make them easy to construct and manipulate. Simplicial complexes have been used in GISs for encoding generic subdivisions by triangulating each region and including all point and line features as vertices and edges [102,291]. Although the approach is theoretically sound and elegant, it may not be practical: geographic data mainly contain large regions with complicate boundaries and features, and fragmentation into triangles causes a relevant increase in storage requirements. A similar approach, with similar drawbacks, consists of using complexes with convex cells, such as trapezoidal decompositions [94]. Regular cell complexes, in which regions are generic, simply-connected polygons without features, correspond to planar subdivisions commonly used in computational geometry. Regular cell complexes are suitable to model maps that do not contain point or linea features.

340

L. de Floriani et al

The most general cell structure provided by the algebraic topology is the CW-complex [183]: its Euclidean realization in two dimensions is a subdivision in which the interior of each region is homeomorphic to an open disk. Such structures admit some features, such as cuts incident into the generalized boundary of a region, and holes incident into such cuts. However, regions must be simply connected: punctures, generic cuts, and "islands" are not admitted. Each region can be fragmented into a minimal number of simply-connected components: such a fragmentation usually yields only a modest increase in storage. Although some efforts have been undertaken to generalize CW-complexes to support GIS data [46, 218,240,292], no substantial progress in the direction of data structures and computational techniques has been made so far. On a different perspective, some authors have proposed approaches based on integer geometry, motivated by robustness issues: points in a map, including endpoints and intersections of lines, are constrained to lie at the nodes of an integer grid. In particular, an algebra based on discrete generalized maps, called realms, has been specified and implemented in [128,129].

2.4. Topological data structures Data structures for encoding both entities and topological relations in a subdivision are usually referred to as topological data structures. The Hterature offers a number of data structures for encoding regular subdivisions of the plane or of a surface, which support an efficient evaluation of spatial relations therein. According to Lienhardt [177] and Brisson [25], the models underlying data structures for cell complexes can be classified into: • explicit-cell representations, where the entities encoded directly correspond to the cells of the complex; • implicit-cell representations, where basic elements of a single type are used, on which element functions act, while cells are implicitly represented. The incidence graph [79] is the prototypical data structure of the former class: nodes correspond to the cells (in two dimensions, vertices, edges, and faces), while arcs linking cells of different dimension correspond to incidence relations. The symmetric structure described in Woo [290] is an implementation of such a graph for the boundary representation of solids. Implicit-cell representations are composed of a set of basic elements (e.g., darts, celltuples, etc.) plus a set of functions acting on such elements (e.g., involutions, switch operators, etc.). Examples of data structures within such a class are the Doubly-Connected Edge List (DCEL) by Preparata and Shamos [221 ], the winged-edge by Baumgart [16], the half-edge structure by Mantyla [187], the vertex-edge and face-edge structures by Weiler [285], and, in a generic dimension d, the cell-tuple structure [25], and the generalized maps [177]. The quad-edge structure [123] can be viewed as a specialization of the celltuple structure in two dimensions (see Chapter 10 for a treatment of data structures for planar subdivisions). Some special structures have been developed in the literature for triangulations and trapezoidal decompositions, which can exploit nice characteristics of such subdivisions. A widely used data structure for triangulations consists of storing, for each triangle, its

Applications

of computational

geometry to geographic information systems

341

three vertices and its three edge-adjacent triangles [172]. A similar data structure, called the quad-view data structure, has been recently proposed in the context of GIS to encode a trapezoidal map [94]. The data structures proposed to encode general subdivisions with features are basically extensions of incidence graphs to non-regular situations. For instance, data structures adopted in [58,136,198] are variations on the DCEL, which is extended to handle holes and features.

2.5. Multiresolution data structures Multiresolution modeling offers interesting capabilities for spatial representation and reasoning in a GIS: from support to map generalization and automated cartography, to efficient browsing over large GISs, to structured solutions in wayfinding and planning. Early approaches were based on a common practice in cartography, i.e., to have a collection of different maps of the same area at different scales, hence encoding information at different levels of detail and accuracy. Such approaches are often referred to in the GIS literature as multiple representations. Some research has also been undertaken, concerning assessment of consistency of different representations [87]. In [274] some hierarchical data structures, called reactive, are proposed, and some others are reviewed for multiresolution representation of lines and maps. The specific purpose of such structures is to allow one to retrieve a more or less detailed/accurate description of the objects. A description of the whole domain at a low level of detail is retrieved from a reactive model through a breadth-first traversal of the first levels of a tree, while a description of a portion of the domain at a high level of detail is retrieved through a depth-first traversal. Examples of such structures are the reactive tree, based on the R-tree; the BLG-tree for line generalization; and the GAP-tree, to support the generalization of area partitionings [275]. More recent approaches have tried to achieve multiresolution on the basis of an integrated data model, which can include information on maps at different levels of resolution together with explicit relations among them. The possibility of developing models that can support a multiresolution representation of maps through hierarchical structures based on trees of cells has been outlined in [107]. Independently, a first hierarchical model that is formally defined on a mathematical basis has been proposed in [19]: such a model is described by a tree of maps at different resolutions, where each map is a refined description of a simple region of its parent node in the tree. In [223], a more complete multiresolution model for maps represented by generalized subdivisions has been proposed, which deals with combinatorial and metric aspects of geographic maps separately, and formally relates all different representations of an entity through the various levels of resolution. The topological structure of a geographic map is completely captured by a purely combinatorial structure called an abstract cell complex. The map generalization, i.e., an operation that relates two consistent maps at different details, is expressed by a continuous mapping between the abstract cell complexes representing the two maps (see also Section 3.3). The appropriate rules permit us to control such functions in order to guarantee that the generalization occurs through gradual changes. The metric aspects concerning changes in accuracy can be controlled separately through

342

L. de Floriani et ah

the concept of line homotopy. The iterative apphcation of simphfication mappings satisfying both topological and metric constraints permits us to define a sequence of generalized maps of the same area. This sequence provides means to organize the various maps, together with the mappings relating them, either in a multi-layered or in a tree structure.

3. Map data processing 3.1. Spatial queries Spatial queries are queries in a spatial database that can be answered on the basis of geometric information only, i.e., the spatial position and extent of the objects involved. A spatial query is defined by a query space S, i.e., either the whole spatial database, or a portion of it obtained through suitable filters; by a query object q that can either belong or not belong to the database; and by a spatial relation J)i. A generic query is thus defined as follows: return all objects s e S that are in relation ^ with q. A classification of spatial queries follows directly from the classification of spatial relations (see Section 2.1). Computational techniques that can be adopted to answer spatial queries depend on the nature of the query space (and on the model which encodes it), on the nature of the query object, and on the nature of the relation. However, a simple exhaustive study of all possibilities shows that most spatial queries can be eventually reduced to few basic problems in computational geometry. In [58] a study is presented on the formalization and solution of topological and metric queries on geographic maps encoded through a cell complex. It is shown that topological queries are solved by map traversal when the query object belongs to the map, while they are always reduced to point location, line intersection, or polygon intersection, when the query object does not belong to the map (see Chapter 10 for a survey). An efficient algorithm has been proposed in [53], which is specific for map traversal in GISs, and provides the basis for the solution of several topological queries on a map. This algorithm traverses a planar subdivision and reports all its regions, without making use of mark bits in the data structure or a stack. Thus, it is especially suitable for a map stored in a read-only GIS database. On the contrary, metric queries are not directly supported by the topological structure of the map and need auxiliary structures — such as spatial indices, or Voronoi diagrams — to be answered efficiently. The use of Voronoi diagrams [ 11 ] for answering spatial queries in GIS has been discussed by Gold and Roos [114-117]. The Voronoi diagram is seen as an intermediate model between the raster and the vector models. As observed by Gold in [116], "the Voronoi model has the complete tiling property of the raster model, but the tiles are based on the proximal region around each object". Both static and dynamic algorithms for constructing a Voronoi diagram of 0-, 1- and 2-dimensional entities in the plane have been developed in the computational geometry literature (see Chapter 5). Gold and Roos

Applications of computational geometry to geographic information systems

343

show that the Voronoi diagram is a persistent, locally modifiable data structure suitable for algorithms like navigation queries, buffer zone generation, polygon labeling, intersection of a map with a line segment, interpolation of a surface at a new point [115,117], etc. Techniques based on spatial indexes are treated in Chapter 17. The interested reader can also refer to the two books by Samet [242,243]. Queries on collections of entities can benefit by less support from relations provided explicitly by data structures. In principle, computational geometry algorithms working on arrangements may give solutions to some such queries, but such algorithms are not applied in practice, perhaps because they are difficult to code and have an intrinsically high computational complexity. Popular techniques for processing collections of entities are based on spatial indexes, which are simple to code and perform well in the average case. In [97] a thorough analysis of the average case complexity in accessing quadtrees is presented. In [8,140,141], several algorithms for spatial queries based on spatial indexes are presented. Refer to Chapter 17 and [243,274] for more details on searching techniques based on spatial indexes. Spatial queries can also be combined with queries related to non-geometric attributes of objects. In this case, a rigorous analysis should take into account both geometric and non-geometric issues. The efficient treatment of such hybrid queries, and the development of suitable integrated models and techniques, as well as of methods for analyzing their performances, are hot open issues that require interdisciplinary research. 3.2. Map overlay It is common practice in GISs to organize information into layers (e.g., land use, hydrography, road network, etc.), and to produce maps by overlaying layers of interest. The overlay process is the basic tool for solving complex spatial queries (the so-called spatial join). In such queries, the input maps are not only overlapped, but also combined on the basis of their attributes (e.g., by using Boolean expressions). Here, we deal only with the geometric aspect of map overlay, where techniques from computational geometry can be applied. Overlay of maps in raster format reduces to combining the attribute values of corresponding pixels and does not involve computational geometry techniques. Conventional transformations are used to align raster grids having different orientations or cell sizes [98]. Here, we focus on the overlay of vector maps. In GIS, there are several cases of overlay, such as overlay between two subdivisions (also called area-to-area overlays), line-to-area overlays, point-to-area overlays. Moreover, both in area-to-area and in line-to-area overlays, input datasets may be collections of possibly intersecting regions and lines. Two maps may be combined to intersect, form a union, or one map may be used to update another; multiple maps may be combined using Boolean expressions. On the other hand, in computational geometry overlay problems have been studied in a much more standard form: • segment intersection problem: find all the intersection points within an arbitrary set of segments; • red-blue intersection problem: find the intersection points of two sets of segments, where no intersections exist within the same set;

344

L. de Floriani et al.

• superimposing plane subdivisions', given two subdivisions U\ and 1^2, compute a subdivision E' whose edges and regions are obtained as the intersection between edges and regions of Ui and ^2Segment intersection algorithms can be used to overlap line maps (e.g., road networks). Red-blue algorithms apply to map layers consisting of general subdivisions with features (see Section 2.4). Some algorithms for plane subdivisions have further restrictions, for instance, to trapezoidal maps [95], to convex regions (e.g., a triangulated map) [207]. In all overlay problems, the number of intersections is /: = Q{n^) in the worst case, where n is the input size. The problem complexity is bounded by 0{n -\-k). A brute force solution consists of computing the intersections between every pair of entities from the two given layers, and works in &{n^). Methods developed in the GIS community mainly consist of heuristic "filters" which try to reduce the number of tested pairs by superimposing a hierarchical spatial index. The filter is based on a decomposition of the plane into blocks, and on distributing the objects to be intersected (the edges and regions of each layer) among the various blocks. Pairs of objects which lie in disjoint blocks of space can be discarded from consideration since they cannot intersect. Then, an exhaustive search for intersections is applied within each block. The filter, however, is not guaranteed to be effective, i.e., some redundant tests are still possible. Nevertheless, these techniques show a good practical behavior. Even if they turn into an exhaustive intersection search in the worst case, their efficiency has been widely experimented in practice. For some methods, a theoretical analysis of the average randomized case is available (e.g., see [93]). Filtering methods can be subdivided into (i) methods decomposing the space into disjoint blocks, eventually splitting objects that cross several blocks; and (ii) methods decomposing the space into possibly overlapping blocks, storing each object in exactly one block. The simplest decomposition scheme based on disjoint blocks is a uniform grid [104, 105]. The resolution of the grid determines the efficiency of the filter. Uniform grids show a poor performance when data are irregularly distributed. Quadtrees [242,243,210] are adaptive grids, based on a recursive partition of an initial square into four sectors. In this way, a different grid resolution can be achieved in each part of the domain according to the local density of data. Many variants of quadtree-like structures have been proposed, depending on the type of data to be stored: either the regions or the edges of a map. Boolean operations are easily done on maps with a superimposed quadtree-like structure. The two input quadtrees are traversed synchronously, by visiting nodes corresponding to the same portion of space at the same time; a quadtree for the result of the Boolean operation is also incrementally built (see [243]). Binary space partitioning (BSP) is a technique bom in the image processing field and lately applied to GIS [273]. Still based on a recursive subdivision of space, it uses a more flexible scheme. At each step, the current block is subdivided into two parts by an arbitrary straight line. The resulting structure can be described as a binary tree whose nodes correspond to convex polygons. BSP-trees support algorithms for performing Boolean operations on objects stored in them [205]. Methods based on overlapping blocks filter candidate pairs by comparing bounding boxes. The bounding box of a two-dimensional entity is the smallest axis-parallel rectangle that completely contains it.

Applications

of computational

geometry to geographic information systems

345

Structures of the R-tree family [127,235,250,17,92] consist of trees with a degree bounded by a predefined constant value, where data objects are stored at the leaves and every internal node represents the bounding box of all the objects stored in its children. The bounding boxes associated with different nodes (even within the same layer) may overlap. A separate R-tree is built for any map layer. The intersections between two layers are computed while descending the trees: at each step, tests on the bounding boxes are performed, and the results of such tests are used to cut off some branches of the trees which are guaranteed to produce no intersection. Intuitively, an "ideal" R-tree should be balanced, its bounding boxes should be as disjoint as possible, and the amount of empty space enclosed in them should be low. In fact, these properties enhance the efficiency of the filter. The numerous existing variants of R-trees are characterized by different criteria used to evaluate the "good quality" of an R-tree, and by different construction strategies. Common criteria try to minimize the area covered by the rectangles [127], or to avoid overlapping rectangles [250], or to aggregate objects based on their spatial proximity [235,92]. Since many R-trees support dynamic insertions and deletions of objects, there is a trade-off between update time and the quality of the tree produced. R*-trees [17] seem to be the most efficient ones in practice. In computational geometry, the purpose has been to find algorithms with a good theoretical complexity [18,32,30,31,41,124,207]. Some of such techniques, especially the plane sweep paradigm (see below) have been integrated in GIS environments [166,167]. The classification of the major existing approaches can be as follows: • an approach based on a segment tree, i.e., a special data structure which hierarchically partitions the plane according to the configuration of input segments [213,31]; • a randomized incremental approach [41,22], which computes all the intersections generated by a generic set of segments by adding the segments one at a time; • a sweep-line approach, which finds the intersections while translating a line through the plane and monitoring the segments intersected by such a line [18,30,32,207]; • an algorithm based on topological sweep, i.e., a sweeping process driven by the topological structure of the input subdivisions [95,124]. The problem of overlapping subdivisions encoded through hierarchical models is faced in [184]. A segment tree is a binary tree whose leaves represent, in the left-to-right order, the vertical strips defined by every pair of consecutive vertical lines drawn through the segment endpoints. Data segments are associated with nodes of the tree in an appropriate way. Then, it is sufficient to test intersections only between segments associated with the same node. Space requirements are reduced by dynamically constructing only a portion of the tree at a time: a single root-to-leaf path [31], or a single level [213]. In incremental algorithms, segment intersections are reported while constructing a trapezoidal decomposition of the plane. The trapezoidal decomposition induced by a set S of segments is obtained by drawing a vertical line through each segment endpoint or intersection point, until another segment of S is encountered in both directions. The efficiency in locating the trapezoids of the current decomposition affected by the insertion of a new segment is obtained by means of special auxiliary data structures which encode the history of the construction [41,22].

346

L. de Floriani et al. Table 1 Major map overlay algorithms. For each algorithm, the worst-case time complexity and the input requirements are indicated. Parameters n and k denote the input and the output size, respectively; the time complexity for incremental algorithms has been computed through a randomized analysis Algorithm

Approach

Input

Time

[22,41] [31,213] [18] [207] [32] [30] [95,124]

Incremental Segment tree Sweep-line Sweep-line Sweep-Une Sweep-line Topological sweep

Segments Red-blue segments Segments Plane subdivisions with convex regions Red-blue segments Segments Plane subdivisions

0{n\ogn+k) 0{n\ogn+k) 0{{n + k)\ogn) 0{n\ogn + k) 0{n\ogn+k) 0{n\o%n + k)

0(n+k)

Sweep-line algorithms are evolutions of the classical sweep-line method of Bentley and Ottman [18] for reporting the intersections in a set of segments. The basic idea is moving a vertical line left-to-right on the plane, and monitoring the segments intersected by such a line. The key observation is that, if two segments intersect, they must appear in consecutive positions along the line at some instant. Specialized sweep-line algorithms have been defined by relaxing the straightness condition of the line and/or the left-to-right order in intersection reporting; also, some algorithms require additional properties on the input segments [31,32,207]. The topological sweeping [95,124] exploits the topological relations among the edges of a plane subdivision in order to advance the sweepline. In practice, the sweep-line is replaced by a cut on the graph induced by the edges of the two input maps and their intersection points, which is progressively moved left-to-right. The algorithms developed in computational geometry are summarized in Table 1. All the above approaches have a computational complexity of 0(n \ogn -J- k), where n is the size of the two maps and k is the output size (for randomized algorithms this is an expected time complexity). The only exception is the topological sweep method which leads to 0(n-\- k) worst-case optimal algorithms. Andrews et al. [7] provide an experimental comparison of computational geometry overlay algorithms and GIS overlay algorithms. The compared approaches are the uniform grid [104,105], the quadtree [242,243], the BSP tree [273] from the GIS literature, and Bentley and Ottman's sweep [18], the trapezoidal sweep [32], and the hereditary segment tree [213] from the computational geometry literature. The results show that filtering heuristics typically perform better because they take advantage of the typical characteristics of GIS data (short segments with a low number of intersections per segment). On large datasets, however, the grid tends to increase running time, and quadtrees and BSP trees may introduce a serious space overhead. Asymptotically efficient computational geometry methods do not perform well on GIS data. An exception is the algorithm by Chan [32], which is competitive with GIS-based approaches, even on large data sets. The segment tree algorithm is the best one on artificial datasets, but the worst one on real GIS data.

Applications

of computational

geometry to geographic information systems

347

3.3. Geometric problems in map generalization The map generalization is known in cartography as a process of selection and representation of details to be shown on a map on a given scale. The map generalization involves different tasks, such as removing objects, simplifying geometry, aggregating several objects into one, etc. In GIS, generalization is more generally intended as a reduction of "information density" in a geographic database while preserving its overall structure and semantics. Generalization is a complex task, both conceptually and computationally. It involves geometric aspects of geographic entities (shape, structure, and detail), as well as nongeometric ones (role and relevance in the map context). In traditional cartography, generalization processes are classified into the following basic operations [232]: • selection decides whether an entity should appear (i.e., be explicitly represented) or not in the simplified map; • aggregation merges different entities into a single one; • collapse reduces the dimensionality of an entity (e.g., a small region collapses to a point, a thin region collapses to a line); • symbolization transforms a geometric entity into a symbol; • simplification reduces the accuracy in representing the shape of an entity; • exaggeration modifies the shape of an entity to highlight features that would become hardly visible on a small scale; • displacement also modifies the shape to set apart entities that would become too close to each other. Selection and aggregation are usually controlled through non-geometric rules. Symbolization is also non-geometric, except for the problem of avoiding overlapping symbols, which is discussed separately in Section 3.4. The remaining operations are primarily geometric, since they affect the shape of entities explicitly represented in the map at reduced resolution. Simplification is by far the most studied problem in the generalization. The best known and used algorithm is probably an early refinement heuristic proposed by Douglas and Peucker for a simple open polygonal chain [72]. Starting from an initial approximating sequence, at each cycle the algorithm inserts the point that maximizes the distance from the current approximation as long as the maximum error gets below a given threshold. A straightforward implementation runs in O(n^) time in the worst case; a sophisticated implementation running in 0(^log*n) time has been proposed recently [139]. The GIS literature is full of other heuristics proposed for the same purpose, which are usually compared empirically (see [192] for a survey and experimental comparisons; [176,214] for more recent examples). A rigorous approach to the problem is due to Imai and Iri [149] who first gave a formalization of line simplification as an optimization problem. Namely, given an input curve and some metric to measure the error in approximating it, they outline two basic problems: (i) minimizing the number of vertices of the output chain for a given threshold error; (ii) minimizing the error of the output chain for a given number of vertices. Imai and Iri give algorithms, and list results by other authors to cover both problems under four different metrics. Other results are also referred to by Guibas et al. [125]. All algorithms have a superquadratic time complexity for generic polygonal chains, but for a special metric, a sub-

348

L. de Floriani et al.

quadratic time complexity can be achieved [147]. Problem (i) can be solved in linear time for the special case in which the input is the image of a piecewise-linear function [148]. An elegant definition of problem (i) is also suggested by Guibas et al. [125]: a homotopy class is obtained by convolving the input line with a disk having a radius equal to the given threshold. The solution is a polygonal chain with minimum links, which is homotopic to the input line into such a region. Linear algorithms for computing homotopy paths inside simple polygons were proposed by Suri [258], Ghosh [113], and Hershberger and Snoeyink [138]. All such algorithms follow a greedy approach. Guibas et al. also study problem (i) as a problem of ordered stabbing [125]. Only disks centered at vertices of the input chain are considered: the solution must be a minimum-link chain stabbing such discs in order. For such a problem, they give an 0{n\ogn) suboptimal greedy algorithm, as well as an optimal quadratic algorithm based on dynamic programming; finally, they give a linear time optimal solution for the special case in which discs in the input are all disjoint. All the algorithms cited above cannot be considered as ultimate solutions to the problem, because they cannot guarantee that the output will be free of self-crossings. A negative result by Guibas at al. [125] shows that the problem of finding a minimum-link simple polygon for a given homotopy type is NP-hard. In the same paper, the problem of line simplification is also studied in the context of a map: given a plane straight-line graph induced by a set of non-crossing polygonal chains, find a minimum-Unk approximation (in the homotopy class of the map, as outlined above for lines). Also, this problem is NP-hard: the difficult part is in positioning vertices that have more than two incident edges. A more general problem of subdivision simplification has been recently faced by Weibel [287] and de Berg et al. [51]. Weibel [287] defines constraints on the simpHfication process based on cartographies principles, classified into metric, topological, semantic (like preservation of class membership) and gestalt principles (constraints used by cartographers). De Berg et al. [51] face the problem of simplification with the main purpose of reducing the complexity of a subdivision. They propose a nearly quadratic algorithm for the following problem: given a polygonal line, a set of feature points, and a real number ^ > 0, compute a simplification that guarantees (i) a maximum error e, (ii) that feature points remain on the same side of the simplified chain as of the original chain, and (iii) that the simplified chain has no self-intersection. Relatively little research has been conducted on merging areal features. The earlier techniques were usually raster-based involving mathematical morphology operators such as dilation and erosion. Collapse problems, like reduction either of a ribbon-shaped area to a center line, or of an areal feature to a point, are faced by using the medial axis transform (see [281] for a survey, and [74,160] for algorithms on medial axis). Jones et al. [154,281] describe the implementation of a few generalization operators based on a triangulated spatial model of a map built on the constrained Delaunay triangulation of the map vertices and edges (see [173,248]). Such operators allow detection of conflicts and their resolution, dimensionality reduction through skeleton generation, boundary simplification and merging of nearby objects. On a more general perspective, Saalfeld [241] has recently suggested that the basic operations of map generalization can be expressed in terms of graph drawing. Although such an approach seems to be promising, so far it is just a challenge launched to experts in graph drawing, while no algorithms based on it have been proposed yet. Another approach to the

Applications of computational geometry to geographic information systems

349

map generalization has been recently proposed by Puppo and Dettori [68,223], which is based on functions defined between cell complexes (describing maps) and continuous under the finite topology. This approach is mainly intended to giving consistency control of operations that affect the topology of the map, and to the definition of multiresolution models. By following the approach of Puppo and Dettori, algorithms for geometric consistency have been recently proposed by Delis and Hadzilacos [67]. To summarize, we remark that while only empirical or manually-assisted solutions to the map generalization are used in practice, only partial solutions to a few theoretical subproblems have been proposed. A unifying framework that can formally incorporate all operations involved in the map generalization is still an open issue.

3.4. Map labeling Map labeling is a problem of critical importance in cartography. It consists of positioning labels on the map under the following constraints: they must be legibly referred to spatial entities; they cannot overlap; they cannot cover relevant features of the map. In manual cartography, this task is estimated to take about 50% of the time to draw a map; hence the importance of finding automatic procedures to place labels. Map labeling is often subdivided into three subproblems, namely, labeling areas (e.g., countries, lakes), labeHng lineal features (e.g., rivers, roads), and labeling points (e.g., cities). According to some authors [70], there exists a hierarchical relationship that permits to solve such problems separately: area features are placed before point features, which in turn come before line features. However, most literature has been devoted to studying point labeling. Informally, point feature labeling is defined as follows: given a set of points spatially located, and a set of labels referred to each point, find the choice of label positions that minimizes the total number of label-label and label-point overlap. Labels are modeled as rectangles of variable size. Most cartographers agree on constraining a label to have the referred point either at one of its four comers, or at one of the midpoints of its four edges. Many solutions to point labeling have been based on greedy techniques with backtracking to escape invalid configurations (see, e.g., [70,152] and references therein). Different heuristics were adopted to speedup algorithms, which, however, have an exponential time complexity in the worst case. Cromley [47] and Zoraster [296] independently proposed an approach based on integer programming and iterative solutions based on relaxation. Christensen et al. [38] give an extensive survey and an empirical analysis of several computational techniques for map labeling. Moreover, they propose an algorithm based on gradient descent and another one based on simulated annealing. Both such algorithms are based on iteration: starting from an arbitrary configuration, they make local improvements. With a gradient descent, the local change that gives the best improvement is performed at each iteration. However, this method can get stuck at local minima without achieving the optimal solution. In the algorithm based on simulated annealing, local minima are avoided through a stochastic approach. At each iteration, local random changes are performed, which are discarded with an increasing probability if they worsen the cost of the configuration. Christensen et al. show how to manage the cost to include not only the number of conflicts, but

350

L. de Floriani et al.

also placement preferences, and possibly deletions of labels in excess to escape from illegal configurations. Formann and Wagner [99] have studied a version of point labeling, where only four positions per label are allowed; they have shown that the problem is NP-complete through reduction to 3-satisfiabiHty. They also propose an optimal algorithm running in 0{n log^ n) time for arbitrary rectangles, and in 0{n \ogn) time for equally-sized squares, when only two possible positions per label are allowed. On this basis, they propose an approximate solution for the case of four possible positions that can be found in 0{n \ogn) time and ensures correct placement of labels whose size is at least 50% of the optimal. They also show that this is the best approximation ratio that can be achieved in polynomial time for this specific problem. Kucera et al. [168] studied the same problem, but developed an exact super polynomial algorithm that can be applied to sets with up to approximately 100 points. Wagner and Wolff [279,280] have noted that in practice the approach of Formann and Wagner hardly ever results in label sizes significantly larger than half the optimum. They study variations of the problem and find a practical way to improve the size of the squares. Recently, Agarwal et al. [4] have been investigating the problem of computing a large non-intersecting subset in a set of rectangles in the plane. An exhaustive bibliography on the map labeling problem can be found at http://www.inf. fu-berlin.de/map-labeling/papers.html. 3.5. Other analysis issues In this subsection, we will deal with other issues that have received some attenfion in both computational geometry, and GIS: namely, map conflation, path planning, and construction of cartograms. The path problem in the context of terrain models will be discussed in Subsection 5.4. Refer also to Chapter 15 for further details. Maps provide approximations of the real locations and extents of geographic objects. The representation of the same object may differ in two maps for small changes in its shape and displacement. Map conflation is an operation aimed at reconciling two variants of the map of the same area, in order to compile a map that would integrate information from both [238]. The dissertation of Saalfeld [241] provides both a mathematical modeling framework, and a collection of algorithms for building a conflation system. Basic issues in this context are plane graph matching, and geometric transformations on planar regions. Plane graph matching does not involve the graph isomorphism: heuristics for feature matching, and neighborhood relations are used. Geometric transformations and final merging of the two maps is performed by using a triangulation of the maps [237]. The computation of optimal paths has been studied in GIS mainly for road networks. In these cases, problems can be modeled in a graph-theoretical setting, and generally do not involve geometric computation. Such methods cannot be applied, for instance, in planning a new road across a region: the road will not, in general, follow the existing edge of the map, but rather it will traverse the interior of the region along a path that did not exist before. Path computation involves geometric calculations and cannot be modeled as a discrete graph theoretic problem (see the work of Mitchell and Suri [197] for a survey).

Applications

of computational

geometry to geographic information systems

351

The Weighted Region Problem consists of finding an optimal path in a planar subdivision, where a non-negative cost is associated with each edge and region. Such a cost is the cost of travelling one unit of length across the region/along the edge, and may be based on soil, vegetation, etc. Costs can also be infinite, and thus model obstacles which cannot be traversed. The problem is relevant both to motion, and to planning situations such as building highways, railways, pipelines, etc. The weighted region problem has been intensively studied by Mitchell. In [196] the algorithm is proposed that finds an approximated shortest weighted cost path from a fixed point in 0(n^ logn), where n is the size of the problem. In recent paper [189], Mata and Mitchell propose the algorithm that can deal with an arbitrary pair of points, and has an improved time complexity (an n^ factor instead of n^). Such an algorithm has been successfully implemented. The 0(n^) algorithm for a special instance of the above problem in which only regions with weights in the set {0, 1, -foo} is described in [112]. In [266] algorithms for the weighted region path problem working on a raster model as well as the implementation of the algorithm of Mitchell and Papadimitriou based on constrained Delaunay triangulation (see [173]) are described and compared. A cartogram is a geographic map that is purposely distorted so its spatial properties represent quantities not directly associated with the position on the globe [71]. Distortions should act as homeomorphisms, i.e., continuity of the map should be preserved. Some automatic methods for generating cartograms have been developed that use iterative techniques for computing differential equations involving force fields [71,263]. Recently, Edelsbrunner and Waupotitsch [82] have proposed a combinatorial algorithm that is based on a sequence of local piecewise linear homeomorphic changes, acting on tiling of the map made of regular triangles.

4. Terrain data modeling and processing Terrain processing requires input, data models, and algorithms different from those needed for 2D data. Terrain processing is also a major source of geometric problems, which stimulate the use of computational geometry, both in applying existing techniques, and in developing new ones. The term Digital Terrain Model (DTM) is used generically to denote a model representing terrain relief on the basis of a finite number of samples [193]. Elevation data are acquired either through sampling technologies (on-site measurements or remote sensing: tacheometers, photogrammetry, SAR, etc.), or through digitization of existing contour maps [215]. Raw data come in the form of elevations at a set of points, either regularly distributed, or scattered on a two-dimensional domain; chains of points may form polygonal lines, approximating either lineal features, or contour lines. On the basis of sampled data, different models can be built: contour maps, rasters, and mathematical surface representations. Mathematical models are either global (i.e., defined through a single function interpolating all data), or local (i.e., piecewise defined on a partition of the domain into patches). Regularly distributed data generally lead to regular square grids, while scattered data generally lead to triangulated irregular networks. Since we are concentrating on models and methods rooted in computational geometry, we will not cover

352

L. de Floriani et al.

raster models and digital geometry techniques to process them, as well as global mathematical models and algebraic techniques. In the rest of this section, we will deal essentially with general problems related with construction and storage of DTMs, while more specific problems regarding their analysis will be described in the next section. The interested reader can also refer to a survey by van Kreveld [270] for more detailed issues about DTMs, and in particular algorithms on TINs, and to a survey by Magillo and Puppo [185] for issues on parallel algorithms for terrain processing. 4.1. Classical terrain models A topographic surface (or terrain) cr is the image of a real bivariate function / defined on a compact and connected domain ^ in the Euclidean plane, i.e., a = {(x, y^ f(x,y)), (x, y) e Q}. Given a real value ^, a set Ca(q) = {(x,y) e Q, f(x,y) = q] is the set of contours of a at height q, and it is formed by a set of simple lines (provided that / has no relative maxima, minima, saddles, or horizontal plateaus at height q). A Digital Terrain Model {DTM) is a model providing information on such a surface on the basis of a finite set of data. Terrain data are measures of elevation at a set of points y — {uo,..., fA^} C A?, plus possibly a set of non-crossing straight-line segments E — {e^,.. ..CM} having their endpoints in W. Data points in V can either be scattered or form a regular grid. Lines in E can possibly form a collection of polygonal chains. Three classes of DTMs are usually considered in the context of GIS [216]: • Polyhedral terrains', a polyhedral terrain is the image of a piecewise-linear function / . A polyhedral terrain model can be described on the basis of a partition of the domain Q into polygonal regions having their vertices in V (and such that the segments of E appear as borders of regions). The image of / over each region is a planar patch. The most commonly used polyhedral terrain models are Triangulated Irregular Networks (TINs), in which all regions are triangles. • Gridded elevation models: a gridded elevation model is defined by a domain partition into regular polygons induced by a regular grid over Q. The most commonly used gridded model is the Regular Square Grid (RSG), in which all regions are squares. Function / is usually a bilinear function interpolating the vertices of the grid. In some cases, an RSG is treated as a raster, and a constant function is used over each region. This is said to be a stepped model, and it is obviously non-continuous across the edges of the grid. • Contour maps: given a sequence Q = [qo,.. .,qh} of real values, a digital contour map of cr is an approximation of the collection of contours Ca,Q = [Ca (qi), / = 0 , . . . , h}. Contours in digital contour maps are often represented as point sequences; a line interpolating points of a contour can be obtained in different ways: from the simplest case of a polygonal chain to spline curves of various orders. Contour maps are easily transposed onto paper and best understood by humans, but are not suitable for performing a complex computer-aided terrain analysis. This is due to the complete lack of information about terrain morphology between two contour lines. An automated terrain analysis is performed on RSGs or TINs. As for maps, some operations are better supported by RGSs, and others by TINs. Advantages and disadvantages of the two models are illustrated in [27,9].

Applications

of computational

geometry to geographic information systems

353

Triangulated Irregular Networks are the most interesting models for application of computational geometry techniques. A TIN is based on a triangulation T of the domain with vertices at the projection on the x-y plane of data points (or of a subset of them) and sometimes including a set of straight-line segments as a subset of the edges of T. The resulting piecewise-linear surface interpolates data elevations at all points and lines whose projections are vertices and edges of the triangulation, respectively. Data structures describing a TIN are those for encoding triangulations in the plane (see Section 2.4). There also exists a flourishing literature on TINs using smooth patches at each triangle, in order to achieve C^ continuity of the resulting surface [206]. Building smooth patches is easy, though expensive because of numerical computation involved, if surface normals are provided (or estimated) at each datum. There are different strategies to define a TIN having its vertices at a given set of data. In general, the connection topology of vertices is required to satisfy some optimality criterion. Optimality criteria can be defined either for the underlying triangulation, or for the surface itself. A measure can be assigned to each triangle of triangulation (e.g., its area, the minimum/maximum/mean size of its edges, or its angles). Then, the key for comparing triangulations can be the sum, or the maximum, or the minimum, or a lexicographically ordered vector of the measures of all triangles. The most commonly used triangulation is the Delaunay triangulation which is optimal according to the following criteria: it maximizes the minimum angle of its triangles [172,221], it minimizes the maximum circumcircle [48], and it minimizes the maximum containing circle [227]. Optimality criteria defined on the approximating surface have also been considered in the context of scattered data interpolation. Triangulations defined by such criteria are referred to as data-dependent triangulations, since the optimization also depends on the z-values of data points, rather than simply on their x-y coordinates. Dyn, Levin, and Rippa [78] consider optimality criteria that can be defined through some cost function of the resulting surface. Examples of optimality criteria are the following: • three-dimensional criteria: criteria like the max-min angle, the min-max angle, or the minimum edge length are considered on triangles and edges of the surface, rather than on their projections on the plane; • nearly C^ criteria: the piecewise-linear surface that is as close as possible to a C^ approximation on the edges of the triangulation is selected; • variational criteria: the unknown surface is assumed as the one minimizing some functional defined over a suitable space of functions. One example of such a functional is the roughness, defined by the Sobolev semi-norm of the function. Surprisingly, the surface with minimum roughness is always given by the Delaunay triangulation of projected points, independently of the z-values of its vertices [230]. When the data set also includes a set of line segments, it is also important that such segments appear as either edges, or chains of edges in the TIN. In this case, either constrained [173,248] or conforming [83,239] triangulations are used. A constrained triangulation T of a set V of points and a set E of straight-line segments is a triangulation of V that contains £" as a subset of its edges. A constrained Delaunay triangulation is a constrained triangulation satisfying a weaker version of the circumcircle property. A conforming triangulation r of a set V of points, and a set E of straight-line segments is a triangulation of V such that every segment of E may be decomposed into a chain of edges of T. In other

354

L. de Floriani et al.

words, the constraint segments are broken into pieces in the conforming triangulation in order to avoid long and thin triangles. See Chapter 5 for details. For the conforming and constrained triangulations, only optimality criteria defined on the underlying triangulation have been considered so far. A survey of Delaunay triangulations (both non-constrained and constrained) for TIN creation is provided in [264].

4.2. Construction and conversion algorithms Raw data can come in the form of a set of points V, and possibly of a set of lines E. In case the points of V are distributed regularly, an RSG is implicitly provided. Since sometimes DTMs are derived from digitizing the existing contour maps, contours may also play the role of raw data. Hence, we have the following possible construction and conversion problems. Note that a clear distinction between conversion and construction techniques cannot be done since sometimes models and raw data are the same (e.g., regular distributed data points and RSGs). 1. RSG from sparse points. There are three possible approaches for constructing an RSG from a set V of scattered points [216]: (a) pointwise methods: the elevation at each grid point p is estimated on the basis of a subset of data that are neighbors of p. There are different criteria to define the neighbors that must be considered, e.g.: the closest k points, for some fixed k\ all the points inside a given circle centered at p, and of some given radius; the neighbors of p in the Voronoi diagram of V U {/7}; etc. The basic geometric structure for all such tasks is the Voronoi diagram of the given data points. If raw data include line segments, then a Voronoi diagram of segments, or a bounded Voronoi diagram [248] can be used. (b) global interpolation methods: a unique interpolating function (usually, a polynomial) is computed, which interpolates elevations at all points of V. The RSG is obtained by sampling such a function at grid nodes. (c) pathwise interpolation methods: the domain is subdivided into a number of patches, which can be either disjoint or partially overlapping, and either of regular or irregular shape. The terrain is approximated first within each patch through a function that depends only on data inside the patch. The elevation at grid nodes inside each patch is estimated by sampling the corresponding function. 2. RSG from TIN. Some systems first compute a TIN from sparse data points (and, possibly, fines), then they convert such a representation into an RSG [284]. This conversion is indeed a special case of patch interpolation methods described above. After computing the TIN, elevations at RSG nodes can be efficiently evaluated by scan-line conversion algorithms that run in linear time [98]. 3. RSG from contours. Early methods performed this conversion as follows: a number of straight lines at given directions (at least a horizontal and a vertical line) are drawn through each node of the grid, and their intersections with the contour lines are computed; terrain profiles along each line are approximated by some function interpolating contours at intersection points; the elevation at the grid node is computed as an average of its approximate elevations along the various profiles. The underlying

Applications

4.

5.

6.

7.

8.

9.

of computational

geometry to geographic information systems

355

geometric problem is to find intersections between the contour map, and the fines through each grid node: red-blue intersection algorithms can be used for this purpose (see Section 3.2). More recent approaches perform this conversion in two steps: contours are first converted into a TIN, then such a TIN is scan-converted to produce the final RSG [216]. Carrara et al. [29] provide an experimental analysis of four different methods for deriving an RSG from contour lines; the results on RSG's accuracy in preserving a coastline are reported in [28]. Eklund and Martensson [88] compare the accuracy of RGSs generated from contour lines and from scattered points. TIN from points. A TIN is obtained from sparse data points by computing the triangulation having vertices at data points. In case raw data also include line segments, the constrained or the conforming triangulation is computed. Thus, the basis for TIN construction are algorithms for building the Delaunay triangulation, the datadependent triangulation [78,230], the constrained Delaunay [173] and the conforming Delaunay triangulation [83,239]. The interested reader is referred to Chapter 5, and to [11] for further details. TIN from RSG. This conversion is usually aimed at data compression: the adaptivity of the TIN to surface characteristics is exploited to produce a model of terrain that can be described on the basis of a reduced subset of elevation data from the input RSG. Hence, RSG to TIN conversion involves approximation. The construction of approximated TINs is treated in detail in Subsection 4.3. TIN from contours. A TIN conforming to a given contour map should be based on a triangulation that conforms to the set of contours. This problem has been studied in the literature both in the context of GIS, and, more generally, in the reconstruction of three-dimensional object models. The constrained Delaunay triangulation, using projections of the contours on the x~ y plane as input constraints, gives a conforming TIN, but it may produce artifacts, due to triangles having all vertices on the same contour line. Many algorithms adopt heuristics to avoid artifacts. In [37], flat triangles are avoided by adding the medial axis of each pair of adjacent contour lines to the dataset before computing the triangulation. Specific algorithms developed for TINs are described in [38,110]. More general algorithms for 3D objects produce a triangulated surface from a sequence of cross-sections, resulting from the intersection of the object with a collection of parallel planes [159,109,111,255]. Contours from points. As for RSG from contours, this conversion is usually done in two steps: an RSG or a TIN is built first from raw data, then contours are extracted from such a model. Contours from RSG. If the RSG is a bilinear model, then all square regions can be processed independently: possible intersections of the four edges of each region with contour lines are found in constant time. Contour segments inside each region are obtained by connecting intersection points at corresponding elevations. In the second step, corresponding contour segments from adjacent regions must be sewn together to form contour lines by a contour following technique. Contours from TIN. Building contours from a TIN is completely similar to constructing contours from a bilinear model. Contour segments for triangular regions

356

L. de Floriani et ah

can be found independently while contour extraction needs contour following. In [13,180,269], efficient structures based on interval trees [269], kd-trees [180], and segment trees [13] are proposed, which permit us to extract contours from a TIN in 0 (log n-\-k)ov 0(>/n + k) time, where n is the size of the TIN, and k is the size of the resulting contour map. The search structure, however, can be a serious storage overhead. Van Kreveld et al. [272] reduce the storage requirements by observing that a contour can be traced directly if one mesh element through which the contour passes is known. They give an algorithm which constructs the so called contour tree, a tree that captures the contour topology of a TIN, or an RGS, in 0(n logn) with less additional storage than a previous algorithm proposed by de Berg and van Kreveld [54]. The problem of efficiently transmitting and compressing a TIN has been recently addressed by Snoeyink and van Kreveld [256] for the case of TINs based on Delaunay triangulations. Given a 2D Delaunay triangulation, they show that one can determine a permutation of the data in 0(n) time such that the Delaunay triangulation can be reconstructed from the permuted data in 0(n) time. More general methods for compressing triangular meshes (not just TINs), which exploit the compactness of triangle strips, have also been proposed by other authors [36,55,89,262].

4.3. Terrain generalization The more data are available, the better a terrain can be represented. Modem acquisition techniques provide huge datasets that permit to represent terrain accurately. However, a high representation accuracy is paid for in terms of high costs for storage and processing. Generalization techniques provide the means to bring such costs into manageable bounds, by trading-off representation costs and accuracy. An approximate terrain model is a model built by using a reduced set of data. The approximation error e is measured with respect to a reference model built on the whole data set: a common choice is the maximum difference between the elevation at a data point, and its interpolated elevation in the model. The accuracy of an approximated representation with respect to the reference model — which has no relation with the accuracy of samples with respect to reality — can be defined as the inverse of the error, namely, \/{\-\- e). An application can optimize the performance by adopting an approximate terrain model whose accuracy is within a required threshold. In some cases, the threshold may be variable through the surface domain. For instance, a higher accuracy may be needed in the proximity of important features, for the purpose of terrain analysis; the accuracy may be decreasing with distance from a given viewpoint, for the purpose of landscape visualization. However, it is easy to transform a generalization problem with a variable threshold into a problem with the constant threshold by performing a simple rescale of the input data through the inverse of the threshold function [194]. The ideal aim of terrain generalization is to achieve an optimal ratio between the accuracy and size of representation. As for line simplification, there are two different optimization criteria: • minimizing the number of vertices of the model for a given accuracy; • maximizing the accuracy for a given number of vertices.

Applications of computational geometry to geographic information systems

357

For the first problem a negative result has been proven by Agarwal and Suri [1]: they consider a polyhedral terrain (for simplicity, a TIN), and show that the problem of approximating it at a given accuracy with another TIN having a minimum number of triangles and vertices at arbitrary positions is NP-hard. It follows that also the second problem is NP-hard. It was conjectured that such problems remain NP-complete even if vertices of the approximate terrain are constrained to lie at original data points. Only for the first problem, there exist algorithms that can achieve a suboptimal solution in polynomial time, while guaranteeing some bounds on its size. A first algorithm proposed by Agarwal and Suri [1] can build an approximate solution in 0(n^) time, having 0(klogk) triangles, where k is the number of triangles in the optimal solution. More recently, a randomized algorithm was proposed by Agarwal and Desikan [6] that can achieve size 0(k^ log^ k) in 0(n^+^ -h k^ log^ k log | ) expected time. Both algorithms build a simplicialpartition, defined as a set of disjoint triangles whose union covers all point data, and such that each triangle is compatible with the required accuracy. Such a set of triangles is completed to form a TIN. Finding a simplicial partition involves sophisticated techniques whose implementation is hardly feasible in practice; however, a simplified implementation of the latter algorithm has given empirical results that are comparable to those obtained with other methods. An algorithm that solves the first problem with a greedy technique has been proposed by Silva et al. [253]. The approximate TIN is built incrementally by iteratively cutting triangles (ears or bites) from hollow polygons that span the domain: at each step the algorithm considers a polygon, and bites from it a triangle of maximal area that is compatible with the required accuracy. It is conjectured in that also this algorithm might guarantee a bound on the size of the solution, but proving this fact is still an open issue. This algorithm works with simple data structures, and requires a small amount of memory. Most other algorithms use iterative methods based on heuristics, which try to select a "good" subset of the input dataset as a set of vertices for the approximate model. Such methods can be used either for the first or for the second problem, depending on the test adopted to stop iteration. Refinement heuristics start from a grid whose vertices are a very small subset of input data. New data points are iteratively inserted as vertices of the model, until the required constraints are satisfied. Simplification heuristics work in the opposite direction, by iteratively discarding points from an initial model built over the whole data set. In this case, points are selected at each iteration in order to cause the least possible increase in the error. Some authors have also adopted techniques that extract morphological features from the initial dataset in order to obtain constraints for the approximate TIN [33, 217,245,257,283] (see also Section 5.2). Approximate RSGs can only be obtained by subsampling the grid, while TINs are much more flexible because of their irregular structure. Many possible approximate models at different accuracies, with different sizes, can be built from a given TIN. In the case of contour maps, there are limited possibilities to vary the resolution by removing lines, while line simplification permits to obtain a wide range of different resolutions, and data sizes. Refinement methods. In [101], Fowler and Little propose a method that starts from an RSG and builds an approximate TIN in two steps. First, point features are selected using the method described in [217], and an initial TIN is built based on the Delaunay triangulation

358

L. de Floriani et ah

of such points. Then, the model is refined by iteratively adding the point corresponding to the maximum approximation error and updating the Delaunay triangulation. A similar algorithm (not involving point features) was also developed by Franklin, and an efficient implementation is available in the public domain [108]. A similar strategy was applied in [257] by using a different method for feature selection, and a data dependent triangulation: the local optimization procedure (edge swapping) applied after each point insertion tries to minimize the error of the current model. However, convergence to a global minimum is not guaranteed. Variants of the same strategy, modified for a number of data dependent triangulations were also applied in [231]. Simplification methods. Lee proposed a simplification technique based on the Delaunay triangulation [174]. A Delaunay TIN is built first over the whole dataset. Then, vertices of the TIN are iteratively dropped, based on a criterion symmetric to the one of Fowler and Little: at each iteration, the point whose deletion causes the least increase in the error is dropped, and the triangulation is updated consequently. Another simplification algorithm based on the hierarchical triangulation scheme of Kirkpatrick [161] has been proposed by de Berg and Dobrindt [50] with the purpose of building a multiresolution model (see Section 4.4). In this case, a maximal set of independent vertices is dropped at each iteration, and holes are filled by a Delaunay triangulation. Variants of the above algorithms have been analyzed and compared by De Floriani et al. [63]. A number of other simplification methods have been proposed for the more general case of free form surfaces. For surveys on such methods, see [135,226]. 4.4. Multiresolution terrain models Approximation algorithms reviewed in the previous section are usually time intensive: the construction of an approximate TIN from a dataset of 1OOK points can take minutes, or even hours, on state-of-the-art workstations, depending on the algorithm used. On the other hand, many applications need to access and process terrain models at different accuracies in a real-time context. For example, in a flight simulator, a terrain must be rendered at a high detail only close to the observer. Since the viewpoint is continuously moving, the required accuracy is changing from frame to frame, while the system cannot wait until a suitable terrain approximation is recomputed each time from scratch. The ability to provide a representation whose accuracy is variable over the domain is often called selective refinement. A so-called LOD {level-of-detail) model is a simple sequence of approximate representations at increasing levels of detail. LOD models are standard technology in graphics languages and packages, such as Openlnventor™ [209,288], and VRML [277], and are used to improve efficiency of the rendering on the basis of distance from the observer. However, such models cannot support selective refinement. In order to overcome such limitations, more sophisticated multiresolution terrain models have been developed in the literature. A multiresolution model must: • perform selective refinement for any given accuracy in short (real) time; • provide always conforming meshes, i.e., avoid cracks due to abrupt transition between different levels of detail within a mesh;

Applications

of computational

geometry to geographic information systems

359

.^^

SIMPLIFICATION

Fig. 2. The sequence local modifications generated during the incremental refinement/simplification of a triangulation.

• have a size not much higher than the size of the model at full resolution. In the following, we describe a general framework, called a Multiresolution Mesh (MM) [62,224]. Multiresolution models proposed in the literature will be reviewed next as instances of such a framework. Existing multiresolution models based on domain decomposition are all obtained from an initial model, which is progressively modified by a generalization algorithm (either by refinement or simplification). In a straightforward approach, a modification simply replaces a whole terrain representation with another one. More general modifications are local, i.e., they affect only a small part of the surface. Figure 2 shows a sequence of triangulated grids generated through incremental refinement/simplification and the sequence of modifications corresponding to the refinement process (including the initial grid). Two successive modifications can be either independent, if they affect disjoint parts of the mesh, or the second modification may depend on the first one, if some of the grid elements introduced by the first one are removed by the second one. Dependency means that the second modification cannot occur if the first one did not occur before. Each local modification can be represented by the set of mesh elements it introduces, which is called a component. Dependency relations define a partial order on the set of components, which can be represented by a DAG (see Figure 3). The collection of such components, plus the partial order, form a Multiresolution Mesh (MM), which is at the heart of any multiresolution model. An MM has several interesting properties that have been investigated in detail in [224]. In particular, any consistent (i.e., dependency-closed) subset of components defines a mesh representing the terrain at a given level of detail: such a mesh is obtained by performing the corresponding local modifications in any temporal sequence consistent with the dependency relation. Moreover, it is also true that any possible mesh made of elements belonging to any component of the MM can be obtained from some consistent subset. Therefore, selective refinement on an MM consists of finding the consistent subset that is most suitable to a given LOD.

360

L. de Floriani et al.

Fig. 3. The MM corresponding to the sequence of local updates in Figure 2.

We generically refer to the capability of an MM to provide a larger or smaller number of consistent subsets (hence, different meshes) as its expressive power. The internal structure of any specific MM determines its expressive power. An MM with few large components with many mutual dependencies will have an expressive power much lower than an MM with many, small components with few mutual dependencies. If an MM is obtained through refinement, any local modification increases resolution (and size) of the mesh locally. In this case the MM is said increasing. Even if an MM is built through simplification, it is possible to reverse modifications composing it, in order to obtain an increasing MM. All multiresolution models proposed in the literature can be interpreted as increasing MMs: in practice, every model is characterized by special rules used for generating the local updates of the MM, by the data structures adopted, by the operations supported, and by the efficiency of accessing algorithms. However, viewing the model as an MM helps understanding its expressive power independently of the specific data structures and algorithms. Multiresolution models can be subdivided in two major classes, according to their structure: • tree-like models are based on nested subdivisions; in order to give an interpretation of such models as MMs, the corresponding tree structure must be suitably translated into a DAG; • evolutionary models directly store the evolution of a mesh through a refinement/simplification process; since such models are based on the concept of local modification, they are all straightforward specializations of the MM. Tree-like models. Early hierarchical models are based on the recursive subdivision of a domain either into four quadrants {quadtree) [242], or into four equilateral triangles {quaternary triangulation) [77,118,120]. The resulting hierarchy is represented by a quaternary

Applications

of computational

geometry to geographic information systems

361

tree. The main drawback with such models is a poor expressive power, due to the impossibility to combine elements from different levels of the tree into a conforming mesh. A surface corresponding to a non-conforming mesh is affected from cracks between elements from different levels. If a quadtree (or a quaternary triangulation) is regarded as a special instance of an MM, it is easy to see that all nodes at each level of the tree must be clustered to form a single component, hence giving a pyramid of full regular grids. The basic problem with these models is that all edges of a region are split when the region is refined. In order to avoid cracks in the surface, the refinement of one region enforces refinement of its neighbors, and so on, propagating through the whole domain. Von Herzen and Barr [278] proposed a method to build conforming meshes from a quadtree that works in two steps: the extracted mesh is locally balanced first, by allowing adjacent elements to differ for no more than one level in the tree; next, each element is triangulated through a fixed pattern that depends on the levels of its neighbors. Lately, other authors have worked on similar concepts: hierarchies of right triangles are based on the recursive split of a right triangle into two, by joining the midpoint of its longest edge to its opposite vertex [73,90,134,178]. The hierarchy is described by a binary tree, and it can be interpreted as an MM by clustering triangles at the same level that are adjacent along their longest edges: components of the MM are either squares or diamonds, each formed by four adjacent triangles, except border components. Because the resulting MM is made of a high number of small components, it has a high expressive power. This model has been used successfully for rendering terrains in flight simulation through selective refinement [73,90,178]. All models based on regular subdivisions can be encoded by extremely compact and efficient data structures, by exploiting their algebraic properties (see [90,134,242] for details). On the other hand, such models can be used only if data points are distributed on a square grid. Other tree-like models have been developed, based on irregular triangulations, which can work on arbitrary datasets, and can achieve a better ratio between size and accuracy of an extracted mesh, because no constraint is imposed on the vertex distribution [61, 246]. A triangle is refined by inserting a non-fixed number of points, either inside it, or on its edges, on the basis of an error-driven refinement criterion. Edges that survive across different levels of the hierarchy permit to combine surface patches from different levels of the tree. Components of an MM corresponding to one such model are obtained by clustering nodes that refine adjacent triangles inserting vertices on their common edges. Each level of the tree is partitioned into a set of components, each bounded by edges that are not refined at that level. In general, a model with many refined edges will lead to an MM with few large components, hence reducing its expressive power. On the other hand, a model with few refined edges may contain many slavery triangles: this gives unpleasant visual effects, and stability problems in numerical computation. In [61], a comprehensive analysis of tree-like models is presented, covering several issues about data structures, neighbor finding, and selective refinement. Evolutionary models. Multiresolution is obtained by recording the evolution of a mesh through a sequence of local modifications (either refinement or simplification). Interpreting

362

L. de Floriani et al.

an evolutionary model as an MM is straightforward: each modification step performed by the algorithm generates a new component. The forerunner of evolutionary models is the Delaunay pyramid proposed in [56]. Such a model is based on a sequence of Delaunay triangulations at increasing resolutions, obtained according to a predefined sequence of decreasing error thresholds. The transition from a triangulation to the next is obtained by iterative refinement [101]. The corresponding MM is obtained by decomposing such global modification into maximal local independent modifications. The expressive power of the model may be low because it does not trace the insertion of single vertices: the MM may have a relatively small number of large components. The model proposed in [50] is also based on a sequence of Delaunay triangulations, but it is built bottom-up: each level is obtained from the previous one by eliminating an independent set of vertices of bounded degree. The corresponding MM is formed by a large number of components, namely one for each decimated vertex; moreover, the height of the DAG is logarithmic in the number of nodes. This property guarantees a good worstcase complexity of geometric search algorithms such as point location. The data structure is a direct implementation of the DAG. The algorithm for selective refinement proposed in [50] achieves output-sensitive optimal time, but it does not guarantee that the desired threshold will be fulfilled everywhere. Evolutionary models based on a totally ordered sequences of local updates, rather than a DAG, can be encoded by very compact data structures. In order to perform selective refinement, the basic idea is to scan the list of updates, performing only those relevant to achieve the required accuracy. Unfortunately, a straight scan is not sufficient, since skipping an update may prevent performing some later update that is necessary to fulfill the accuracy. Therefore, dependencies between updates must be computed on-the-fly, thus involving complex, and computationally expensive algorithms. An extremely compact model based on the Delaunay triangulation is proposed in [162]. In this case, a greedy refinement/decimation through on-line insertion/deletion of single vertices into a Delaunay triangulation is performed. The data structure stores only the simplest mesh, plus the sorted sequence of vertices inserted to refine it, each tagged with the approximation error of triangles incident at such vertex at time of its insertion. A mesh at uniform accuracy can be extracted through an on-line algorithm for Delaunay triangulation that inserts vertices from the sequence until the desired accuracy is obtained. An algorithm for selective refinement is also outlined, which perform complex tests based on the circumcircle criterion to find out vertex dependencies. A similar model, called Progressive Meshes {PM), is proposed in [145], based on a different update strategy. In this case, the basic local modification is vertex split, which expands a vertex to an edge. As for the previous model, the data structure stores only the simplest mesh, and the sequence of vertex splits. The extraction at uniform accuracy is faster than in [162] because no numerical computation is required. In the attempt to obtain efficient algorithms for selective refinement from a PM, more sophisticated data structures encoding also vertex dependencies have been proposed in [146,186,293]. In [293], a progressive mesh is built by collapsing independent sets of edges, following a technique similar to that used in [50].

Applications

of computational

geometry to geographic information systems

363

The Multi-Triangulation (MT) is a straightforward implementation of the MM framework, where every component is a triangulation [62,224]. An explicit data structure encodes all components of an MT as nodes, and maintains all arcs of the DAG describing the MT: every arc (7/, Tj) is labeled by the set of triangles of 7/ covered by Tj. Each leaf of the DAG is connected to an additional drain node, and each new arc is labeled with triangles of its source node that survive in the drain node. Based on this arc labeling, the explicit data structure represents triangles on arcs rather than on nodes of an MT. This data structure supports the extraction of a mesh by collecting all triangles labeling arcs in a given cut of the DAG. An algorithm for selective refinement that finds the minimal triangulation for a given arbitrary threshold was described first in [224], and improved in [63]. The time complexity is linear in the size of the visited consistent subset. Independently, a similar algorithm was proposed in [26], achieving similar results. A dynamic algorithm proposed recently [65] permits to update a mesh extracted from an MT after a small change in the threshold function. Such an algorithm only visits the portion of DAG separating the old and the new solution, respectively. This algorithm is especially efficient for generating gradually changing levels of detail in an interactive environment (e.g., flight simulation). A cheaper, but less efficient implicit data structure for MTs built through refinement/simplification of a Delaunay triangulation has been proposed in [64]. In this case, each component consists of a fan of triangles incident at a vertex, and is represented in the structure by storing just the vertex. Implicit data structures can be defined for MT obtained as progressive meshes, and for the hierarchy of right triangles as well. Although the storage cost is reduced by these structures, empirical results show that the algorithm for selective refinement may run about ten times slower, and also the size of the output mesh may be about twice larger [64]. The HyperTriangulation (HyT) proposed in [40] can be also considered an implementation of an MT, but the data structure is completely different. Based on the observation that the boundary edges of a component T coincide with those of the triangulation covered by r , components in a hypertriangulation are interpreted in a three-dimensional space, where the third dimension corresponds to a resolution axis. Each component forms a "dome" in such a space, resting on the components it covers through its boundary edges. The data structure stores the triangles of the MT, and triangle adjacencies in the complex formed by such domes. Adjacency information supports algorithms based on domain traversal. Such an algorithm is used to perform selective refinement for threshold functions that are monotonically increasing with distance from a given viewpoint. The time complexity in the worst case is 0(n logn) where n is the size of the HyT. Empirical results of the extraction algorithm show a performance of about lOOK triangles per second on state-of-the-art workstations. Methods based on wavelets. In the literature, also other kinds of multiresolution models have been proposed, which follow afunctional approach rather than a geometric one. The basic idea is that a function can be decomposed into a simpler part at low resolution, together with a collection of perturbations, called wavelet coefficients, which define its details at progressively finer levels of resolution.

364

L. de Floriani et ah

Wavelets have been widely used for multiresolution representation and compression of signals and images (see, e.g., [259,260] for a survey), while their applications to surfaces is quite recent (see [181] for a survey, and [122] for an application to terrain surfaces). The discrete computation of wavelets requires a recursive subdivision of the domain into regular shapes, like equilateral triangles, or squares. Therefore, resulting hierarchies correspond to either quaternary triangulations, or quadtrees. The use of tools from numerical analysis is predominant, while computational geometry techniques do not play a relevant role in this context. 5. Terrain analysis Complex analyses of terrain models include [286]: • computation of visibility maps, and solution of visibility-related problems; • terrain generalization, and feature extraction; • computation of watershed, and drainage networks; • realistic visualization; • path planning. Terrain generalization issues have been treated in Section 4.3 for building approximated and multiresolution models. Related issues will also be considered in Section 5.2 on topographic features. Rendering of DTMs and related information includes procedures for orthographic display (contours, hillshading, etc.), perspective display as well as advanced visualization techniques (interactive scene navigation, animation, etc.). Terrain visualization issues are related to viewshed computation problems (see Subsection 5.1). Also, some modeling issues related to effective real-time rendering of a DTM have been discussed in Section 4.4: approximate and variable resolution terrain models directly support compression for efficient rendering, and animation. 5.1. Visibility Visibihty problems are concerned with the computation of visibility information from a viewpoint which can lie outside or inside the domain, or with the use of visibility to solve optimization problems (see also Chapter 19). Examples of visibihty computations are finding the horizon or computing the visible portions of the surface from a given viewpoint; in the latter case, the problem is a special case of the Hidden Surface Removal (HSR) for terrains. Visibility computation algorithms are the basis for solving optimization problems. Examples of optimization problems related to visibility are finding the minimum number of towers of a given height necessary to view an area of the terrain, or finding the minimum path with specified visibility characteristics (e.g., hidden paths, scenic paths). Applications include the location of fire towers, radar sites, radio, TV or telephone transmitters, path planning, navigation and orientation (see [203] for a survey). Visibility computation problems can be classified into: • visibility queries, which consist of determining whether a given entity located on the terrain is visible from a viewpoint, and possibly which portions of it are visible;

Applications of computational geometry to geographic information systems

365

366

L. de Floriani et al.

grid element with the number of viewpoints from which it is visible. Although a discrete viewshed is sometimes considered also for a TIN [175], viewshed computation in this case is usually performed by computing the visible portions of individual triangles. The continuous approach on RSGs is not used for two reasons: the size of the grid, and the complexity of geometric computations involving quadratic interpolating functions. Visibility for an RSG cell can be computed easily by walking from the viewpoint to the given element, along the elements intersected by a line-of-sight, until either visibility is blocked, or the target is reached. This method performs redundant computations, since rays to different cells of the grid may overlap partially, van Kreveld [271 ] proposes a sweep-line approach to compute discrete viewsheds on an RSG in 0{n \ogn) time on a v ^ x V^ grid. Visibility computation on RSGs is conceptually simple, but it becomes computationally intensive due to the size of the grid. Viewshed computation on a TIN is related to the Hidden Surface Removal (HSR) problem in a three-dimensional scene. The general quadratic upper bound to HSR for a polyhedral scene [247] applies also to the special case of a polyhedral terrain, thus giving a worst-case space complexity equal to G(n^) for the viewshed of a TIN with n vertices. The HSR problem for a three-dimensional scene has been extensively studied in the literature [49,158,191,211,247]. Some specific algorithms for polyhedral terrains have been developed [222,229]. Another approach to HSR reduces to computing the upper envelope of a set of disjoint polygons in space [23,69,80]. The upper envelope of a set of polygons in 3D defines a partition of the x-y plane into maximal connected regions, each of which is labeled with a polygon: the polygon n labeling a region R is the polygon with maximum height over R. The visible image of a polyhedral terrain with respect to a viewpoint V is equal to the upper envelope of the set of its faces, whose height is considered with respect to their distance from the viewplane. Computing the viewshed on a TIN reduces to computing the upper envelope of a set of semi-disjoint triangles. The approaches used in existing algorithms for viewshed, HSR, or upper envelope computation can be classified as follows: • an approach in which the faces are processed in front-to-back order from the viewpoint; • a divide-and-conquer approach; • a sweep-line approach; • an on-line approach, which processes faces incrementally in any order; • an approach based on special data structures for answering ray shooting queries. Some algorithms also combine different approaches together. In the following, we provide a brief survey of existing algorithms, according to the above classification; the reviewed algorithms are summarized in Table 2. ThQ front-to-back approach is the most popular method for performing HSR in a scene. A scene is front-to-back sortable with respect to a viewpoint if there exists an ordered sequence of its faces such that no face coming later in the sequence can obscure a face preceding it. Not all scenes are sortable: terrains are always sortable for viewpoints lying outside the domain, while Delaunay-based TINs are guaranteed to be sortable also for internal viewpoints [57]. There are standard techniques for making a generic PTM sortable by splitting some of its faces. Most front-to-back algorithms process faces in increasing distance order from the viewpoint, and maintain at each step the "contour" of the current visible image (i.e., the bound-

Applications

of computational

geometry to geographic information systems

367

Table 2 Major existing algorithms for region visibility computation Algorithm

Approach

Input

Sortable

[80] [158] [222,229] [208,247] [121] [49] [211] [69] [49]

Divide-and-conquer Divide-and-conquer, front-to-back Front-to-back Sweep-line Sweep-line Sweep-line, ray shooting Back-to-front, incremental On-line On-line, ray shooting

Triangles Polygons PTM Polygons Polygons Polygons Triangles Triangles Polygons

No Yes Yes No Yes No Yes No No

ary of the union of the projections of the faces processed so far). When a new face is projected onto the viewplane, its edges are tested for intersections only against the edges of the contour. When the scene is a terrain, the contour is the same as the horizon, restricted to the subset of terrain faces which have been already examined. The algorithms by Reif and Sen [229], and Preparata and Vitter [222] are based on such approach, and run in 0((^ + k) log^ n) time, where n is the size of the terrain model, and k is the size of the computed visible image. The algorithm proposed by Overmars and Sharir in [211] represents a very effective method for computing the visible image of a sortable set of triangles. This algorithm combines the incremental and the divide-and-conquer approaches: triangles are added in backto-front order, in groups, and at each step the visible image of the new set of triangles is merged with the old visible image. The algorithm works in 0(n^/clogn + k), time, where c is the maximum contour size; for a polyhedral terrain, c = 0(na(n)), and thus we have an 0(n^/na(n)logn -f k) complexity. The divide-and-conquer approach includes the worst-case optimal algorithm by Edelsbrunner, Guibas and Sharir [80], which computes the upper envelope of a set of n disjoint triangles in optimal 0{n^) time, and can be used for determining the viewshed on a TIN. The method proposed by Katz, Overmars and Sharir [158] applies a divide-and-conquer strategy in a sortable three-dimensional scene to achieve an output-sensitive complexity. A balanced binary tree is built, whose leaves correspond to the faces (the left-to-right order on the leaves reflects the front-to-back order on the corresponding faces), and every internal node represents the union of the faces stored in its subtree. Then, the visible portion of the object associated with each node are computed during a traversal of the tree; at the end of the traversal, the visible portion of each face are found in the leaves of the tree. The time complexity is output-sensitive and, for a sortable PTM, it is equal to 0{{na{n) + d) logn), where n and d are, respectively, the input and the output size. Sweep-line algorithms first project the whole scene onto the viewplane, and then traverse it by moving a vertical line from left to right. The time complexity is equal to 0((w + k)\ogn), where k is the number of intersection points between terrain edges projected onto the viewplane [121,208,247]. The algorithm by de Berg [49] computes the viewshed

368

L. de Floriani et ah

on a TIN in an output-sensitive way, by combining a sweeping technique with the use of efficient data structure for answering ray shooting queries. On-line incremental algorithms operate on a generic set of polygons or triangles, without any assumption about properties of the scene. An on-line randomized algorithm for computing the upper envelope of a set of triangles in the space (and thus the viewshed of a TIN) has been proposed by Boissonnat and Dobrindt [23]. The expected time complexity is equal to 0{n^ \ogn) for disjoint triangles. Horizon algorithms. The horizon of a viewpoint on a PTM is equal to the upper envelope of the set of segments obtained by projecting the terrain edges onto a viewplane. The upper envelope of a set of segments in the plane (in our case, the viewplane) is a piecewise linear, possibly non-continuous line formed by the collection of points belonging to some of the segments and lying below no other segment in the given set. The size of the upper envelope of p segments in the plane is &{pa{p)) [45]. Thus, the complexity of the horizon of a polyhedral terrain with n vertices is equal to 0{na{n)). Computing the horizon of a viewpoint on a polyhedral terrain reduces to the computation of the upper envelope of a set of possibly intersecting segments in the plane. Upper envelope algorithms have been proposed based either on a divide-and-conquer or on an incremental paradigm. The classical divide-and-conquer scheme [10] runs in 0{pa(p) log p) time. A more sophisticated technique, which apphes special care to split the set of segments into subsets with certain characteristics, achieves an optimal 0(p log p) computational complexity [137]. A simple incremental approach has a complexity of 0(p^a(p)), since adding the i-th segment can cause the modification of each of the ia(i) intervals of the current envelope, while a randomized incremental algorithm proposed in [60] has an expected time complexity of 0(pa(p) log p) for inserting all the given segments in random order. Visibility computation on hierarchical models. Visibility computation problems have been addressed in the context of hierarchical terrain models by De Floriani and Magillo [66]. In this framework, two issues have been considered: the computation of visibility information, related to a terrain representation at a certain resolution level, and the update of such information, as the required resolution changes. Distance-based and sweep-line viewshed algorithms can work on a hierarchical terrain model by performing a traversal of its tree-like structure. Dynamic algorithms can be used to update viewsheds and horizons after local changes in the level of detail of a terrain representation (i.e., replacement of a subset of terrain faces and edges with a finer/coarser description) [69,66]. Visibility-related problems. Examples of interesting application problems on a terrain, which can be solved based on visibility information, are: • problems requiring the placement of observation points on a topographic surface according to certain requirements; • line-of-sight communication problems; • problems regarding the computation of visibility paths on a terrain, with certain properties.

Applications

of computational

geometry to geographic information systems

369

Puppo and Marzano [225] investigate the connection between visibility-related problems in a discrete setting, and classical problems in graph theory: they show that graph algorithms can provide efficient and practical solutions to many visibility-related problems, belonging to all three classes listed above. Viewpoint placement problems require placing several observation points on a terrain in such a way that each point of the terrain (or of a focus area on it) is visible from at least one observation point. Applications include the location of fire towers, artillery observers, and radar sites. For a single observation point, algorithms running in polynomial time are known. If the height of the viewpoint is fixed, an existing solution can be determined in 0(n logn) time, while the point with the lowest elevation, from which the entire terrain is visible, can be determined in 0(n\og^n) time [252], on a polyhedral terrain model with n vertices. Recently Zhu [295] improved the complexity to 0(n log* n). The more general problem of determining the smallest number of observation points, which collectively see the entire terrain is known as the guard allocation problem and it is usually addressed by constraining viewpoints to be placed on the vertices of a polyhedral terrain. The problem has an exponential complexity, and it is equivalent to set-covering. Several heuristic algorithms to minimize the number of viewpoints, with fixed or variable height, are discussed in [175]. In the same paper, also the inverse problems are considered, that is, finding the optimal locations of viewpoints to maximize the visible area, assuming that the number and, possibly, the height of viewpoints as fixed. Bose et al. [24] reduce the guard allocation problem to a graph coloring problem and provide efficient heuristics to place viewpoints located at the vertices or on the edges. Line-of-sight communication problems consist of finding a visibility network connecting two or more sites, such that every two consecutive nodes of the network are mutually visible. Applications are in the location of microwave transmitters for telephone, FM radio, television and digital data networks. Usually, sites are restricted to be at terrain vertices. Finding the minimum number of relay towers necessary for line-of-sight communication between two sites can be formulated as a shortest path search in a graph where nodes are terrain vertices and arcs represent pair of mutually visible vertices, called a visibility graph. The problem of constructing a line-of-sight network between several sites is addressed in [59] by reducing it to the computation of a minimum Steiner tree on the visibility graph; memory requirements are kept low by computing the arcs of the graph on-line. Visibility paths can be defined on a terrain, with application-dependent visibility characteristics. A smuggler's path is the shortest path, connecting two given points, such that no point on the path is visible from a predefined set of viewpoints. Conversely, a path where every point can be seen from all viewpoints is known as a scenic path [203]. Simple solutions can be obtained on a TIN by restricting the viewpoints to be vertices, and the path to pass along edges. The solution (if there exists) can be determined by first computing the vertices which are visible/invisible from all the viewpoints, and then applying a standard shortest path algorithm to the edges connecting them.

370

L. de Floriani et al

5.2. Topographic features Topographic features are special points, lines and regions that have a specific meaning for describing the shape of the terrain: they correspond to local differential properties of the terrain surface. A point of the surface belongs to some characteristic class depending on the structure of the surface in its neighborhood. Point features are peaks, pits 2iXid passes. A peak is a point of relative maximum, a pit is a point of relative minimum, a pass is a saddle point for the surface, i.e., a point where there is a local maximum in one direction and a local minimum in a different direction. Lineal features are ridges and valleys. A ridge is a curve consisting of ridge points: a point lies on a ridge if its neighborhood can be subdivided by a line passing through it, and such that the surface in each half-neighborhood is monotonically decreasing when moving away from the line. A ridge occurs where there is a local maximum in the surface in one direction; a valley occurs where there is a local minimum in one direction. Based on point and lineal features. Wolf [289] proposes the use of weighted surface networks for terrain description. A weighted surface network is a graph whose vertices and edges are point and lineal features, respectively; each edge is weighted with the height difference between its two endpoints. Wolf also suggests a method for contracting such networks, thus providing also a tool for terrain generalization. Areal features are maximal regions on the terrain where the surface is flat, convex or concave. Such features are related to the curvature of the surface along two independent directions. For smooth surfaces they depend on the sign of the second derivative. According to this classification, any point on a terrain can be labeled to belong to one of the above features by applying differential geometry tools. An interesting classification of topographic features can be found in [283]. In the discrete case, algorithms are essentially based on the analysis of the neighborhood of the points in the domain. In the literature, most methods have been developed for RSGs with the stepped model, because the neighborhood of each pixel is directly implied from the grid structure. The interpolation is commonly assumed to be constant on each grid cell, that is actually considered as a pixel in an image. The classical algorithm by Peucker and Douglas [217] classifies each pixel based on the height difference from its eight neighbors in the grid. In [254] the method is improved to find also ridges and valleys wider than one pixel. Methods developed in the image processing literature can also be used [132, 163,169]. Falcidieno and Spagnuolo [91] consider a virtual triangulation of the grid, where each cell is subdivided into four right triangles, and apply a method suitable for TINs (see below). Mc Cormack et al. [190] identify depressions and plateaus by propagating "seeds" consisting of connected regions of pixels with the same elevation, and bounded by pixels with a higher and lower elevation, respectively. Watson et al. [283], and Haralick [132] use RSGs with surface interpolation techniques. In the case of TINs, point and lineal features are vertices and chains of edges in the underlying triangulation, respectively. Areal features are connected collections of triangles defining convex, concave or flat regions. A characterization of features on a TIN can be found in [103]. An algorithm for surface characterization from a TIN, based on the local analysis of the dihedral angle formed by adjacent triangular patches, is proposed in [91].

Applications

of computational

geometry to geographic information systems

371

Each TIN edge is labeled as convex, concave or flat depending on the slopes of its two incident triangles. Then, a triangle can be labeled based on the types of its edges (e.g., a triangle is convex if its three edges are convex), and convex, concave and flat surface regions are computed by aggregating triangles labeled in the same way. A compact representation of a TIN obtained by merging triangles into regions of uniform curvature is proposed as well.

5.3. Drainage networks Terrain drainage characteristics provide information on water resources, flood areas, erosion, and natural resource management. Manual quantification of terrain drainage characteristics is a tedious and time-consuming task. Thus, efforts have been undertaken to compute such characteristics from a terrain model. On a terrain water flows downstream according to gravity and collects into streams, which join and form rivers. The collection of all streams and rivers forms the drainage network of the terrain. A drainage network can be seen as a forest in which the arcs are directed towards the pits. Hence, the computation of a drainage network is strongly related to the computation of point and lineal features of the underlying terrain (see [294] for a survey). If we consider a terrain as a continuous surface, a drainage network can be characterized in terms of differential geometry (see [163,164]). There is no accepted definition of the drainage network on an RSG. As noted by Yu et al. [294], the network is defined as the result of an algorithmic process. As for the case of feature extraction, local methods based on image processing techniques are applied on RSGs [72,276]. Mark [188] proposes a global approach: all the cells are sorted in order of decreasing elevation and, initially, each cell is assigned one unit of fluid. Each cell in order adds its fluid to the lowest of its eight neighbors. At the end, cells receiving more than a certain quantity of fluid are declared to be on the drainage network. In this way, also the accumulation of water flowing in the terrain is modeled. Quantifying the accumulation of water is also useful for identifying drainage basins, i.e., surface regions formed by pixels whose water flow reaches the same pit. The general assumption is that water flows from higher to lower heights. Flat regions and plateaus cause disturbs in water flow computation because the direction of flow is not well defined. Similar problems occur at depressions: in a real terrain, water cannot accumulate infinitely, thus it is necessary to determine the overflow points and directions for a depression. Many algorithms use simple heuristics based on local modification of the flow [150,200,143]. Mc Cormack et al. [190] note that the local modification of a drainage network without knowledge of its overall structure may have unpredictable effects. Therefore, they propose a feature-based approach to computation of drainage networks and basins on an RGS, which identifies inflow and outflow points for each depression and plateau, and defines the flow through the flat region as a line connecting them. On a TIN, a definition of a drainage network, as a collection of all valley edges has been proposed by Frank et al. [103]. This definition has the drawback of possibly producing

372

L. de Floriani et al.

interrupted streams, because the actual location of a stream may not coincide with a triangle edge in the TIN. In addition, there is no concept of flow, so basins cannot be modeled. Yu et al. [294] introduce a broader definition of drainage network on a TIN, which also allows streams to pass through the interior of a triangle. Their definition is based on the following four assumptions: (i) at any point, water follows the steepest descent; (ii) watercourses can merge (thus the drainage network is a forest); (iii) watercourses end only at local minima; (iv) at any point there is a unique direction of steepest descent. The drainage network is defined as the collection of those points on the terrain that receive water from a region whose area exceeds a certain threshold value. They propose an algorithm for computing the network which runs in 0(n + k) time, where n is the size of the TIN and k the size of the drainage network. In [52] it has been proved that the complexity of the drainage network, as defined in [294], in a TIN with n vertices may be 0{rv'). By contrast, the drainage network defined according to Frank et al. [103] has a linear space complexity.

5.4. Path problems In this subsection, we deal with path problems on a terrain model (for path computation on a map see Subsection 3.5). Refer also to Chapter 15. Different optimality criteria for paths can be defined on a terrain [268]: measures of the quality of a path include the Euclidean length, the maximal height along the path, the total height difference, and the maximal slope of the path. Several results appeared in the computational geometry literature on the shortest geodesic path problem. In particular algorithms have been proposed for computing such path on convex [201,251] and on non-convex [34,195] polyhedra. The best result is due to Chen and Han [34] who propose an O(n^) algorithm. Since polyhedral terrains are approximations of real surfaces, simpler and more practical algorithm which find an approximation to the optimal solution are sufficient and more desirable. Approximate algorithms for convex polyhedra are described in [3,35,133,170], and for general polyhedra in [5]. Lanthier et al. [170] consider the problem of computing an approximate shortest path between two points on a TIN when each face has an associated weight. This is an instance of the weighted region problem discussed in Subsection 3.5. They propose practical algorithms based on the placement of Steiner points at edges of a polyhedral terrain, and on shortest paths on graphs. A good feature of such algorithms is that execution time and space requirements can be traded for accuracy, thus such algorithms can be used to build a sequence of shortest paths with increasing accuracy. Experimentally, the complexity of such an approach is 0{n logn), while a worst case analysis leads to O(n^) and 0{rv' \ogn) complexities. A heuristic technique based on discarding the parts of the terrain where the shortest path cannot pass through has been proposed in [15]; this approach, however, applies to regular triangulations, like quaternary ones. In [268] algorithms are presented for the other quality measures discussed at the beginning of this subsection. In [54], algorithms are presented for answering path queries on a TIN in O(logn) time (with a preprocessing time of 0{n\ogn)). Such algorithms support queries like deciding whether there exists a path between two points whose height de-

Applications of computational geometry to geographic information systems

373

374

L. de Floriani et al.

151,81], and algorithms which start from a single tetrahedron and progressively add new tetrahedra adjacent to the existing ones [12]. The problem of computing a constrained Delaunay tetrahedralization has been shown to be NP-complete [236]. Heuristic algorithms have been proposed which compute a conforming Delaunay tetrahedralization: the idea is replacing each data segment with a set of points, in such a way that the original segment will be a chain of edges in the output tetrahedraUzation [21]. Although there is no bound to the number of points which must be added to guarantee that all given segments are included in the resulting tetrahedralization, these methods seem good in practice. For details refer also to Chapter 5. The Delaunay tetrahedralization has also been applied to reconstructing the boundary surface of solid objects. Input data for this problem are scattered points and/or segments lying on the object boundary. A common approach starts with the Delaunay tetrahedralization of the whole data, whose domain is the convex hull of the data set, and progressively removes tetrahedra in order to move internal points, or internal segments, on the boundary. The sculpturing method [20,21] deletes tetrahedra iteratively based on heuristic considerations and topological constraints. The alpha-shape approach [84] deletes all tetrahedra which can be "erased" by a sphere of a given radius, under the constraint that the sphere cannot pass through the data point. The radius is chosen through a binary search as the smallest value able to guarantee the consistency of the resulting shape. The alphashape method cannot resolve deep and narrow holes in the surface: such problem can be solved by applying the sculpturing method in a final step [14]. The method proposed by Veltkamp [267] for scattered segments is based on a different geometric structure, called the y-neighborhoodgraph. The y-neighborhood graph is a parametric graph that provides a continuous spectrum of graphs ranging from the empty to the complete graph (and including the Delaunay tetrahedralization as well). A suitable value of the parameter is chosen in order to obtain a feasible approximation of the object shape. A completely different approach is used in [144]: based on the available points, a function in 3D space is defined which pointwise estimates the distance from the unknown surface; then, a conventional algorithm (e.g., marching cubes) is used to extract the isosurface corresponding to the zero value of the function, which provides the final surface approximation.

7. Concluding remarks Computational geometry offers rigorous and powerful tools for solving a variety of geometric problems in GIS. In this survey, we have reviewed issues concerning efficient data structures to store geometric information on geographic data, and algorithms for basic spatial queries, overlay, map generalization, labeling, construction and conversion of terrain models, terrain approximation and multiresolution, visibility, extraction of topographic features, drainage networks, paths, as well as a handful of other specific problems. At the state of the art, computational geometry tools are effective for many such problems, yet GIS practitioners often adopt heuristics that are less rigorous and efficient. This gap between theory and practice used to be justified by the difficulty of coding computational geometry algorithms, and especially because practical performance often did not follow from theoretical efficiency. Indeed, the search for asymptotic efficiency in the

Applications

of computational

geometry to geographic information systems

375

worst case (which hardly occurs) sometimes leads to very involved algorithms that perform poorly on real data configurations. Although in some cases this is still true, recent advances, and research trends in computational geometry show that many theoretically rigorous tools either are, or will become soon, competitive also in practical applications [261]. The following issues have great relevance in making computational geometry effective, and easily available to practitioners. • Randomized algorithms use more realistic models for evaluating the computational complexity, and may provide solutions as easy to program as brute-force approaches, and with provably good performance on real-world data. This class of algorithms is consolidated in computational geometry, and textbooks are already available [202]. Refer also to Chapter 16. • Robustness in numerical computation is of primary importance, since errors due to floating-point arithmetic can compromise not only the accuracy, but even the correctness of results [142]. The problem of robustness has been faced by developing either methods for exact arithmetic [100], or algorithms that guarantee a correct result with finite precision [126], ox adaptive precision [179] in geometric computations. • Computational geometry libraries provide standard implementations of geometric algorithms, together with application programming interfaces that make such tools easily usable by practitioners. Developing and engineering libraries is perhaps the most successful way to export computational geometry technologies to applied fields. For instance, the LEDA library [204] provides a carefully engineered platform for developing discrete and geometric algorithms that is already used in industrial environments; the CGAL library [212] is under development, which can be integrated with LEDA, and offers tools for geometric robustness and specific algorithms for computational geometry; another geometric library under development is GeomLib [2]. From the point of view of researchers in computational geometry, the field of GIS is a highly stimulating arena, and a plentiful source of open problems. Strategic directions reported by the Computational Geometry Working Group [261] clearly indicate a list of hot issues — such as robustness, fine-grain complexity analysis, implementation, experimental evaluation, external-memory algorithms, dynamic and real-time computing, approximation algorithms, and parallel and distributed computing — all of which are relevant, and in some cases vital to GIS applications. The following open issues in GIS offer excellent cues for research. • Realistic map models should be based on decompositions more general than planar subdivisions or CW complexes, in order to capture situations like regions with holes, and point and lineal features. Also, efficient data structures to encode such maps should be developed. • Realistic queries in spatial databases always involve both geometric, and non-geometric aspects. A solution for such queries necessarily involves both geometric algorithms, and information retrieval techniques. A separate treatment of geometric and non-geometric issues often leads to inefficient solutions. An integrated approach to hybrid queries is currently lacking, and not even models for the evaluation of performances in resolving hybrid queries have been proposed yet. • The management of large spatial datasets in external memory is also very important, and related to the previous issue. Most algorithms and data structures in computational ge-

376

L. de Floriani et ah

ometry have been studied and developed for the primary storage, while this assumption is hardly realistic for any problem in GIS. Map generalization is an important task that involves many challenging geometric problems, and also requires the integration of geometric and non-geometric information. A comprehensive approach to generalization is still lacking. Serious achievements towards the automation of such task will probably require managing knowledge at a level much beyond the scope of geometry. However, a high benefit would come from an integrated treatment at least of all geometric problems. Compression and progressive transmission of data is relevant, especially in the context of web-aware applications. While for terrains different techniques already exist, either based on geometric compression, or on wavelets, the compression and progressive transmission of maps is a more complex issue, since it involves both geometrical and topological approximation. Multiresolution is currently a topic of great interest. Most of the work in multiresolution modeling of terrains (and, more generally, of surfaces) has been dealing with the problem of selective refinement, while most of the problems related with query processing, and terrain analysis at variable resolution are still an open issue. Facing such problems with a multiresolution approach may be vital to cope with the huge (practically worldwide) terrain databases that are becoming available. In the field of map processing, multiresolution is at an even earlier stage. As we discussed in Section 2.5, there are only a few empirical approaches based on heuristics, and few theoretically oriented works, based either on graph manipulation, or on transformations of cell complexes. The gap between theory and practice is still quite large. Important open problems are related to the design and development of efficient data structures, construction of multiple representations, and algorithms for answering spatial queries in a multiresolution framework, especially concerning spatial join (overlay), visibility, path computation, etc. Many optimization and approximation problems in GIS (e.g., terrain approximation, map labeling, some visibility-related problems) are intractable. Approximated algorithms that can run in reasonable time, and can guarantee bounds on the size of the result are very important to provide practical solutions to such problems. The field of 3D GIS, which is quite recent, offers many other cues of research. Much preliminary work is still needed in order to achieve a level of standardization sufficient at least to establish a common basis for researchers. In 3D, a classification of the different types of data, and of the relevant queries on them has still to be provided. Although both the kind of information and the queries will be often strictly dependent on the specific application (e.g., modeling geological phenomena, or modeling buildings in an architectural environment), a serious analysis from practice to theory may lead to identifying general modehng and computational issues that offer a key to a more integrated approach to spatial information handling. Besides the issues listed above, there are plenty of specific problems that still need to be investigated, such as intersection-free line and map simplification, conflation and rubber sheeting of maps, edge matching and change detection, progressive transmission of maps and terrains, etc.

Applications

of computational

geometry to geographic information systems

377

References [1] P.K. Agarwal and S. Suri, Surface approximation and geometric partitions. Proceedings 5th ACM-SIAM Symposium on Discrete Algorithms (1994), 24-33. [2] P.K. Agarwal, M.T. Goodrich, S.R. Kosaraju, F.P. Preparata, R. Tamassia and J.S. Vitter, Applicable and robust geometric computing (1995), available from http://www.cs.brown.edu/cgc/. [3] P.K. Agarwal, A. Har-Peled, M. Sharir and K.R. Varadarajan, Approximating shortest paths on a convex polytope in three dimensions, J. ACM (1997). [4] P.K. Agarwal, M. van Kreveld and S. Suri, Label placement by maximum independent sets in rectangles. Proceedings 9th Canadian Conference on Computational Geometry (August 1997). [5] P.K. Agarwal and K.R. Varadarajan, Approximating shortest paths on a polyhedron. Proceedings 38th IEEE Symposium on Foundations of Computer Science (1997). [6] P.K. Agarwal and P.K. Desikan, An efficient algorithm for terrain simplification. Proceedings 8th ACMSIAM Symposium on Discrete Algorithms (1997). [7] D.S. Andrews, J. Snoeyink, J. Boritz, T. Chan, G. Denham, J. Harrison and C. Zhu, Further comparison of algorithms for geometric intersection problems. Proceedings 6th International Symposium on Spatial Data Handling (1994), 709-724. [8] W.G. Aref and H. Samet, Uniquely reporting spatial objects: Yet another operation for comparing spatial data structures. Proceedings 5th International Symposium on Spatial Data Handling, Charleston, SC (1992), 178-189. [9] S. Aronoff, Geographic Information Systems: A Management Perspective, WDL Publications, Ottawa (1989). [10] M. Atallah, Dynamic computational geometry. Proceedings 24th IEEE Symposium on Foundations of Computer Science, IEEE Computer Society, Baltimora (1983), 92-99. [11] F. Aurenhammer, Voronoi diagrams —A survey of fundamental geometric data structures, ACM Comput. Surveys 23 (3) (1991), 366-405. [12] D. Avis and B.K. Battacharya, Algorithms for computing d-dimensional Voronoi diagrams and their duals. Advances in Computing Research 1, F.P. Preparata, ed., JAI Press (1983), 159-180. [13] C.L. Bajaj, V. Pascucci and D.R. Schikore, Fast isocontouring for improved interactivity. Proceedings 1996 SPIE Symposium on Volume Visualization, San Francisco (1996), 3 9 ^ 6 . [14] C.L. Bajaj, F. Bernardini, J. Chen and D.R. Schikore, Automatic Reconstruction of 3D CAD Models, Theory and Practice of Geometric Modeling, W. StraBer, R. Klein and R. Rau, eds. Springer-Verlag (1996). [15] R. Barrera and J. Vazques-Gomez, A shortest path algorithm for hierarchical terrain models. Proceedings AUTO-CARTO 9 (1989), 156-163. [16] B. Baumgart, A polyhedral representation for computer vision. Proceedings of the AFIPS National Computer Conference (1975), 589-596. [17] N. Beckmann, H.P. Kriegel, R. Schneider and B. Seeger, The R*-tree: An efficient and robust access method for points and rectangles. Proceedings ACM SIGMOD (1990), 81-90. [18] J.L. Bentley and T.A. Ottman, Algorithms for reporting and counting geometric intersections, IEEE Transactions on Computers 28 (9) (1979), 643-647. [19] M. Bertolotto, L. De Floriani and E. Puppo, Multiresolution topological maps. Advanced Geographic Data Modelling — Spatial Data Modelling and Query Languages for 2D and 3D Applications, M. Molenaar and S. De Hoop, eds. Publication on Geodesy — New Series 40 (1994), 179-190. [20] J.D. Boissonnat, Geometric structures for three-dimensional shape representation, ACM Trans, on Graphics 3 (4) (1984), 266-286. [21] J.D. Boissonnat, O.D. Faugeras and E. Le Bras-Mehlman, Representing stereo data with the Delaunay triangulation, Artif. Intell. 44 (1990), 41-89. [22] J.D. Boissonnat, O. Devillers, R. Schott, M. Tailland and M. Yvinec, Application of random sampling to on-line algorithms in computational geometry. Discrete Comput. Geom. 8 (1992), 51-71. [23] J.D. Boissonnat and K. Dobrindt, On-line construction of the upper envelope of triangles in M^, Proceedings 4th Canadian Conference on Computational Geometry, C.A. Wang, ed.. Memorial, Newfoundland (1992), 311-315. [24] P. Bose, T. Shermer, G. Toussaint and B. Zhu, Guarding polyhedral terrains, Comput. Geom. 7 (3) (1997), 173-185.

378

L. de Floriani et al.

[25] E. Brisson, Representing geometric structures in d dimensions: Topology and order. Discrete Comput. Geom. 9 (4) (1993), 387^26. [26] RJ.C. Brown, A/fl5? algorithm for selective refinement of terrain meshes. Proceedings COMPUGRAPHICS 96, GRASP (December 1996), 70-82. [27] P. A. Burrough, Principles of Geographic Information Systems for Land Resources Assessment, Clarendon Press, Oxford (1986). [28] S.J. Carver and C.F. Brunson, Vector to raster conversion error and feature complexity: An empirical study using simulated data, Intemat. J. Geogr. Inform. Systems 8 (3) (1994), 261-270. [29] A. Carrara, G. Bitelli and R. Carla, Comparison of techniques for generating digital terrain models from contour lines, Intemat. J. Geogr. Inform. Sci. 11 (5), 451-474. [30] B. Chazelle and H. Edelsbrunner, An optimal algorithm for intersecting line segment in the plane, J. ACM 39(1) (1992), 1-54. [31] B, Chazelle, H. Edelsbrunner, L.J. Guibas and M. Sharir, Algorithms for bichromatic line-segment problem and polyhedral terrains, Algorithmica 11, Springer-Verlag, New York (1994), 116-132. [32] T. Chan, A simple trapezoidal sweep algorithm for reporting red/blue segment intersections. Proceedings 6th Canadian Conference on Computational Geometry (1994), 263-268. [33] Z.-T. Chen and J.A. Guevara, Systematic selection of very important points (VIP) from digital terain model for constructing triangular irregular networks. Proceedings AUTO-CARTO 8, Baltimore, MD, USA (1987), 50-56. [34] J. Chen and Y. Han, Shortest paths on a polyhedron. Proceedings 6th ACM Symposium on Computational Geometry (1990), 360-369. [35] J. Choi, J. Sellen and C.K. Yap, Approximate Euclidean shortest path in 3-space, Proceedings 10th ACM Symposium on Computational Geometry (1994), 4 1 ^ 8 . [36] M.M. Chow, Optimized geometry compression for real-time rendering. Proceedings IEEE Visualization '97 (1997), 347-354. [37] J. Christensen, Fitting a triangulation to contour lines. Proceedings AUTOCARTO 8, Baltimore, Maryland (1987), 57-67. [38] J. Christensen, J. Marks and S. Stuart, An empirical study of algorithms for point-feature placement, ACM Trans, on Graphics 14 (3) (1995), 203-232. [39] A. Ciampalini, P. Cignoni, C. Montani and R. Scopigno, Multiresolution decimation based on global error. The Visual Computer 13 (5) (1997), 228-246. [40] P. Cignoni, E. Puppo and R. Scopigno, Representation and visualization of terrain surfaces at variable resolution. The Visual Computer 13 (1997). [41] K.L. Clarkson and P.W. Shor, Application of random sampling in computer geometry. Discrete Comput. Geom. 4 (5) (1989), 387-421. [42] E. Clementini and P. Di Felice, A comparison of methods for representing topological relationships. Inform. Sci. 3 (1995), 149-178. [43] E. Clementini and P. Di Felice, A model for representing topological relationships between complex geometric features in spatial databases. Inform. Sci. 90 ( 1 ^ ) (1996), 121-136. [44] J. Cohen, A. Varshney, D. Manocha, G. Turk, H. Weber, P. Agarwal, F Brooks and W. Wright, Simplification envelopes, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '96) (1996), 119-128. [45] R. Cole and M. Sharir, Visibility problems for polyhedral terrains, J. Symbolic Comput. 17 (1989), 11-30. [46] J.P. Corbett, Topological principles in cartography. Technical Report 48, U.S. Bureau of Census, USA (1979). [47] R.G. Cromley, A spatial allocation analysis of the point annotation problem. Proceedings 2nd International Symposium on Spatial Data Handling, Seattle, WA (July 1986), 38-49. [48] E.F. D'Azavedo and R.B. Simpson, On optimal interpolation triangle incidences, SIAM J. Sci. Statist. Comput. 20 (6) (1989), 1063-1075. [49] M. de Berg, Ray shooting, Depth Orders and Hidden Surface Removal, Lecture Notes in Comput. Sci. 703, Springer-Verlag, New York (1993). [50] M. de Berg and K.T.G. Dobrindt, On the levels of detail in terrains, 11th ACM Symposium on Computational Geometry, Vancouver, BC (Canada), June 5-7 (1995).

Applications

of computational

geometry to geographic information systems

379

[511 M. de Berg, M. van Kreveld and S. Shirra, A new approach to subdivision simplification. Technical Papers, ACSM/ASPRS Annual Convention 4 (AUTO-CARTO 12) (1995), 79-88. [52J M. de Berg, P. Bose, K. Dobrindt, M. van Kreveld, M. Overmars, M. de Groot, T. Roos, J. Snoeyink and S. Yu, The complexity of rivers in triangulated terrains. Proceedings 8th Canadian Conference on Computational Geometry, Ottawa (1996), 325-330. [53] M. de Berg, M. van Kreveld, R. van Oostrum and M. Overmars, Simple traversal of a subdivision without extra storage, Internat. J. Geogr. Inform. Sci. 11 (4) (.Tune 1997), 359-373. [54] M. de Berg and M. van Kreveld, Trekking in the alps without freezing or getting tired, Algorithmica 18, 306-323. [55] M. Deering, Geometry compression. Computer Graphics (SIGGRAPH'95) (1995), 13-20. [56] L. De Floriani, A pyramidal data structure for triangle-based surface description, IEEE Comput. Graphics Appl 8 (March 1989), 67-78. [57] L. De Floriani, B. Falcidieno, G. Nagy and C. Pienovi, On sorting triangles in a Delaunay tesselation, Algonthmica 6 (1991), 522-535. [58] L. De Floriani, P. Marzano and E. Puppo, Spatial queries and data models. Spatial Information Theory — A theoretical basis for GIS, A.U. Frank and I. Campari, eds, Lecture Notes in Comput. Sci. 716, SpringerVerlag (1993), 113-138 [59] L. De Floriani, P. Marzano and E. Puppo, Line-of sight communication on a terrain models, Internat. J. Geogr. Inform. Systems 8 (4) (1994), Taylor & Francis, London, 329-342. [60] L. De Floriani and P. Magillo, Horizon computation on a hierarchical terrain model. The Visual Computer: An International Journal of Computer Graphics 11 (1995), 134-149. [61] L. De Floriani and E. Puppo, Hierarchical triangulation for multiresolution surface description, ACM Trans, on Graphics 14 (4) (1995), 363-411. [62] L. De Floriani, P. Magillo and E. Puppo, A formal approach to multire solution modeling. Geometric Modeling: Theory and Practice, W. StraBer, R. Klein and R. Rau, eds, Springer-Verlag (1996). [63] L. De Floriani, P. Magillo and E. Puppo, Building and traversing a surface at variable resolution. Proceedings IEEE Visualization 97, Phoenix, AZ (USA) (October 1997), 103-110. [64] L. De Floriani, P. Magillo and E. Puppo, Efficient encoding and retrieval of triangle meshes at variable resolution. Technical Report DISI-TR-97-01, Department of Computer and Information Sciences, University of Genova, Genova, Italy (1997). [65] L. De Floriani, P. Magillo and E. Puppo, Efficient implementation of multi-triangulations. Proceedings IEEE Visualization 98, Triangle Park, North Carolina (October 1998), 43-50. [66] L. De Floriani and P. Magillo, Visibility computations on hierarchical triangulated terrain models, Geoinformatica 1 (3) (1997), 219-250. [67] V. Delis and T. Hadzilacos, On the assessment of generalization consistency. Proceedings 5th Symposium on Spatial Databases (SSD97), Berlin (July 1997). [68] G. Dettori and E. Puppo, How generalization interacts with the topological and geometric structure of maps. Proceedings 7th International Symposium on Spatial Data Handling, Delft (The Netherlands) (August 1996). [69] K. Dobrindt and M. Yvinec, Remembering conflicts in history yields dynamic algorithms. Proceedings 4th Annual International Symposium on Applied Computing (ISAAC '93), Lecture Notes in Comput. Sci. 762 (1993), 21-30. [70] J.S. Doerschler and H, Freeman, A rule-based system for dense-map name placement. Communications of the ACM 35 (1) (1992), 68-79. [71] J. A. Dougenik, N.R. Chrisman and D.R. Niemeyer, Ad algorithm to construct continuous area cartograms. Professional Geographer 37 (1985), 75-81. [72] D.H. Douglas and T.K. Peucker, Algorithms for the reduction of the number ofpoints required to represent a digitized line or its caricature. The Canadian Cartographer 10 (2) (1973), 112-122. [73] M. Duchaineau, M. Wolinsky, D.E. Sigeti, M.C. Miller, C. Aldrich and M.B. Mineed-Weinstein, ROAMing terrain: Real-time optimally adapting meshes. Proceedings IEEE Visualization'97 (1997), 81-88. [74] R.O. Duda and RE. Hart, Pattern Classification and Scene Analysis, Wiley, New York (1973). [75] G. Dutton, Geodesic modelling of planetary relief Cartographica 21 (1988), 188-207. [76] G. Dutton, Polyhedral hierarchical tessellation: The shape of GIS to come, Geo Info Systems 2 (1) (1991), 49-55.

380

L. de Floriani et al

[77] G. Dutton, Improving locational specificity of map data — a multiresolution, metadata-driven approach and notation, Intemat. J. Geogr. Inform. Systems 10 (3) (1996), 253-268. [78] N. Dyn, D. Levin and S. Rippa, Data dependent triangulations for piecewise linear interpolation, IMA J. Numer. Anal. 10 (1990), 137-154. [79] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag (1987). [80] H. Edelsbrunner, L.J. Guibas and M. Sharir, The upper envelope of piecewise linear functions: Algorithms and applications. Discrete Comput. Geom. 4 (1989), 311-336. [81] H. Edelsbrunner and N.R. Shah, Incremental topological flipping works for regular triangulations. Proceedings 8th Annual ACM Symposium on Computational Geometry (1992), 43-52. [82] H. Edelsbrunner and R. Waupotitsch, A combinatorial approach to cartograms, Comput. Geom. 7 (1997), 343-360. [83] H. Edelsbrunner and T.S. Tan, An upper bound for conforming Delaunay triangulations. Discrete Comput. Geom. 10(1993), 197-213. [84] H. Edelsbrunner and E.R Mucke, Three-dimensional alpha shapes, ACM Trans, on Graphics 13 (1) (1994), 43-72. [85] M. Egenhofer and R. Franzosa, Point-set topological spatial relations, Intemat. J. Geogr. Inform. Systems 5 (2) (1991), 161-174. [86] M. Egenhofer, E. Clementini and R Di Felice, Topological relations between regions with holes, Intemat. J. Geogr. Inform. Systems 8 (2) (1994), 129-142. [87] M. Egenhofer, E. Clementini and R Di Felice, Evaluating inconsistencies among multiple representations, Proceedings 6th Intemational Symposium on Spatial Data Handling, Edinburgh, Scotland (1994), 901920. [88] L. Eklundh and U. Martensson, Rapide generation of digital elevation models from topographic maps, Intemat. J. Geogr. Inform. Systems 9 (3) (1995), 329-340. [89] F. Evans, S. Skiena and A. Varshney, Optimizing triangle strips for fast rendering. Proceedings IEEE Visualization '96 (1996), 319-326. [90] W. Evans, D. Kirkpatrick and G. Townsend, Right triangular irregular networks. Technical Report 97-09, University of Arizona (1997). [91] B. Falcidieno and M. Spagnuolo, A new method for the characterization of topographic surfaces, Intemat. J. Geogr. Inform. Systems 5 (4) (1991), 397^12. [92] C. Faloutsos and I. Kamel, Hilbert R-tree: An improved R-tree using fractals. Proceedings Intemational Conference on Very Large Data Bases (VLDB) (1994). [93] C. Faloutsos and I. Kamel, Beyond uniformity and independence: Analysis of R-trees using the concept of fractal dimension. Proceedings ACM SIGACT-SIGMOD-SIGART PODS (1994), 4-13. [94] U. Finke and K.H. Hinrichs, The quad view data structure — A representation for planar subdivisions. Advances in Spatial Databases, M.J. Egenhofer and J.R. Herring, eds. Lecture Notes in Comput. Sci. 951, Springer (1995), 2 9 ^ 6 . [95] U. Finke and K.H. Hinrichs, Overlaying simply connected planar subdivisions in linear time, Procceedings 11th Canadian Conference on Computational Geometry (1995), 119-126. [96] P.F Fisher, Algorithm and implementation uncertainty in viewshed analysis, Internat. J. Geogr. Inform. Systems 7 (4) (1993), 331-347. [97] P. Flajolet, G.H. Gonnet, C. Puech and J.M. Robson, Analytic variations on quedtrees, Algorithmica 10 (6) (1993), 473-500. [98] D.J. Foley, A. Van Dam, S.K. Feiner and J.F Hughes, Computer Graphics: Principles and Practice, Addison-Wesley, Reading, MA (1990). [99] M. Formann and F. Wagner, A packing problem with applications to lettering of maps. Proceedings 7th ACM Symposium on Computational Geometry (1991), 281-288. [100] S. Fortune and C. Van Wyk, Efficient exact arithmetic for computational geometry. Proceedings 9th ACM Symposium on Computational Geometry (1993), 163-172. [101] R.F Fowler and J.J. Little, Automatic extraction of irregular digital terrain models. Computer Graphics 13(1979), 199-207. [102] A.U. Frank and W. Kuhn, Cell graph: A provable correct method for the storage of geometry. Proceedings 2nd Symposium on Spatial Data Handhng (SDH'86), Seattle, WA (1986), 411^36.

Applications

of computational

geometry to geographic information systems

381

[103] A.U. Frank, B. Palmer and V.B. Robinson, Formal methods for the accurate definition of some fundamental terms in physical geography. Proceedings 2nd International Symposium on Spatial Data Handling (1986), 585-599. [104] W.R. Franklin, Efficient intersection calculations in large databases. Proceedings International Cartographic Association 14th World Conference, Budapest (1989), A62-A63. [105] W.R. Franklin, M. Kankanhalli and C. Narayanaswami, Geometric computing and the uniform grid data technique. Computer Aided Design 21 (7) (1989), 410-420. [106] A.U. Frank, Spatial concepts, geometric data models, and data structures. Computers and Geosciences 18 (4) (1992), 409-417. [107] A. Frank and S. Timpf, Multiple representations for cartographic objects in a multiscale tree —An intelligent graphical zoom. Computers & Graphics 18 (6) (1994), 823-829. [108] W.R. Franklin, Triangulated irregular network to approximate digital terrain. Technical Report, ECSE Dept., RPI, Troy (NY) (1994). Manuscript and code available on ftp://ftp.cs.rpi.edu/pub/franklin/. [109] H. Fuchs, S.P. Uselton and Z. Zedem, Optimal surface reconstruction from planar contours, Comm. ACM 20 (10) (1977), 693-702. [110] A.B, Garcia, C.G. Niciera, J.B.O. Mere and A.M. Diax, A contour-line based triangulation algorithm. Proceedings 5th International Symposium on Spatial Data Handling (1992), 411^21. [ I l l ] S. Ganapathy and T.G. Dennehy, A new general triangulation method for planar contours. Computer Graphics 16 (3) (1982), 69-75. [112] L. Gewali, A. Meng, J.S.B. Mitchell and S. Ntafos, Path planning in O/l/oo weighted regions with applications. Proceedings 4th Symposium on Computational Geometry (1988), 266-278. [113] S.K. Ghosh, Computing the visibility polygon from a convex set and related problems, J. Algorithms 12 (1991), 75-95. [114] C. Gold, Problems with handling spatial data — the Voronoi approach, CISM J. 45 (1991), 65-80. [115] CM. Gold, An object-based dynamic spatial model, and its application in the development of a userfriendly digitizing system. Proceedings 5th International Symposium on Spatial Data Handling, Charleston, IGU Commission on GIS (1992), 495-504. [116] C. Gold, Dynamic data structures. Advanced Geographic Data Modelling — Spatial Data Modelling and Query Languages for 2D and 3D AppHcations, M. Molenaar and S. De Hoop, eds, Netherlands Geodetic Commission, Publication on Geodesy — New Series 40 (1994), 121-128. [117] C. Gold and T. Roos, Surface modeling with guaranteed consistency — an object-based approach. Proceedings IGIS'94: Geographic Information Systems, J. Nievergelt, T. Roos, H.J. Schack and P. Widmayer, eds. Lecture Notes in Comput. Sci. 884, Springer-Verlag (1994), 70-85. [118] D. Gomez and A. Guzman, A digital model for three-dimensional surface representation, Geoprocessing 1 (1979), 53-70. [119] M.F. Goodchild, K.K. Kemp and T.K. Poiker, NCGIA Core Curriculum, National Center for Geographic Information Analysis, University of California, Santa Barbara, USA (1989), also available at http://www.env.gov.bc.ca/ tclover/giscourse/ToC.html. [120] M.F. Goodchild and Y. Shiren, A hierarchical data structure for global geographic information systems. Computer Vision, Graphics and Image Process. 54 (1992), 3 1 ^ 4 . [121] M.T. Goodrich, A polygonal approach to hidden line and hidden surface elimination. Graphical Models and Image Process. 54 (1) (1992), 1-12. [122] M.H. Gross, O.G. Staadt and R. Gatti, Efficient triangular surface approximation using wavelets and quadtree data structures, IEEE Trans. Visualization and Computer Graphics 2 (2), 130-143. [123] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans, on Graphics 4 (1985), 74-123. [124] L.J. Guibas and R. Seidel, Computing convolutions by reciprocal search. Discrete Comput. Geom. 2 (1987), 175-193. [125] L.J. Guibas, J.E. Hershberger, J.S.B. Mitchell and J.S. Snoeyink, Approximating polygons and subdivisions with minimum-link paths, Intemat. J. Comput. Geom. Appl. 3 (4) (1983), 383-415. [126] L.J. Guibas and D.H. Marimont, Rounding arrangements dynamically. Proceedings 11th ACM Symposium on Computational Geometry (1995), 190-199. [ 127] A. Guttman, R-trees: A dynamic index structure for spatial searching. Proceedings ACM SIGMOD (1984), 47-57.

382

L. de Floriani et al.

[128] R.H. Giiting and M. Schneider, Realms: A foundation for spatial data types in database systems. Proceedings 3rd International Symposium on Large Spatial Databases, Singapore (1993), 14-35. [129] R.H. Giiting, T. Ridder and M. Schneider, Implementation of the ROSE algebra: Efficient algorithms for realm-based spatial data types. Proceedings 4th International Symposium on Large Spatial Databases, Portland, ME, Lecture Notes in Comput. Sci. 951, Springer-Verlag (1995), 216-239. [130] T. Hadzilacos and N. Tryfona, A model for expressing topological integrity constraints in geographic databases. Lecture Notes in Comput. Sci. 639, Springer-Verlag (1992), 252-268. [131] B. Hamman, A data reduction scheme for triangulated surfaces, Comput. Aided Geom. Design 11 (1994), 197-214. [132] R.M. Haralick, Ridges and valleys on digital images. Computer Vision, Graphics and Image Process. 22 (1983), 28-38. [133] S. Har-Peled, M. Sharir and K.R. Varadarajan, Approximate shortest paths on a convex polytope in three dimensions. Proceedings 12th Annu. ACM Sympos. Comput. Geom. (1996), 329-338. [134] D.J. Hebert and H.-J. Kim, Image encoding with triangulation wavelets. Proceedings SPIE 2569 1 (1995), 381-392. [135] P. Heckbert and M. Garland, Survey of polygonal surface simplification algorithms, Siggraph'97 Course Notes (1997). [136] J. Herring, TIGRIS: Topologically integrated GIS, Proceedings AUTO-CARTO 8, ASPRS/ACSM, Baltimore, MD (March 1987), 282-291. [137] J. Hershberger, Finding the upper envelope ofn line segments in 0{n logn) time. Inform. Process. Lett. 33 (1989), 169-174. [138] J. Hershberger and J. Snoeyink, Computing minimum length paths of a given homotopy class, Comput. Geom. 4 (1994), 63-97. [139] J. Hershberger and J. Snoeyink, Cartographic line simplification and polygon CSG formulae in 0(n log* n) time, Proceedings 5th Annual Workshop on Algorithms and Data Structures, Halifax, Nova Scotia, Canada (August 1997). [140] G.R. Hjaltason and H. Samet, Ranking in spatial databases. Advances in Spatial Databases, Lecture Notes in Comput. Sci. 951, Springer-Verlag (1995), 83-95. [141] E.G. Hoel and H. Samet, Efficient processing of spatial queries in line segment database. Advances in Spatial Databases, Lecture Notes in Comput. Sci. 525, Springer-Verlag (1991). [142] CM. Hoffmann, The problems of accuracy and robustness in computational geometry, IEEE Computer 22 (3) (1989), 31-41. [ 143] C. Hoffmann, Geometric and Solid Modeling: An Introduction, The Morgan Kaufmann Series in Computer Graphics and Geometric Modeling, Morgan Kaufmann, San Mateo, California (1989). [144] H. Hoppe, T. DeRose, T. Duchamp, J. McDonald and W. Stuetzle, Surface reconstruction from unorganized points. Proceedings SIGGRAPH '92 Computer Graphics Proceedings, Annual Conference Series, ACM SIGGRAPH (1992), 71-78. [145] H. Hoppe, Progressive meshes, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '96) (1996), 99-108. [146] H. Hoppe, View-dependent refinement of progressive meshes, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '97) (1997). [147] H. Imai and M. Iri, Computational-geometric methodsfiyrpolygonal approximations of a curve, Comput. Vision, Graphics and Image Process. 36 (1986), 3 1 ^ 1 . [148] H. Imai and M. Iri, An optimal algorithm for approximating a piecewise linear function, J. Inform. Process. 9 (3) (1986), 159-162. [149] H. Imai and M. Iri, Polygonal approximation of a curve —formulations and algorithms. Computational Morphology, G.T. Toussaint, ed.. Machine Intelligence and Pattern Recognition 6, North-Holland (1988), 71-86. [150] S.K. Jenson and J.O. Dominique, Extracting topographic structure from digital elevation data for geographic information system analysis, Photogramm. Eng. Remote Sensing 54 (1988), 1593-1600. [151] B. Joe, Construction of three-dimensional Delaunay triangulations using local transformations, Comput. Aided Geom. Design 8 (2) (1991), 123-142. [152] C. Jones, Cartographic name placement with Prolog, IEEE Comput. Graphics Appl. 9 (5) (1989), 36-47.

Applications

of computational

geometry to geographic information systems

383

[153] C.B. Jones, Data structures for three-dimensional spatial information systems in geology, Internat. J. Geogr. Inform. Systems 3(1) (1989), 15-32. [154] C.B. Jones, G.L. Bundy and J.M. Ware, Map generalization with a triangulated data structure, Carthography and Geographic Information Systems 22 (4) (1995), 317-331. [155] J. A. Jorge and D. Vaida, A fuzzy relational path algebra for distances and directions. Proceedings EC AI-96 Workshop on Representation and Processing of Spatial Expressions, Budapest, Hungary (1996). [156] W. Kainz, Spatial relationships — Topology versus order. Proceedings 4th International Symposium on Spatial Data Handling, Zurich, Switzerland (July 1990), 814-819. [. .r/] W. Kainz, M.J. Egenhofer and J. Greasley, Modeling spatial relations and operations with partially ordered sets, Internat. J. Geogr. Inform. Systems 7 (3) (1993), 215-225. [158] M.J. Katz, M.H. Overmars and M. Sharir, Efficient hidden surface removal for objects with small union size. Proceedings 7th ACM Symposium on Computational Geometry, ACM Press, New York (1991), 3 1 40. [159] E. Keppel, Approximating complex surfaces by triangulation of contour lines, IBM J. Research and Development 19 (1) (1975), 2-11. [160] D.G. Kirkpatrick, Efficient computation of continuous skeletons. Proceedings 20th IEEE Symposium on Foundations of Computer Science (1979), 18-27. [161] D.G. Kirkpatrick, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1) (1983), 28-35. [162] R. Klein and W. StraBer, Generation of multiresolution models from CAD data for real time rendering. Theory and Practice of Geometric Modeling, W. StraBer, R. Klein and R. Rau, eds. Springer-Verlag (1996). [163] J.J. Koenderik and A.J. van Doom, Local features of smooth shapes: Ridges and courses. Geometric Methods in Computer Vision II, Vol. 2031, SPIE (1993), 2-13. [164] J.J. Koenderik and A.J. van Doom, Two-plus-one-dimensional differential geometry, Pattern Recogn. Lett. 15 (1994), 439-443. [165] T.Y. Kong and A. Rosenfeld, Digital topology: Introduction and survey, Comput. Vision, Graphics and Image Process. 48 (1989), 357-393. [166] H.P. Kriegel, T. Brinkhoff and R. Schneider, The combination of spatial access methods and Computational Geometry in Geographic Database Systems, Proceedings 2nd Symposium on Spatial Databases (1991), 5-21. [167] H.P. Kriegel, T. Brinkhoff and R. Schneider, An efficient map overlay algorithm based on Spatial Access Methods and Computational Geometry, Proceedings International Workshop on DBMSs for Geographical Apphcations, Capri, Italy (May 1991), 16-17. [168] L. Kucera, M. Melhom, B. Preis and E. Schwarzenecker, Exact algorithms for a geometric packing problem. Proceedings 10th Symposium on Theoret. Aspects of Computer Science, Lecture Notes in Comput. Sci. 665, Springer-Verlag (1993), 317-322. [169] LS. Kweon and T. Kanade, Extracting topological terrain features from elevation maps, Comput. Vision, Graphics and Image Process. 59 (2) (1994), 171-182. [ 170] M. Lanthier, A. Maheshwari and J.R. Sack, Approximating weighted shortest paths on polyhedral surfaces. Proceedings ACM Symposium on Computational Geometry, Nice, France (1997), 274-283. [171] R. Laurini and D. Thompson, Fundamentals of Spatial Information Systems, Academic Press, London (1992). [172] C.L. Lawson, Software for C^ surface interpolation. Mathematical Software III, J.R. Rice, ed.. Academic Press Inc. (1977), 161-164. [173] D.T. Lee and A.K. Lin, Generalized Delaunay triangulation for planar graphs. Discrete Comput. Geom. 1 (1986), 201-217. [174] J. Lee, A drop heuristic conversion method for extracting irregular networks for digital elevation models. Proceedings GIS/LIS '89, Orlando, FL, USA (1989), 30-39. [175] J. Lee, Analyses of visibility sites on topographic surfaces. Internal. J. Geogr. Inform. Systems 5 (1991), 413-429. [176] Z. Li and S. Openshaw, Algorithms for automated line generalization based on a natural principle of objective generalization, Intemat. J. Geogr. Inform. Systems 6 (5) (1992), 373-389. [177] P. Lienhardt, Topological models for boundary representations: a comparison with n-dimensional generalized maps, Comput. Aided Design 23 (1) (1991), 59-82.

384

L. de Floriani et al.

[178] P. Lindstrom, D. KoUer, W. Ribarsky, L.F. Hodges, N. Faust and G.A. Turner, Real-time, continuous level of detail rendering of height fields, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '96), ACM Press, New Orleans, LA, USA (1996), 109-118. [179] G. Liotta, F.P. Preparata and R. Tamassia, Robust proximity queries: An illustration of degree-driven algorithm design. Proceedings 13th ACM Symposium on Computational Geometry (1997), 156-165 [180] Y. Livnat, H.W. Shen and C.R. Johnson, A near optimal isosurface extraction algorithm using the span space, IEEE Trans. Visuahzation and Comput. Graphics 2 (1996), 73-84. [181] M. Lounsbery, T.D. DeRose and J. Warren, Multiresolution analysis of surfaces of arbitrary topological type, ACM Trans, on Graphics 16 (1) (1997), 34-73. [182] H. Lukatela, Hipparchus data structures: Points, lines and regions in spherical Voronoi grid. Proceedings Auto-Carto 9 (1989), 164-170. [183] A.T. Lundell and S. Weingram, The Topology ofCW Complexes, Van Nostrand Reinhold Comp. (1969). [184] P. Magillo and L. De Floriani, Maintaining multiple levels of detail in the overlay of hierarchical subdivisions. Proceedings 8th Canadian Conference on Computational Geometry (1996), 190-195. [185] P. Magillo and E. Puppo, Algorithms for parallel terrain modelling and visualisation. Parallel Processing Algorithms for GIS, Ch. 16, R.G. Healey, S. Dowers B.M. Gittings and M.J. Mineter, eds, Taylor & Francis (1998). [186] A. Maheshwari, P. Morin and J.-R. Sack, Progressive TINs: Algorithms and applications. Proceedings 5th ACM Workshop on Advances in Geographic Information Systems, November 15-16, Las Vegas, Nevada (1997). [187] M. Mantyla, An Introduction to Solid Modeling, Computer Press (1988). [188] D.M, Mark, Topological properties of geographic surfaces: Applications in computer carthography. Proceedings 1st International Advanced Study Symposium on Topological Data Structures for GIS 5, G. Dutton,ed.. Harvard (1994). [189] C.S. Mata and J.S.B. Mitchell, A new algorithm for computing shortest paths in a weighted planar subsivision. Proceedings ACM Symposium on Computational Geometry, Nice, France (June 1997), 264-273. [190] I.E. Mc Cormack, M.N. Gahegan, S.A. Roberts, J. Hogg and B.S. Hoyle, Feature-based derivation of drainage networks, Intemat. J. GIS 7 (3) (1993), 263-279. [191] M. McKenna, Worst case optimal hidden surface removal, ACM Trans. Graphics 6, ACM Press, New York (1987), 19-28. [192] R. McMaster, Automated line generalization, Cartographica 24 (1984), 74-111. [193] C. Miller and R.A. LaFlamme, The digital terrain model — theory and applications, Photogramm. Eng. 24 (3) (1958), 433-442. [ 194] G. Misund, Varioscale TIN based surfaces. Proceedings 7th Int. Symp. on Spatial Data Handling, August 12-16, Delft (NL) (1996), 6.35-6.46. [195] J.S.B. Mitchell, D.M. Mount and CH. Papamitridiou, The discrete geodesic problem, SIAM J. Comput. 16 (1987), 647-668. [196] J.S.B. Mitchell and C.H. Papamitridiou, The weighted region problem: Finding shortest paths through a weighted planar subsivision, J. ACM 38 (1) (January 1991), 18-23. [197] J.S.B. Mitchell and S. Suri, A survey of computational geometry, Handbooks in Operations Research and Management Science, Vol. 7, Ch. 7, M.O. Ball et al., eds, Elsevier Science B.V (1995), 439^58. [198] M. Molenaar, Single valued vector maps — a concept in GIS, Geo-Informationssysteme 2(1) (1989). [199] M.E. Mortenson, Geometric Modeling, Wiley, New York (1985). [200] D.G. Morris and R.G. Heerdegen, Automatically derived catchment boundaries and channel networks and their hydrological applications, Geomorphology 1 (1988), 131-141. [201] D.M. Mount, On finding shortest paths on convex polyhedra. Technical Report 1495, Department of Computer Science, University of Maryland, Baltimore, MD (1985). [202] K. Mulmuley, Computational Geometry: An Introduction through Randomized Algorithms, Prentice Hall (1994). [203] G. Nagy, Terrain visibility, Comput. Graphics 18 (6) (1994). [204] S. Naher, The LEDA user manual. Version 3.1 (Jan. 16, 1995). Available by anonymous ftp from ftp.mpisb.mpg.de in directory /pub/LEDA. [205] B. Naylor, J. Amanatides and W. Thibault, Merging BSP-trees yelds polyhedral set operations, Comput. Graphics (Proceedings SIGGRAPH 1990) 24, F Baskett, ed. (1990), 115-124.

Applications

of computational

geometry to geographic information systems

385

[206] G. Nielson, Scattered data modeling, IEEE Comput. Graphics Appl. 13 (1) (1993), 60-70. [207] J. Nievergelt and F.P. Preparata, Plane sweep algorithms for intersecting geometric figures, Comm. ACM 25 (10) (1982), 739-747. [208] O. Nurmi, A fast line-sweep algorithm for hidden line elimination, BIT 25 (1985), 466-472. [209] Openlnventor Architecture Group, Inventor Mentor: Openlnventor Reference Manual, Addison-Wesley (1994). [210] J. Orenstein, An algorithm for computing the overlay of k-dimensional spaces. Proceedings 2nd Symposium on Advanced in Spatial Databases, Lecture Notes in Comput. Sci. 525, O. Giinter and H.J. Schek, eds (1991), 381^00. [211] M. Overmai's and M. Sharir, A simple output-sensitive algorithm for hidden suiface removal, ACM Trans, on Graphics 11 (1992), 1-11. [212] M.H. Overmars, Designing the computational geometry algorithms library CGAL, Appl. Comput. Geom. (Proc. WACG'96), Lecture Notes in Comput. Sci., Springer-Verlag (1997). [213] L. Palazzi and J. Snoeyink, Counting and reporting red/blue segment intersections. Lecture Notes in Comput. Sci. 709, F. Dehne, J.R. Sack, N. Santoro and S. Whitesides, eds. Springer-Verlag, New York (1993), 530-540. [214] J. Persson and E. Jungert, Generation of multi-resolution maps from run length-encoded data, Intemat. J. Geogr. Inform. Systems 6 (6) (1992), 497-510. [215] G. Petrie and T.J.M. Kennie, eds, Terrain Modelling in Survey and Civil Engineering, Whittles Publishing — Thomas Telford, London (1990), 112-127. [216] G. Petrie, Modelling, interpolation and contouring procedures. Terrain Modelling in Survey and Civil Engineering, G. Petrie and T.J.M. Petrie, eds. Whittles Publishing — Thomas Telford, London (1990), 112-127. [217] T.K. Peucker and D.H. Douglas, Detection of surface-specific points by local parallel processing of discrete terrain elevation data, Comput. Graphics and Image Process. 4 (1975), 375-387. [218] S. Pigot, Generalized singular 3-cell complexes. Proceedings 6th International Symposium on Spatial Data Handling, Edinburgh, Scotland (1994), 89-111. [219] M. Pilouk, K. Tempfli and M. Molenaar, A tetrahedron-based 3D vector data model for geoinformation. Advanced Geographic Data Modelling — Spatial Data Modelling and Query Languages for 2D and 3D Apphcations, M. Molenaar and S. De Hoop, eds, Pubhcation on Geodesy — New Series 40 (1994), 129140. [220] W.K. Pratt, Digital Image Processing, Wiley (1978). [221] F.P Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag, Berlin (1985). [222] F.P. Preparata and J.S. Vitter, A simplified technique for hidden-line elimination in terrains. Proceedings STAGS'92, Paris, A. Finkel and M. Jantzen, eds, Lecture Notes in Comput. Sci. 577, Springer-Verlag, Berlin (1992), 135-144. [223] E. Puppo and G. Dettori, Towards a formal model for multiresolution spatial maps, Advances in Spatial Databases, Lecture Notes in Computer Science 951, M.J. Egenhofer and J.R. Herring, eds, Springer-Verlag (1995), 152-169. [224] E. Puppo, Variable resolution terrain surfaces. Proceedings Canadian Conference on Computational Geometry, Ottawa (Canada) 12-15 August, 1996; appeared in longer version as Variable resolution triangulations, Comput. Geom. 11 ( 3 ^ ) (1998), 219-238. [225] E. Puppo and P. Marzano, Discrete visibility problems and graph algorithms, Intemat. J. Geogr. Inform. Sci. 11 (2) (1997), 139-162. [226] E. Puppo and R. Scopigno, Simplification, LOD, and multire solution — Principles and applications, Eurographics '97 Tutorial (1997). [227] V.T. Rajan, Optimality of the Delaunay triangulation in R^, Discrete Comput. Geom. 12 (1994), 189. [228] J. Raper, ed., Three Dimensional Applications in Geographic Information Systems, Taylor & Francis (1989). [229] J.H. Reif and S. Sen, An efficient output-sensitive hidden-surface removal algorithm and its parallelization. Proceedings 4th ACM Symposium on Computational Geometry, Urbana, ACM Press, New York (1988), 193-200.

386

L. de Floriani et al.

[230] S. Rippa, Minimal roughness property ofDelaunay triangulation, Comput. Aided Geom. Design 7 (1990), 489^97. [231] S. Rippa, Adaptive approximations by piecewise linear polynomials on triangulations of subsets of scattered data, SIAM J. Sci. Statist. Comput. 13 (1) (1992), 1123-1141. [232] A.H. Robinson, R.D. Sale, J.L. Morrison and RC. Muehrcke, Elements of Cartography, 5th ed., Wiley, New Yorlc (1984). [233] J.G. Rolme, B. Wyvill and X. Wu, Fast line scan-conversion, ACM Trans, on Graphics 9 (1990), 376-388. [234] A. Rosenfeld and A. Kak, Digital picture processing. Computer Science and Mathematics, Vol. 1 and 2, 2nd ed.. Academic Press (1982). [235] N. Roussopoulos and D. Leifker, Direct spatial search on pictorial databases using packed R-trees, Proceedings SIGMOD Conference (1985), 17-31. [236] J. Ruppert and R. Seidel, On the difficulty of tetrahedralizing ?>-dimensional non-convex polyhedra. Proceedings 5th ACM Symposium on Computational Geometry (1989), 380-393. [237] A. Saalfeld, Joint triangulations and triangulation maps. Proceedings Third Symposium on Computational Geometry, Waterioo, Canada (June 1987), 195-204. [238] A. Saalfeld, Conflation: Automatic map compilation, Internat. J. Geogr. Inform. Systems 2 (3) (1988), 217-228. [239] A. Saalfeld, Delaunay edge refinements. Proceedings 3rd Canadian Conference on Computational Geometry (1991), 33-36. [240] A. Saalfeld, Comflation: Automated map compilation. Technical Report CAR-TR-670, Center for Automation Research (May 1993). [241] A. Saalfeld, Map generalization as a graph drawing problem. Graph Drawing (Proceedings GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 444-451. [242] H. Samet, The Design and Analysis of Spatial Data Structures, Addison-Wesley, Reading, MA (1990). [243] H. Samet, Applications of Spatial Data Structures, Addison-Wesley, Reading, MA (1990). [244] H. Samet, Object-based and image-based representations of objects by their interiors. Advances in Image Understanding — A Festschrift for Azriel Rosenfeld, K. Bowyer and N. Ahuja, eds, IEEE Computer Society Press, Los Alamitos, CA (1996), 316-332. 1245] L.L. Scarlatos, An automatic critical line detector for digital elevation matrices. Proceedings 1990 ACSMASPRS Annual Convention 2, Denver, CO (1990), 43-52. [246] L.L. Scarlatos and T. Pavlidis, Hierarchical triangulation using cartographic coherence, CVGIP: Graphical Models and Image Processing 54 (2) (1992), 147-161. [247] A. Schmitt, Time and space bounds for hidden line and hidden surface algorithms. Proceedings Eurographics'81, North-Holland, Amsterdam (1981), 43-56. [248] L. Schubert and CA. Wang, An optimal algorithm for constructing the Delaunay triangulation of a set of line segments. Proceedings 3rd ACM Symposium on Computational Geometry, Waterloo (June 1987), 223-232. [249] W.J. Schroeder, J. A. Zarge and W. Lorensen, Decimation of triangle mesh, ACM Comput. Graphics 26 (2) (July 1992), 65-70. [250] T. Sellis, N. Roussopoulos and C. Faloutsos, The R^-tree: A dynamic index for multidimensional objects. Proceedings 13th International Conference on Very Large Data Bases (VLDB) (1987), 507-518. [251] M. Sharir and A. Shorr, On shortest paths on polyhedral spaces, SIAM J. Comput. 15 (1986), 193-215. [252] M. Sharir, The shortest watchtower and related problems for polyhedral terrains. Inform. Process. Lett. 29 (1988), 265-270. [253] C.T. Silva, J.S.B. Mitchell and A.E. Kaufman, Automatic generation of triangular irregular networks using greedy cuts. Proceedings IEEE Visualization '95 (1995), 201-208. [254] A.K. Skidmore, Terrain position as mapped from gridded digital elevation model. Internal. J. Geogr. Inform. Systems 4(1) (1990), 33-49. [255] K.R. Sloan and L.D. Hrechanyk, Surface reconstruction from sparse data. Proceedings Conference on Pattern Recognition and Image Processing (1981), 4 5 ^ 8 . [256] J. Snoeyink and M. van Kreveld, Linear-time reconstruction ofDelaunay triangulations with applications. Proceedings 5th European Symposium on Algorithms (1997). [257] D.A. Southard, Piecewise linear surface models from sampled data. Proceedings Computer Graphics International 91, Boston, MA, 22-28 June (1991).

Applications

of computational

geometry to geographic information systems

387

[258] S. Suri, A linear time algorithm for minimum link paths inside a simple polygon, Comput. Vision, Graphics and Image Process. 35 (1986), 99-110. [259] E.J. StoUnitz, T.D. DeRose and D.H. Salesin, Wavelets for computer graphics: A primer Part /, IEEE Computer Graphics and Applications (May 1995), 76-84. [260] E.J. StoUnitz, T.D. DeRose and D.H. Salesin, Wavelets for computer graphics: A primer Part II, IEEE Computer Graphics and AppUcations (July 1995), 75-85. [261] R. Tamassia, ed.. Strategic directions in computational geometry working group report, ACM Comput. Surveys 28 (4) (1996). [262] G. Taubin and J. Rossignac, Geometric compression through topological surgery, IBM Res. Report RC20340 (Januar>' 1996). [263] W.R. Tobler, A continuous transformation useful for districting, Ann. New York Acad. Sci. 219 (1973), 215-220. [264] V.J.D. Tsai, Delaunay triangulations in TIN creation: An overview and a linear-time algorithm, Intemat. J. GIS 7 (6) (1993), 501-524. [265] G. Turk, Re-tiling polygonal surfaces, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '92) 26 (2) (1992), 55-64. [266] J. van Bemmelen, W. Quak, M. van Heldcen and P. van Oosterom, Vector vs. raster-based algorithms for cross country movement planning. Proceedings AUTO-CARTO 11, Minneapolis (1993), 309-317. [267] R.C. Veltkamp, 3D computational morphology, EUROGRAPHICS '93 (1993), 115-127. [268] M. van Kreveld, On quality paths on polyhedral terrains. Proceedings IGIS'94: Geographic Information Systems, J. Nievergelt, T. Roos, H.J. Schack and P. Widmayer, eds. Lecture Notes in Comput. Sci. 884, Springer-Verlag (1994), 113-122. [269] M. van Kreveld, Efficient methods for isoline extraction from a TIN, Intemat. J. Geogr. Inform. Science 10 (5) (1996), 523-540. [270] M. van Kreveld, Digital elevation models and TIN algorithms. Notes for CISM Advanced School on Algorithmic Foundations of GIS (1996). [271] M. van Kreveld, Variations on sweep algorithms: Efficient computation of extended viewsheds and class intervals. Proceedings Symposium on Spatial Data Handling (1996), 13A.15-13A.27. [272] M. van Kreveld, R. van Oostrum and C. Bajaj, Contour trees and small seed sets for isosurface traversal. Proceedings 13th Annual ACM Symposium on Computational Geometry (1997), 212-219. [273] P. van Oosterom, A modified binary space partition for geographic information systems, Intemat. J. Geogr. Inform. Systems 4 (2) (1990), 133-146. [274] P. van Oosterom, Reactive Data Structures for Geographic Information Systems, Oxford University Press (1993). [275] P. van Oosterom and V. Schaukelaars, The development of an interactive multi-scale GIS, Intemat. J. GIS 9 (5) (1995), 489-507. [276] I. Vincent and P. Soille, Watersheds in digital spaces: An efficient algorithm based on immersion simulations, IEEE Transactions on Pattern Analysis and Machine Intelligence 13 (1991), 583-598. [277] The Virtual Reality Modeling Language Specification — Version 2.0 (August 1996), http://vag.vrml.org/. [278] B. Von Herzen and A.H. Barr, Accurate triangulations of deformed, intersecting surfaces, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '87) 21 (4) (July 1987), 103-110. [279] F. Wagner and A. Wolff, An efficient and effective approximation algorithm for the map labeling problem. Proceedings 3rd European Symposium on Algorithms, Lecture Notes in Comput. Sci. 979 (1995), 420433. [280] F. Wagner and A. Wolff, Map labeling heuristics: Provably good and practically useffil. Proceedings 11th Annual ACM Symposium on Computational Geometry (1995), 109-118. [281] J.M. Ware, C.B. Jones and G.L. Bundy, A triangulated spatial model for cartographic generalization of areal objects. Spatial Information Theory, A. Frank and W. Kuhn, eds, Lecture Notes in Comput. Sci. 988, Springer-Verlag (1995), 173-191. [282] D.F. Watson, Computing the n-dimensional Delaunay tessellation with application to Voronoi poly topes. The Comput. J. 24 (1981), 728-746. [283] L.T. Watson, TJ. Laffey and R.M. Haralick, Topographic classification of digital image intensity surfaces using generalized splines and the discrete cosine transformation, Comput. Vision, Graphics and Image Process. 29 (1985), 143-167.

388

L. de Floriani et al.

[284] H. Webb, Creation of digital terrain models using analytical photogrammetry and their use in civil engineering. Terrain Modelling in Survey and Civil Engineering, G. Petrie and T.J.M. Petrie, eds. Whittles Publishing — Thomas Telford, London (1990), 73-84. [285] K. Weiler, Edge-based data structures for solid modeling in a curved-surface environment, IEEE Computer Graphics and Applications 5(1) (January 1985), 2 1 ^ 0 . [286] R. Weibel and M. Hellen, A framework for digital terrain modeling. Proceedings 4th International Conference on Spatial Data Handhng, Zurich (1990), 219-229. [287] R. Weibel, A typology of constraints for line simplification. Proceedings 7th International Symposium on Spatial Data Handling (SDH'96) (1996), 9A.1-9A.14. [288] J. Wemecke, The Inventor Mentor: Programming Object-Oriented 3D Graphics with Open Inventor, Addison-Wesley (1994). [289] G.W Wolf, Metric surface networks. Proceedings 4th International Symposium on Spatial Data Handling, Zurich (1990), 844-846. [290] T.C. Woo, A combinatorial analysis of boundary data structure schemata, IEEE Comput. Graphics Appl. 5 (3) (1985), 19-27. [291] M.F. Worboys, A generic model for planar geographic objects, Intemat. J. Geogr. Inform. Systems 6 (5) (1992), 353-372. [292] M.F. Worboys and P. Bokafos, A canonical model for a class ofareal spatial objects. Advances in Spatial Database (SSD93), D. Abel and B.C. Ooi, eds. Lecture Notes in Comput. Sci., Springer-Verlag (1993), 36-52. [293] J.C. Xia and A. Varshney, Dynamic view-dependent simplification for polygonal models. Proceedings IEEE Visualization '96, R. Yagel and G. Nielson, eds, S. Francisco, CA (1996), 327-334. [294] S. Yu, M. Van and J. Snoeyink, Drainage queries in TINs: From local to global and back again. Proceedings Symposium on Spatial Data Handling (SDH'96) (1996), 13A.1-13A.14. [295] B. Zhu, Computing the shortest watchtower of a polyhedral terrain in 0{n log w) time, Comput. Geom. 8 (1997), 181-193. [296] S. Zoraster, Integer programming applied to the map label placement problem, Cartographica 22 (3) (1986), 16-27.

CHAPTER 8

Making Geometry Visible: An Introduction to the Animation of Geometric Algorithms Alejo Hausner and David R Dobkin* Computer Science Department, Princeton University, Princeton, NJ 08544 USA E-mail: {ah, dpd] @ cs.princeton. edu

Contents 1. Introduction Which would you prefer? Who should read this? It's interactive, not static You've already seen it The need for animation How can algorithm animation help you? It will improve further Chapter overview 2. General systems 2.1. Sorting out sorting 2.2. BALSA and Zeus 2.3. "Descendants" of BALSA 3. Geometry-oriented systems 3.1. Two-dimensional systems 3.2. Beyond two dimensions 4. Visualizations 4.1. Mathematical visualization 4.2. Demonstrations 4.3. Algorithm animations 4.4. Interactive visualizations 5. Design issues relevant to algorithm animation systems 5.1. Scope 5.2. Author and audience 5.3. Expressiveness

391 391 391 391 391 392 392 392 393 393 393 395 397 401 401 402 405 406 406 407 410 413 413 413 414

*This work has been supported in part by NSF Grants CCR-9643913 and CCR-9731535 and by the US Army Research Office under Grant DAAH04-96-1-0181 and by Dimacs, an NSF Science and Technology Center. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V All rights reserved

389

390 5.4. User interaction 6. Techniques 6.1. Abstraction 6.2. A few animation techniques 6.3. Problems specific to 3D 7. Conclusion The future References

A. Hausner and D.P. Dobkin 415 416 416 416 417 419 420 420

Abstract This chapter surveys the field of geometric algorithm animation, which has flourished in the past five years. Algorithm animation uses moving pictures to explain a computer algorithm to students learning programming, to algorithm researchers, and to programmers involved in debugging. We examine systems used to create animations of algorithms, focusing on those that specialize in geometry. We also consider a selection of animations, pointing out some useful techniques, and continue with some consideration of general design issues and specific animation techniques, closing with a look at the future.

An introduction to the animation of geometric algorithms

391

1. Introduction Which would you prefer? Imagine yourself learning a complicated new algorithm that solves a geometric problem. You might read a book or a research paper that explains the algorithm. You probably will have to pore over the algorithm's code, which is a difficult way to learn complicated algorithms ! Even if the author had provided you with simplified pseudocode, you might still need a long time to understand the details of the algorithm. Now suppose an animation of the algorithm is available. Instead of having to imagine what is happening to the algorithm's variables, you see colored shapes which represent the program's data. These shapes move and change as the program runs. A triangle is not presented to you as the coordinates of three points, but is drawn on the screen, changing as the program works on it. As you choose different inputs, the animation will be different. You can slow the animation down, to better understand complicated parts, or speed it up to skip what you already understand, or even run it backwards to recall where things used to be. Which scenario would you prefer, reading about the algorithm or watching it in action? If you prefer the animation, then this chapter is for you. Who should read this? Anyone who explores geometry and computation may find algorithm animation useful. Explorers of geometry can be mathematicians, users or designers of geometric algorithms, or students. All of them need explanatory tools, whether they are learning about the subject or searching for new solutions to a problem. Computer-based geometric visualization and algorithm animation can provide such an aid. Visualization is the creation of images to describe an abstract idea. Computer-generated images have advantages over hand-drawn ones. They are accurate, can be modified with ease, and in the case of three-dimensional geometric objects, they can be examined from any angle. Ifs interactive, not static Algorithm animation visualizes the activity of an algorithm through moving images. As in conventional animation, the movement of images is not real, but is simulated by presenting the viewer with a sequence of still images. Unlike conventional animation, however, in algorithm animation the sequence of images is not fixed. Each image represents the state of the algorithm at some point in time. Since the inputs to an algorithm can vary, its behavior will vary and hence so will the animation of that behavior. You \e already seen it In a way, algorithm animation is as old as Euclid. It is not too far-fetched to say that a constructive geometric proof is a form of animated algorithm. For example, the proof that one

392

A. Hausner and D.P. Dobkin

can construct an equilateral triangle with a given side (Proposition 1) instructs the reader to draw two circles centered at the sides' endpoints and to draw lines to the circles' intersection. The computer in this case is a person armed with compass and straightedge, who is following instructions and reaching a result, so the procedure qualifies as an algorithm.

The need for animation Some explorers of geometry devote their time to designing algorithms that solve geometric problems. Even though their solutions will run on a computer, they often find themselves working "in the dark", needing to visualize not just the objects they are manipulating but also the process by which the algorithm modifies the objects. Geometric algorithms are often more difficult to design, program and debug than other algorithms. This is because the designers often lack the means to see the objects their algorithms are manipulating, and are forced to pore over printouts of point coordinates. Algorithm animation can help.

How can algorithm animation help you ? There are several reasons for animating an algorithm. First, a theoretician who is devising geometric algorithms needs a medium for disseminating his/her ideas. Although research papers satisfy this role, a well-crafted animation on videotape can communicate an idea more quickly than a printed description. If the author makes an interactive animation available on the world-wide web, people can learn the algorithm more easily. Second, a teacher who is presenting an algorithm to students can benefit in the same way. However, the audience in this case will not consist of experts as in the first case, so the animation must be prepared with more care. Third, animating an algorithm can stimulate the designer into finding new variations. In effect, such an animation explains the algorithm to its author! A geometric algorithm may need to handle special or degenerate cases, and animation often helps to identify these cases. Finally, algorithm animation can help with debugging of general programs, although this application turns out to have limited scope.

It will improve further Algorithm animation is a young discipline, and will probably change in the next few years. The changes will come both from improvements in software and hardware. Although animation as a medium can make an algorithm more understandable, it also has some limitations. For example, there are some algorithms that are rather complicated, and are difficult to understand even with a well-crafted video. In an animation where many things are happening simultaneously, the user will want to stop and ask questions, such as "why didn't the scan line advance when that point was processed?". Hypertext documents allow the viewer to ask such questions, but in the past they have portrayed either fixed images or fixed animations, and this limitation has reduced their explanatory powers. There are situations where the user wants to interact with a running algorithm, and also wants

An introduction to the animation of geometric algorithms

393

to see or hear other information about it. There is a great potential for improvement in algorithm animation through web-based programming languages like Java, which present the user with running programs and not just static images. Animation places great demands on computer resources. If a prepared animation is made available over the internet, it will need large amounts of storage space, and more importantly, a very high-speed connection to the net, lest the users spend hours downloading a five-minute movie. On the other hand, if the user does not download the data but rather runs a program that creates an animation in real time, he/she may need a very fast computer, lest a complicated five-minute animation take 30 minutes to run. A similar problem exists if the user requests a three-dimensional scene stored as VRML data. If the scene is complicated, the rendering speed will suffer, and hence, so will the user. Increases in storage, communication bandwidth and processing power will make possible new algorithm animations and geometric visualizations.

Chapter overview Algorithm animation has its roots in educational film and in mathematical visualization. It has also been influenced by recent developments in scientific data visualization, which is at present an extremely diverse and active field. Early efforts in algorithm animation in the late 1970's resulted in an educational film [2] which is still used today. The middle 1980's saw the development of systems [8,20] which allow a user to run algorithms and see animations interactively. Recent efforts have added color and sound [10,13], as well as the use of object-oriented programming [9,1,29,15]. Section 2 provides a survey of systems used to create animations of general algorithms. Excellent overviews of the field [27,36] are available, so here we will concentrate on questions that a designer of similar systems must face. Geometric algorithms present special opportunities and difficulties, and systems to make animations for them have also evolved [29,17,37]. Section 3 gives a survey of these systems. Again, the survey will not be exhaustive but will focus on technique. The past five years have seen the field of algorithm animation flourish. Rather than require the audience to install the animation software on their own computers, researchers have found it convenient to use video tape to record representative sessions. Section 4 surveys these video recordings. The videos selected for discussion use interesting animation techniques. Whether a researcher is creating animations or is planning a system to assist in their creation, he/she must consider some general issues. These are covered in Section 5. Finally, Section 6 presents some techniques which can be used in an algorithm animation to convey ideas more clearly. 2. General systems 2.1. Sorting out sorting The most well-known example of an early algorithm animation is the film "Sorting out Sorting", created by Ronald Baecker [2] and presented at Siggraph' 81. It explains concepts

394

A. Hausner and D.R

Linear insertion '•.••cr-^-^r.^-:

Dobkin

Bubblesort

:,."••:,••:

•:.'•'•••:.]

Straight Selection

..

. . . . . . • . . • - • , • .

••

•••;•••:

. . . . . . . . . . . . . . •

. • • • • • • " . • • ' . '

:'-/-^r.-':.;:^^:V.;

' • • • • ;

•••••••

:

'.;.

•.•;

••ir;.>-.-:-.

.•

^ . < :

• ' • ' i - ' . . -

.'••,'•',•••.•:

'

:.

.•^'••••.•.•r^"-*=^

• • " • ' . • •

i '

1

• ••

""..r":'-

.••:•

v-^'.-u-.-.-.^j^'.^•;.:;•.••.•,..

1 •'

'

• • • . • • ' : ' • • • / . ; • • :

'

. : • : • ' = ' : ; ;

••

- •

T . " ' . : : "

.""...•

• ,

..

r T . " •.••• •.

•;

••:"1"

'^^ ."•

.'•

••

• • • • . ' . •

••.•••

.••

• ' [ • - " •

• • • ^ :

•"•

.' • •

. . ' •

.

••

.

•"•

:':••

•:•*•.••••

'

•••.••••.••

• • :

• ' • : •

••••••..•

.;••••'•

. \

. . A .

..'

'

> V ' ' - : ' " - " . " ^ ' ^ ' . -

!:"• " i l " - ^ " " " " "

' v ' ^ . • ; • • • • > . : : > . : ; • •

• . • • " : •

' • \ . : . -

'•'-•

\ \ .

:-': .r*'.'.

^ ^

••"

"••.•• ."'J" ^'.

• •'

.••;'•

.••"

"•.•f\

••"...••.•

'

.

r•

, . 5 : - ^ - - \ : - ^ : V v ' -

" - • " • ' ' . ' ! • • • '

".

t . \

C ' . -

•".*,'•

^ : - ' - " • • :•"

••"•

. . • . . • ' . •

'•''

' • " • ' :

'.._,•.•_!( JN V; • ^- ' •• '••'y--.. ••

• J

. • r ' " '

• - . . • . • . . . . . •

. V 1

-y-

. . . . ; ..

i

;•

..

— ••

Shellsort

Quicksort

h----^:>;i;f •;

• . . • ^ ^ • ' : • • • ' • . •

> ' - ^ -

,. •

'-

^

:

/

'

.'

••••y^'{V;;;-'."V-=^'.

.

It.-',•^•.•*•

••

. ' '. • f' V

,'

Heapsort • : . \ •: ,..•.•.'••: '-'• i.\.

• •.;,;-"^''wM^' ;

•:.

: • ^ • • ^ • .

' . .

•-..•-\;.-r-"-.-v.T^;'••:/• • •.

. .

.

Tree Selection

•..,- :)y^.-^

;

-^

Shakersort

:'•:•: • ^ • ; i ; : ; ^ : • v ' • • ' r • * ^

• • ' ^ • . , / ; , - / - : '

•••

.•

Binary Insertion

• ."^

/."•i.-r.•;

• ' ^ ; - v ; ; ; . - . • . ; ; : . ; / . • •

''.'.

• • •

'^ • '_i.'r. • •. •"

H•'^^ rN \

.

:; -/5S\$^\r

I'iput Generators t-

Proxinity Probiens i

Extract Components o

Gaps and Co^'ers o

Fonts t>

TrangLlatlons o

Segments >

Vc4-oroi Diagrams >

Rays f>

^

Cir'^ies I-

Proximity Problems

(Uiairatar (brute forciT;!

Polygons >

Diameter (Preparata & 5hanos)

Movie t>

Closest Pairi.brute force)

Externa Classes (examples) c

Closest Pair (Divide & Conrjue-)

Settlnqs...

Closest Pair lusinn Vxonoi I'ia'irarn)

). n

Callahan [31] gave an improved reduction from minimum spanning trees to bichromatic closest pairs, based on the well-separated pair decomposition described below. With his results, the minimum spanning tree can be computed with a time slower than that of the bichromatic closest pair by an O(logn) factor. Like the reduction above, this factor disappears for time bounds of the form Q{n^^^). For rectilinear {L\ and Loo) metrics, bichromatic closest pair problems can be solved in linear time after a preprocessing stage in which, for each of a constant number of different axes, we sort the points according to their projections along the axis. Therefore, rectilinear minimum spanning trees can be computed in 0{n \ogn) time in any dimension.

432

D. Eppstein

Fig. 2. A fair split tree.

Approximate MSTs. The method above for high dimensional minimum spanning trees takes close to quadratic time when the dimension is large. We describe now a method for approximating the minimum spanning tree, within any desired accuracy, much more quickly. This method is due to Callahan [31,32], and is based on his technique of wellseparated pair decomposition. Similar minimum spanning tree approximation algorithms with worse tradeoffs between time and approximation quality were previously found by Vaidya [128] and Salowe [116]. As we noted above, Callahan also uses this technique to compute exact minimum spanning trees from bichromatic pairs. We will see more applications of Callahan's method later in the construction of spanners. Callahan's method is to recursively partition the given set of sites by axis-parallel hyperplanes. This produces a binary tree 7, in which each node corresponds to a subset of points contained in some J-dimensional box. For any node i; of 7, corresponding to some set S{v) of points, define R{v) to be the smallest axis-aligned box containing the same point set, and let i{v) denote the length of the longest edge of R{v). Then Callahan calls T a fair split tree if it satisfies the following properties: • For each leaf node vofT, \ S(v) | = 1. • For each internal node v, one can choose the axis-parallel hyperplane separating its children's points to be at distance at least l{v)/3 from the sides of R{v) parallel to it. Figure 2 depicts a fair split tree. Such a tree can be constructed in time 0(nlogn) (for any fixed dimension) via any of several algorithms, for instance using methods for quadtree construction [26]. Callahan now defines a well-separated pair decomposition (for a given parameter s)to be a collection of pairs of nodes of a fair split tree, having the properties that • For any pair of sites (p, q) in the input, there is exactly one pair of nodes (P, Q) in the decomposition for which p is in S{P) and q is in S{Q). • For each pair (P, Q) in the decomposition, there is a length r such that S{P) and S{Q) can be enclosed by two radius-r balls, separated by a distance of at least sr. The connection between this definition, minimum spanning tree edges, and bichromatic pairs, is explained by the following result. LEMMA

6 (Callahan). Let pq be a minimum spanning tree edge, and (P, Q) be a pair of

Spanning trees and spanners

433

nodes in a well-separated decomposition of the input (with s = 2) for which p is in S(P) and q is in S{Q). Then pq must be the bichromatic closest pair connecting S(P) and SiQ). PROOF. This follows from the well-known fact that the minimum spanning tree solves the bottleneck shortest path problem, of connecting two points p and ^ by a path with the shortest possible maximum edge length. If there were a shorter edge p^q^ connecting S(P) and S(Q), one could find a path p-p^-q'-q using shorter edges than pq, contradicting this property of minimum spanning trees. D

As a consequence one can find minimum spanning trees by solving a collection of bichromatic closest pair problems for the pairs of a well-separated pair decomposition, then compute a minimum spanning tree on the resulting graph. However for this approach to be useful, one must bound the complexity of the well separated pair decomposition. Callahan constructs his well separated pair decomposition as follows. The method is recursive, and constructs a collection of pairs of sets covering all edges connecting two point sets, each represented by a node of T. Initially, we call this recursive algorithm once for the two children of each node of T. The recursive algorithm, if presented with wellseparated nodes P and Q of T, simply returns one pair (P, Q). Otherwise, it swaps the two nodes if necessary so that P is the one with the larger bounding box, and calls itself recursively on node pairs (Pi, Q) and (P2, Q) where P/ are the two children of P. Intuitively, each node of T is then involved only in a small number of pairs, corresponding to nodes with similar sized bounding boxes within a similar distance from the node. LEMMA 7 (Callahan). The procedure described above results in a well-separated pair decomposition consisting ofO(n) pairs, and can be performed in time 0(n) given a fair split tree of the input.

This information is not enough to reduce the problem of finding exact minimum spanning trees to that of bichromatic closest pairs; it may be, for instance, that the decomposition involves ^(n) pairs (P, Q) for which \S(P)\ = 1 and \S(Q)\ = ^{n)\ the total size of all subproblems would then be quadratic. (Callahan does use this decomposition in a more complicated way to reduce minimum spanning trees to bichromatic closest pairs). However if we only want an approximate minimum spanning tree, the problem becomes much easier. 3 (Callahan). For any fixed s, one can compute in 0(n logn) time a tree having total length within a factor of{\ -\- e) of the Euclidean minimum spanning tree. THEOREM

PROOF. Compute a well-separated pair decomposition for s = max(2,4/s) and form a graph G by choosing an edge pq for each pair (P, Q) in the decomposition. Note that pq can have length at most r(4 + s) and any other edge connecting the same pair of sets must have length at least rs, so pq approximates the bichromatic closest pair of the sets P and Q within a (1 -h ^) factor. Replacing each edge of the true minimum spanning tree by the corresponding edge in G produces a subgraph 5 of G with weight within (I -^ s) of the minimum spanning tree.

434

D. Eppstein

We now prove by induction on the length of the longest edge in the corresponding minimum spanning tree path that any two sites are connected by a path in S. Specifically, let e = pq he the longest edge in the minimum spanning tree path connecting the sites; then the corresponding edge in G connects two points p^q^ in the same pair (P, Q) of the decomposition. There is a path of edges all shorter than e from one of the two sites to p^ (via the minimum spanning tree to p, then within the cluster to p\ using the fact that ^ > 2 to prove that this last step is shorter than e). By the induction hypothesis, one can find such a path using only edges in S. Similarly there is a path of edges in S all shorter than e from q^ to the other site. Therefore S is connected, and must be a spanning tree. The minimum spanning tree of G must then be shorter than S, so it approximates the true minimum spanning tree of the sites within a (I-\- e) factor. D By choosing more carefully the representative edges from each pair in the decomposition, Callahan achieves a time bound of 0(/i(log n-\-e~^^'^\oge~^))for this approximation algorithm. Incremental and offline MSTs. In some applications one wishes to compute the minimum spanning trees of a sequence of point sets, each differing from the previous one by a small change, such as the insertion or deletion of a point. This can be done using similar ideas to the static algorithms described above, of constructing a sparse graph that contains the geometric minimum spanning tree. Such a graph will also change dynamically, and we use a dynamic graph algorithm to keep track of its minimum spanning tree. As with the static problem, the specific graph we use may be a Yao graph, Delaunay triangulation, or bichromatic closest pair graph, depending on the details of the problem. We start with the simplest dynamic minimum spanning tree problem, in which only insertions are allowed to a planar point set. In this case, the graph of choice is the Yao graph described earlier, in which we compute for each point the nearest neighbor in each of six 60° wedges. LEMMA 8. Given a set S ofn points, and a given 60° wedge of angles, in 0(n \ogn) time we can construct a data structure which can determine in 0(log/i) time the nearest point in S to a query point x, and forming an angle from x within the given wedge. PROOF. We construct a Voronoi diagram for the convex distance function consisting of the Euclidean distance for points within the wedge, and infinite distance otherwise. This diagram can be found in time 0{n \ogn) using any of several algorithms [41,56,104]. We then perform planar point location in this diagram; again, various algorithms are possible [58, 92,99,119]. D

We can then apply the static-to-dynamic transformation for decomposable search problems [21] to this data structure, producing an incremental data structure in which we can insert points to S and answer the same sorts of queries, both in time 0(log^ n). 4. We can maintain the Euclidean minimum spanning tree of a set ofpoints in the plane, subject to point insertions only, in time 0(log^ n) per update. THEOREM

Spanning trees and spanners

435

We maintain a sparse graph G containing the minimum spanning tree. We then use the above data structure to determine for each new point six candidate edges by which it might be connected to the minimum spanning tree, and add these edges to G. Insertions to a dynamic graph minimum spanning tree problem can be handled in logarithmic time each, using a data structure of Sleator and Tarjan [124]. D PROOF.

A more complicated technique based on the same Yao graph idea can be used to handle an offline sequence of both insertions and deletions, in the same time bound [61]. Fully dynamic MSTs. The fully dynamic case, in which we must handle both insertions and deletions online (without knowing the sequence of events in advance) is much harder. A method of Eppstein [62] can be used to maintain the solution to a bichromatic closest pair problem; combining this with the reduction of Lemma 5 and a fully dynamic graph minimum spanning tree algorithm [69] gives a method with amortized running time 0(n^/^log^n + ^i-2/(r6f/2i+i)+e^ p^j, update, where d denotes the dimension of the problem. Recently Henzinger and King [81] further improved this to OCn^/^log'^+^n +ni-2/(r^/2Hi)+6:) Agarwal et al. [3] extended the nearest neighbor searching methods used by these data structures to more general algebraic distance functions in two dimensions, and in particular to planar Lp metrics. In rectilinear metrics, bichromatic closest pairs can be maintained in polylogarithmic time, so the total time per update can be simplified to 0{n^^^ log^^^ n). However these time bounds are too large, and the algorithms too complicated, to be of practical interest. We instead describe in more detail a technique that works well in a certain average case setting defined by Mulmuley [108] and Schwarzkopf [120]. We define a signature of size n to be a set 5 of n input points, together with a string s of length at most In consisting of the two characters " + " and "—". Each " + " represents an insertion, and each "—" represents a deletion. In each prefix of s, there must be at least as many " + " characters as there are "—" characters, corresponding to the fact that one can only delete as many points as one has already inserted. Each signature determines a space of as many as (n!)^ update sequences, as follows. One goes through the string s from left to right, one character at a time, determining one update per character. For each "-h" character, one chooses a point x from S uniformly at random among those points that have not yet been inserted, and inserts it as an update in the dynamic problem. For each "—" character, one chooses a point uniformly at random among those points still part of the problem, and updates the problem by deleting that point. For any signature, we define the expected time for a given algorithm on that signature to be the average time taken by that algorithm among all possible update sequences determined by the signature. The algorithm is not given the signature, only the actual sequence of updates. We then define the expected time of the algorithm on inputs of size n to be the maximum expected time on any signature of size n. In other words, we choose the signature to force the worst case behavior of the algorithm, but once the signature is chosen the algorithm can expect the update sequence to be chosen randomly from all sequences consistent with the signature. Note that this generalizes the concept of a randomized incremental, since the expected case model for such algorithms is generated by signatures containing only the "-h" character. To demonstrate the power of this expected case model, and derive a fact we will need in our minimum spanning tree algorithm, we prove the following result. Compare this

436

D. Eppstein

with the Gin) worst case bound on the amount of change per update in the Delaunay triangulation. LEMMA 9 (Mulmuley). For any signature of size n, the expected number of edges in a dynamic planar Delaunay triangulation that change per update isO{\).

We first consider the change per insertion. Suppose after an insertion at some step / of the algorithm, there are exactly j points remaining. Since the Delaunay triangulation is a planar graph, it will have at most ?>j — 6 edges. Each edge will have just been added to the graph if and only if one of its endpoints was the point just inserted, which will be true with probability 2/j. So the expected number of additional edges per insertion is at most (3j — 6) • 2/j = 0(1). The number of existing edges removed in the insertion is at most proportional to the number of edges added, and can possible be even smaller if the convex hull becomes less complex as a result of the insertion. Thus the total change per insertion is 0(1). The total change per deletion can be analyzed by a similar argument that examines the graph before the deletion, and computes the probability of each edge being removed in the deletion. D

PROOF.

This fact can then be used to show that the Delaunay triangulation can be maintained efficiently. Deletions can be performed in time proportional to the complexity of the change [5]. Insertions can also be performed in this amount of time as long as the point to be inserted can be located within the existing Delaunay triangulation. This point location can be performed using a data structure based on the history of the structure of the Delaunay triangulation, similar to that used by Guibas et al. [78], and which can be shown to have logarithmic expected search time in this expected case model. With some care, this structure can be updated quickly after each deletion. THEOREM 5. The minimum spanning tree of a planar point set can be maintained fully dynamically for any signature of size n in expected time O(logn) per update. PROOF. AS shown by Mulmuley, by Schwarzkopf, and by Devillers et al. [51], we can maintain the Delaunay triangulation in this time bound. Since the Delaunay triangulation is a planar graph, we can find its minimum spanning tree using a data structure of Eppstein etal. [70]. D OPEN PROBLEM 1. Can we maintain the Euclidean minimum spanning tree dynamically in poly logarithmic worst case or amortized time per update?

Kinetic MSTs. Instead of allowing only one point at a time to change arbitrarily, one can also consider an alternative form of dynamism, in which all points move simultaneously but predictably. The simplest form of this problem is one in which a set of n points each have a linear motion (as a function of a parameter which we refer to conventionally as time). One can ask how many times the minimum spanning tree of these moving points changes, ask for an algorithm to compute this sequence of changes, or find the value of the time parameter that optimizes some given function of the MST.

Spanning trees and spanners

437

Note that two linearly moving points have a quadratically varying Euclidean distance, so one can not directly apply known combinatorial bounds or algorithms for graphs with linearly varying edge weights [52,64,71,79]. However, several insights from the graph case carry over to the geometric setting; in particular, for point sets in general position (no three simultaneous equal distances) the MST changes must be in the form of swaps between two equal-length edges. If one draws an arrangement of curves, one curve graphing the weight function of each potential edge in the MST, then these changes only occur at times corresponding to arrangement vertices. Hence there can be O(n^) MST changes total, in any metric with the property that the distance between two moving points is a piecewise algebraic function with bounded degree and a bounded number of breakpoints. It is easy to find point sets for which the MST changes Q{n^) times (simply pass n/2 moving points along a line containing n/2 fixed points). Katoh et al. [86] showed that the Yao graph, and hence the Euclidean MST of a linearly moving point set, can only change 0(/2^2"^"^) times, that the rectilinear MST can change 0{n^^^a{n)) times, and that the rectilinear maximum spanning tree can change 0{n^) times. For Euclidean maximum spanning trees the best bound on the number of changes is currently only 0(n^'^^^) [126]. The 0{n^f^a(n)) bound on rectilinear MST changes follows by partitioning the problem into a sequence of 0{na{n)) sparse graph problems; it therefore follows from the recent breakthrough results of Dey [52] that this bound can be improved to 0{n^^^a{n)). All of these results are largely independent of the dimension. Note that only in the case of rectilinear maximum spanning trees are these bounds tight. OPEN PROBLEM 2. What is the maximum number of changes in the Euclidean minimum spanning tree ofn linearly moving pointsl How quickly can we compute that sequence of changesl

Finally, this problem of moving points can be combined with the dynamic point sets described earlier in kinetic geometry, a framework in which a system of linearly moving points can be updated by inserting, deleting, or changing the motion of points [19]. Basch et al. [20] describe results on proximity problems of moving points in this framework.

2.2. Maximum weight spanning trees For graphs, the maximum spanning tree problem can be transformed to a minimum spanning tree problem and vice versa simply by negating edge weights. But for geometric input, the maximum spanning tree is very different from the minimum spanning tree, and different algorithms are required to construct it. This problem was first considered by Monma et al. [106], and has applications in certain clustering problems [16]. We first examine the edges that can occur in the maximum spanning tree. One might guess, by analogy to the fact that the minimum spanning tree is a subgraph of the Delaunay triangulation, that the maximum spanning tree is a subgraph of the farthest point Delaunay triangulation. Unfortunately this is far from being the case — the farthest point Delaunay triangulation can only connect convex hull vertices, and it is planar whereas the maximum

438

D. Eppstein

spanning tree has many crossings. However we will make use of the farthest point Delaunay triangulation in constructing ih^ farthest neighbor forest, formed by connecting each site to the site farthest away from it. The first fact we need is a standard property of graph minimum or maximum spanning trees. LEMMA 10. The farthest neighbor forest is a subgraph of the maximum spanning tree. LEMMA 11 (Monma et al. [106]). Let each tree of the farthest neighbor forest be twocolored. Then for each such tree, the convex hull vertices of any one color form a contiguous nonempty interval of the convex hull vertices. The trees of the forest can be given a cyclic ordering such that the intervals adjacent to any such interval come from adjacent trees in the ordering.

12 (Monma et al. [106]). Let e = (x,y) be an edge in the maximum spanning tree but not in the farthest neighbor forest, with x in some farthest point neighbor tree T. Then x and y are both convex hull vertices, and y is in a tree adjacent to T in the cyclic ordering of Lemma 11. LEMMA

Putting these pieces of information together, we have the following result. THEOREM 6 (Monma et al. [106]). The maximum spanning tree of a planar point set can be constructed in 0(n \ogn) time by computing the farthest neighbor forest, determining the cyclic ordering of Lemma 11, finding the longest edge between each adjacent pair of trees in the cyclic ordering, and removing the shortest such edge.

The farthest neighbor forest and the longest edge between adjacent trees can be computed easily via point location in the farthest point Voronoi diagram. Eppstein [63] considered the same problem from the average case dynamic viewpoint discussed above. His algorithm performs a similar sequence of steps dynamically: maintaining a dynamic farthest neighbor forest, keeping track of the intervals induced on the convex hull and of the cyclic ordering of the intervals, and recomputing longest edges as necessary between adjacent intervals using a dynamic geometric graph based on the rotating caliper algorithm for static diameter computation. THEOREM 7 (Eppstein). The Euclidean maximum spanning tree can be maintained in expected time 0(log'^ n) per update.

Just as higher dimensional minimum spanning trees are closely related to bichromatic nearest neighbors, higher dimensional maximum spanning trees can be related to bichromatic farthest neighbors. Agarwal et al. [4] used this idea to give a randomized algorithm for the three-dimensional maximum spanning tree with expected time complexity 0(/i^/^log^/^n), almost matching the bound for the corresponding minimum spanning tree problem. The same authors also provide fast approximation algorithms to three- and higher-dimensional maximum spanning tree problems.

Spanning trees and spanners

439

Since the maximum spanning tree involves many edge crossings, it is also natural to consider the problem of finding the maximum planar spanning tree, that is, the maximum weight spanning tree not involving any edge crossings. The exact complexity of this problem appears to be unknov^n, but Alon et al. [7] point out that it can be approximated to within a factor of two simply by choosing a tree with a star topology (in which one hub vertex is connected to all n — 1 others). Choosing the best possible hub can be done in 0(n^) time; Alon et al. show that a constant factor approximation to the maximum noncrossing spanning tree can be found in 0(n) time by choosing a suboptimal hub. OPEN PROBLEM 3. What is the complexity of finding the exact maximum weight noncrossing spanning treel If it is NP-hard, how well can it be approximated in polynomial timel

2.3. Low-degree spanning trees For points in the plane (with the Euclidean metric), any minimum spanning tree has degree at most six, and a perturbation argument shows that there always exists a minimum spanning tree with degree at most five [107]. In general the degree of a minimum spanning tree in any dimension is bounded by the kissing number (maximum number of disjoint unit spheres that can be simultaneously tangent to a given unit sphere) [114]. However it is interesting to consider the construction of trees with even smaller degree bounds. As an extreme example, the traveling salesman path problem asks us to find a spanning tree with degree at most two. As is well known, one can approximate this to within a factor of two by performing an Euler tour of the graph formed by doubling the edges of a minimum spanning tree. Christofides' heuristic [42] reduces the approximation ratio to 3/2 by forming a smaller Eulerian graph, the union of a minimum spanning tree and a matching on its odd degree vertices. These techniques do not take much advantage of the geometry of the problem, and work for any metric space. Very recently, Arora [11,12] has discovered a polynomial time approximation scheme for the planar Traveling Salesman Problem. The basic idea, like that of many recent geometric approximation algorithms, is to use dynamic programming on a structure similar to Callahan's fair split tree. Arora shows that, for any point set, there exists a tour approximating the TSP and a recursive decomposition in which each box is crossed only a small number of times by this approximate tour. One can then find the best possible subtour for each small subset of edges crossing each box, by combining similar information from smaller boxes. The time to approximate the TSP within a factor of 1 + 6: is 0{n log^^^^'^^ n). This approximation strategy generalizes to higher dimensional traveling salesman problems as well, with a time bound of the form 0(n log^^^^/^^ n). For any fixed dimension and fixed value of s this is within a polylogarithmic factor of linear, but with an impractically high exponent in the poly log. One can also consider degree bounds between two and five. KhuUer et al. [90] consider this problem for degree bounds of three and four; they show that one can find constrained spanning trees with length 3/2 and 5/4 times the MST length respectively. They also show

440

D. Eppstein

that in any dimension one can find a degree-three tree with total length at most 5/3 that of the minimum spanning tree. The methods of Khuller et al. are based, like the 2-approximation to the TSP, on modifications to the minimum spanning tree to reduce its degree. For instance, their algorithm for the planar degree-three tree problem roots the minimum spanning tree, then finds for each vertex v the shortest path starting at v and visiting all the (at most four) children of v. The union of these paths is the desired degree-three tree. The exact solution to the planar degree-three spanning tree problem is NP-hard [111] but apparently the complexity of the degree-four problem remains open. O P E N PROBLEM 4. Is it NF-hard to find the minimum weight degree-four spanning tree of a planar point setl

It is also natural to consider maximization versions of these bounded-degree spanning tree problems. Barvinok [18] shows that the adjacency matrix of a complete geometric graph (using a polyhedral approximation to the Euclidean distance function) has "low combinatorial rank" and uses this to approximate the maximum traveling salesman problem within any factor (1 — £) in polynomial time. Little seems to be known about similar bounded-degree maximum spanning tree problems with larger degree bounds. Alon et al. [7] consider the maximum non-crossing traveling salesman problem, and its generalization to the construction of a maximum bounded-degree non-crossing spanning tree. They show that this can be approximated by linking the edges of a heavy non-crossing matching formed by projecting the points onto a line, splitting the points into two sets by their median on this line, and matching points of one set with those of the other. The approximation ratio of this method for the non-crossing traveling salesman problem is l/n — s; this ratio is not worked out explicitly for the other bounded-degree spanning tree problems but remains a constant. The time used by Alon et al. to find this long non-crossing path is 0(n logn). As with the other non-crossing problems considered by Alon et al., the complexity of finding exact solutions apparently remains open.

2.4. k-point spanning trees We next consider the k-minimum spanning tree problem: given n points in the Euclidean plane, find the shortest tree spanning k of the points (Figure 3(a)). Up to constant factors in the approximation ratio, the /:-MST problem is equivalent to the problem of finding a path connecting k points (the /:-TSP problem) or a Steiner tree connecting k points. The choice of Euclidean metric is also not critical. However we will use the A:-MST formulation for simplicity. The /:-MST problem was introduced independently by Zelikovsky and Lozevanu [133], and by Ravi et al. [113]. Many similar ^-point selection problems with other optimization criteria can be solved in polynomial time [50, 68] but the /:-MST problem is NP-complete [113,133] (as are obviously the /:-TSP and /:-Steiner tree variants), so one must resort to some form of approximation. In a sequence of many papers, the approximation ratio was reduced to Oik^^"^) [113], O(logi^) [75,102], 0(log)^/loglogw) [651,0(1) [27], 2V2 [105], and finally 1-f 6: [11]. We describe the 2 ^ 2

Spanning trees and spanners

441

~l

Fig. 3. (a) 6-point minimum spanning tree, (b) Guillotine partition.

approximation algorithm, but the other results use similar methods. In particular, the 1+6: approximation results of Arora can be seen as a more complicated generalization of this method. For related work on non-geometric ^-MST problems see [17,28,37,113,133]. Mitchell [105] first restricts his attention to the rectilinear metric in the plane; the weight of a tree in this metric differs by its Euclidean weight by a factor of at most \/2, so this simplification entails only that factor loss in the overall approximation ratio of his algorithm. With this restriction, one can look for a rectilinear tree in which vertices are connected by paths of horizontal and vertical line segments. Most of the approximation algorithms for the geometric /:-MST problem work by using dynamic programming to construct a suitable recursive partition of the plane, and Mitchell's is no exception. Mitchell applies the concept of a guillotine subdivision, previously used e.g. in VLSI design; this is a recursive partition of the plane into rectangles, in which each rectangle is subdivided by a vertical or horizontal line segment into two smaller rectangles (Figure 3(b)). For a given rectilinear tree, the span of a line segment in the subdivision is the shortest contiguous subsegment containing all the points where the segment intersects the tree. (In other words, this span is a one-dimensional convex hull of the intersection of the line segment with the rectilinear tree.) The key technical result of Mitchell, the proof of which is too complicated to repeat here, is the following: 13 (Mitchell). For any rectilinear graph G, we can find a guillotine subdivision S, such that each edge of G is covered by the spans of segments in S, and such that the weight of these spans is at most twice the weight ofG. LEMMA

Let G be the optimum rectilinear ^-point spanning tree; then the lemma shows that there exists a guillotine subdivision, for which the spans of segments form a connected region of the plane covering at least k points, and with weight at most twice that of G. Conversely, if we construct the minimum weight guillotine subdivision with these properties, we can simply take a minimum spanning subgraph of this region of the plane to produce a rectilinear ^-point spanning tree with the same weight, which will then be twice that of the optimum rectilinear tree. (Actually, in general this process will form a Steiner tree rather

442

D. Eppstein

than a spanning tree. One must instead be more careful, and find a guillotine subdivision for which the minimum spanning subtree of the given k points has minimum total weight.) Thus we have reduced the problem to one of finding an optimum guillotine subdivision. This can be done by dynamic programming: there are 0{n^) combinatorially distinct ways of forming a rectangle containing one or more of the sites. For each of these different rectangles, for each possible number of sites within the rectangle, and for each of the (polynomially many) distinct ways of connecting those sites to the boundary of the rectangle, we find the optimal guillotine partition within that rectangle by combining information from 0{n) pairs of smaller rectangles. The result is a polynomial time algorithm for finding the optimum guillotine partition. 8 (Mitchell). In polynomial time, one can find a spanning tree of a subset ofk out ofn given planar sites, having total weight at most 2 V2 times the optimum.

THEOREM

The complexity of this method, while polynomial, is very high {0{n^^k^) or 0(^2 logn + nk^^)) but can be reduced somewhat (to 0{n^k^) or 0{n \ogn + nk^^)) at the expense of increasing the approximation ratio to a larger constant [105]. Further work remains to be done on reducing the time complexity of this algorithm to a more practical range. In this direction, Eppstein [65] showed that an 0(log/c) approximation could be found in time 0{n\ogn + nkXogk) by combining a similar dynamic programming approach with techniques based on quadtrees. Arora [11,12] showed that the approximation factor could be reduced to 1 + £. He shows that there exists a partition similar to the guillotine partition above, and a tree in which each partition edge is crossed a small number of times, such that the total length of this tree is within this 1 + s factor of optimal. He then uses very similar dynamic programming methods to find such a tree. Arora also reduces the time complexity of this approach to 0{n log^^^/^^ n) which, while still high, is at least within a polylogarithmic factor of linear. 2.5. Minimum diameter spanning trees The previous spanning tree problems have all been based on the weight of the tree constructed. We now consider other criteria for the quality of a tree. The diameter of a tree is just the length of its longest path. Since geometric spanning trees are often used in applications such as VLSI, in which the time to propagate a signal through the tree is proportional to its diameter, it makes sense to look for a spanning tree of minimum diameter. Ho et al. [82] give an algorithm for this problem, based on the following fact: LEMMA 14 (Ho et al.). Any point set has some minimum diameter spanning tree in which there are at most two interior points. PROOF. We start with any minimum diameter spanning tree T, and perform a sequence of diameter-preserving transformations until it is in the above form. Let P be the longest path in the given tree, and number its vertices ui, f2,. •., i^/?. We first form a forest by removing all edges of P from 7, and for each vertex v of P, let Ty denote the tree in this forest containing v. For any other vertex w, let Pu denote the

Spanning trees and spanners

443

Fig. 4. (a) Minimum diameter spanning tree corresponds to cover by two circles, (b) Point set with high diameter minimum spanning tree.

vertex v such that u is in Ty. Then we construct a new tree T' by adding to P an edge from each vertex u to Pu. T' has the same diameter as the original tree, since the distance between any two vertices can not increase except when they are in the same tree Ty, and in that case (by the assumption that P is a diameter path) the distance of each point to v is less than the distance from v to the endpoints of P. Now suppose that P has four or more edges and the length of the path v\-V2-v?> is at most half the length of P. (If not, we can reverse P and consider the three vertices at its other end.) Form a tree T^^ by removing every edge uv2 and reconnecting each such vertex u to V3. This can only decrease the lengths of paths already going through U3 in 7^ so the only pairs of vertices with increased path lengths are those newly connected to V3. But the length of any such path is at most twice the length of the path i'i-i'2-t'3, so the diameter of T^^ is no more than that of T. Each repetition of this transformation decreases the number of edges in P until it is at most three, and preserves the property that each vertex is within one edge of P, so we will eventually reach a tree of the form specified in the lemma. D

9 (Ho et al.). We can find a minimum diameter spanning tree of any point set in time Oirr').

THEOREM

PROOF. We simply try all single interior vertices and pairs of interior vertices. For the latter case, we still need to determine how to assign each remaining point to one of the two interior vertices. If the diameter path of the tree is fi-1^2-1^3-^4, and we know the lengths of v\-V2 and 1^3-i;4, we can perform this assignment by drawing two circles, centered at the two interior vertices, with those lengths as radii (Figure 4(a)); these circles must together cover the whole point set and each point can be assigned to the interior vertex corresponding to the circle covering it. Ho et al. show that, if we sort the points by their distances from V2 and U3, the space of all minimal pairs of covering circles can be searched in linear time. These sorted orders can be precomputed in a total of 0{n log n) time. Q

Ho et al. also consider optimization of combinations of diameter and total weight; they show that it is NP-complete to find a tree satisfying given bounds on these two measures. It is also of interest to combine these criteria with a bound on vertex degree. Of course for

444

D. Eppstein

degree-two trees, minimum diameter and minimum weight are equivalent to the travehng salesman problem. The minimum weight spanning tree itself can have very high diameter (an Q(^/n) factor away from optimal); for instance a point set spaced nearly uniformly in a unit square can have a path of length Q {y/n) as its minimum spanning tree (Figure 4(b)). Conversely an upper bound of 0 ( v ^ ) follows from results on the worst case length of the minimum spanning tree of n points [24,125]. One can achieve a better diameter by relaxing the requirement of minimum weight; as we describe later, for two- and three-dimensional point sets, one can find a subgraph of the complete Euclidean graph with degree three and total weight 0(1) times that of the minimum spanning tree, for which shortest paths in the subgraph have length within 0(1) of the Euclidean distance [44]. A single-source shortest path tree in such a graph is a degree-three tree that has both weight and diameter within a constant of the minimum. Similar problems of constructing spanning trees combining diameter, weight, and bottleneck shortest path bounds were considered by Salowe et al. [118] and Khuller et al. [91]. 2.6. Minimum dilation spanning trees Of the various common geometric network design quality criteria, only dilation (largest ratio of network distance to Euclidean distance) is underrepresented among research on the tree problems. Dilation has been studied for non-geometric tree design problems [30], and as we will see, is very prominent in work on other classes of graphs. The lack of work on tree dilation is likely because there is little to do in terms of worst case bounds: LEMMA

15. Any spanning tree on the vertices of a regular polygon has dilation Q{n).

PROOF. AS with any tree, we can find a vertex v, the removal of which partitions the tree into components the largest of which has at most 2/i/3 vertices. Therefore there is some pair of vertices from different components, adjacent to each other along the boundary of the polygon, and separated from v by at least n/6 polygon edges. The path in this tree D connecting this pair passes through v, and so has dilation Q{n).

Conversely, the minimum spanning tree has dilation 0(«) by its bottleneck shortest path property. However, the minimum spanning tree is not always good in terms of dilation; an example similar to that of Figure 4(b) shows that it can have dilation Q{n) even when dilation O(v^) is possible, it is easy to construct spanning trees with dilation O(v^). OPEN PROBLEM 5. Is it possible to construct the exact minimum dilation geometric spanning tree, or an approximation to it, in polynomial time? Does the minimum dilation spanning tree have any edge crossings! How well is it approximated by the minimum spanning treel

3. Planar graphs We now discuss problems of constructing planar graphs having a given planar point set as vertices. Note that any such problem (in which the graph is required only to be connected)

Spanning trees and spanners

445

requires Qinlogn) time in the randomized algebraic decision tree model, since element distinctness is reducible to sorting, sorting is reducible to convex hulls, and convex hulls can be found in linear time from a connected planar graph spanning the input points [103].

3.1. Minimum weight triangulation The minimum weight triangulation problem asks to find a triangulation (that is, a maximal planar straight-line graph on the given set of vertices) that minimizes the total Euclidean edge length. This problem is not known to be NP-hard, nor is it known to be solvable in polynomial time, and the complexity of minimum weight triangulation is one of the few problems left from Garey and Johnson's original list of open problems [74]. However, a generalized problem with non-Euclidean distances is NP-complete [100]. We describe here two very recent developments in the theory of minimum weight triangulations. First, Levcopoulos and Krznaric [96] have shown that one can find a triangulation with total length approximating the minimum to within a (large) constant factor; no such approximation was previously known. Second, Dickerson and Montague have found a method of finding in polynomial time a subgraph of the exact minimum weight triangulation which, empirically, is usually quite large; enough so that moderate sized instances of the problem can now be solved exactly. It is possible that their method in fact gives a polynomial time algorithm for the problem. MWT approximation. The two best approximations known to the MWT are those of Plaisted and Hong [112] and of Levcopoulos and Krznaric [96]. Although dissimilar in many ways, an important basic idea is shared by both papers. Rather than finding a triangulation directly, they consider the problem of finding a minimum weight partition into convex polygons with vertices at the input points (MC for short). We first sketch Plaisted and Hong's work. Let v be an interior vertex of a planar straightline graph with convex faces (such as the MWT of S). We can find a star of three or four edges forming no reflex angles at v as follows: choose the first star edge arbitrarily, and choose each successive edge to form the maximal non-reflex angle with the previous edge. Conversely, if each interior vertex of a planar straight-line graph has no reflex angles, the graph must have convex faces. Thus motivated, Plaisted and Hong try to build a graph on S with convex faces by piercing together local structures — stars. For each point st in the interior of the convex hull of 5, they find the minimum weight star of three or four edges. This collection of minimum weight stars, together with the convex hull of 5, forms a graph with total edge length less than twice that of MC and therefore of the MWT. Unfortunately, the resulting graph may not be planar. Plaisted and Hong use a complicated case analysis to remove crossings from this graph, ending up with a planar straight-line graph with convex faces having total edge length at most 12 times that of the MWT. The ring heuristic (connecting every other vertex of a convex polygon P to form a polygon P' with [n/2J vertices and a smaller perimeter, and triangulating P' recursively; see Figure 5(a)) can be used to convert this convex partition to a triangulation, at the cost of a logarithmic factor in total length (and hence in the approximation ratio). Olariu et al. [110] showed that this O(logn) bound is tight.

446

D. Eppstein

Fig. 5. (a) Ring heuristic triangulation of a convex polygon, (b) Greedy triangulation can have Q{^) weight than minimum.

larger

We now outline the results of Levcopoulos and Krznaric [96]. Their idea is to start with a proof that the greedy triangulation (in which one considers the possible edges in increasing order by weight, adding an edge to the triangulation exactly when it does not cross any previously added edge) achieves approximation ratio O(v^); an Q{^) lower bound was previously known [95,101] and is depicted in Figure 5(b). Rather than proving this directly, Levcopoulos and Krznaric again work with convex partitions. They define a greedy convex partition GC by constructing stars using only the edges in the greedy triangulation. Unlike the construction of Plaisted and Hong, the result is planar (since it is a subgraph of a planar graph) so no crossings need be removed. The first step of their proof is a lemma that the weight of GC approximates MC within a factor of O(v^). Given any graph G such as MC or GC, define maxG(f) to be the length of the longest edge incident to i; in G; for any planar graph the sum of these quantities is within a constant of the total graph weight. Then if the greedy partition is heavier than the minimum partition by a factor of/:, Levcopoulos and Krznaric choose v to maximize maxGc(i^) — maxMc(^) among all vertices with maxcc {v) = Q{k maxMC i^))- Some simple algebra shows that the weight of GC is 0{n maxGc(i^))- They then use the properties of the greedy triangulation (and the details of their construction of GC from their triangulation) to construct a fan of Q{k) edges resembling that in Figure 5(b), in which the short edge of the fan corresponds roughly with maxA/c(i^) and the long edge corresponds with maxGc(i^)- From this fan one can find a convex chain of Q{k) vertices such that any star at one of these vertices involves an edge of length ^(maxGc(i^)). As a consequence the weight of MC is Q{kmdiXGciv)). Combining these two bounds we see that the weight ratio k of GC to MC is 0(n/k). Therefore k = 0(y/n), and this gives an O(v^) approximation of MC by the greedy convex partition. Levcopoulos and Krznaric then show that for any convex partition C formed by edges of the greedy triangulation, C can be triangulated by adding diagonals of total length 0(\MWT\-\-\C\). Since the overall greedy triangulation we started with, restricted to each cell of C, forms a greedy triangulation of that cell, and since the greedy triangulation forms a constant approximation to the MWT of a convex polygon [97], the result is that the length of the greedy triangulation is 0(\MWT\ + \MC\^/n) = (\MWT\^). To improve this 0(^/n) approximation, Levcopoulos and Krznaric modify the greedy triangulation. Their algorithm MGREEDY adds edges one at a time to a planar straightline graph G, as follows. Let wf be the smallest edge not crossing anything already in G (so

Spanning trees and spanners

441

that the greedy algorithm would next add uvtoG). Then MGREEDY tests the following six conditions: • Some pair of edges uw and wv are already in G, with uwv forming an empty triangle. • Some edge wx crosses uv, with edge vx already in G and vwx forming an empty triangle. • Angle vwu is at least 135°. • \wx\ < l.l|wi;|. • If /7 is the intersection point of lines vx and uw, then \xp\ < 0.5\wp. • There is an edge uy already in G, such that triangle vuy is empty and angle wuy is reflex. If all six conditions hold for some two vertices w and x, then the algorithm adds edge wx to G; otherwise it adds uv. A similar construction of a convex partition and a fan in it now holds in this modified algorithm as it did in the greedy triangulation. However now the fan can only have 0(1) edges before forming a situation in which the six conditions above hold. The result is that the convex partition is a constant factor approximation to the minimum weight convex partition, and the modified greedy triangulation is a constant factor approximation to the minimum weight triangulation. As Levcopoulos and Krznaric show, these approximations can be constructed in time 0(n logn), or even 0(n) if the Delaunay triangulation is already known. OPEN PROBLEM 6. What is the best possible approximation ratio for a polynomial time approximation to the minimum weight triangulation!

Exact MWT construction. Instead of approximating the minimum weight triangulation, a number of authors have attacked the problem of constructing the exact minimum weight triangulation, by finding conditions sufficient to guarantee that certain edges belong to the MWT. If enough MWT edges could be found in this way, so that the resulting subgraph of the MWT connected all the vertices, the remaining regions of the plane could be treated as simple polygons and triangulated in polynomial time by dynamic programming [93]. This approach gained in credibility when Edelsbrunner and Tan [59] used it to solve a closely related problem, the min max weight triangulation. In this problem, the quality of a triangulation is measured by the length of its longest edge; the min max weight triangulation is the one minimizing this quantity. LEMMA 16 (Edelsbrunner and Tan). There exists some min max weight triangulation that contains the edges of the relative neighborhood graph of the sites. COROLLARY

1. The min max weight triangulation can be found in polynomial time.

The dynamic programming idea described above would lead to an 0(n?) time bound, but Edelsbrunner and Tan reduced this to O(n^). Recall that the relative neighborhood graph is defined in terms of a forbidden region characterization: an edge is in the graph if and only if the lune (formed by intersecting the two circles with that edge as radius) contains no other sites. Several authors have proven

448

D. Eppstein

similar forbidden region characterizations for the minimum weight triangulation. Yang et al. [ 131 ] show that if the region formed as the union of the same two radius circles is empty, the edge belongs to the MWT. (In particular, the two closest sites are connected by an edge in the MWT [76].) Keil [88], Yang [130], and Cheng and Xu [38] prove similar results for an alternate union of two circles, for which the given edge is a chord. Aichholzer et al. [6] provided a different type of characterization of minimum weight triangulation edges, which leads to an algorithm capable of finding the MWT for certain very large subsets. They define a light edge to be one that is not crossed by any other edge of smaller weight. It is not the case that all light edges need be part of the MWT, but they show that if the set of all light edges forms a triangulation, that triangulation must be the one minimizing the total edge weight (or any other monotonic functional of edge weights). Aichholzer et al. note that the characterizations of Keil, Yang et al. [88,130,131] all produce edges that must be Hght. The best computational results so far for exact minimum weight triangulation construction have been found by Dickerson and Montague [53,54]. They define a locally minimal triangulation to be one in which for every two adjacent triangles forming a convex quadrilateral, the common side of the triangles is the shortest diagonal of the quadrilateral. Clearly, the minimum weight triangulation is locally minimal; their idea is to identify edges belonging to all locally minimal triangulations. The technique is simply to maintain a set S of edges that might possibly be part of a locally minimal triangulation. Initially S consists all pairs of vertices, then in a sequence of passes Dickerson and Montague remove from S any edge that is not the short diagonal of a quadrilateral (not containing other sites) all sides of which still belong to S. Eventually no more edges can be removed, and the process terminates. They then define another set S' of all those edges remaining in S and not crossed by any other edge in S. LEMMA 17 (Dickerson and Montague). All edges in S' belong to all locally minimal triangulations.

Since only O(n^) edges can be removed from 5, this heuristic runs in polynomial time. In computational experiments, Dickerson and Montague have shown that for moderate sized inputs (between 100 and 200 points), the set of edges in S' is very likely to form a connected subgraph of the minimum weight triangulation. The minimum weight triangulation itself can then be found by dynamic programming. 7. Is the graph found by Dickerson and Montague always connected! Can one test in polynomial time whether a given edge belongs to some locally minimal triangulation! Can one find the exact minimum weight triangulation in polynomial timel OPEN PROBLEM

3.2. Low-dilation planar graphs We next consider the problem of constructing planar networks with low dilation (maximal ratio between graph and geometric distance). Clearly it will not always be possible to find networks with dilation very close to 1; for instance, any planar graph connecting the vertices of a square has dilation \/2.

Spanning trees and spanners

449

Fig. 6. (a) Diamond property: one of two isosceles triangles on edge is empty, (b) Graph violating good polygon property: ratio of diagonal to boundary path is high.

The initial work on this problem has been to show that various previously studied graphs had constant dilation. Chew [39] showed that the rectilinear Delaunay triangulation has dilation at most \/T0- (Note that the dilation here is measured in the Euclidean metric even though the triangulation itself is defined with the rectilinear metric. There is a factor of V2 lost in the translation; the rectilinear Delaunay triangulation has rectilinear dilation \f5.) Chew also pointed out that by placing points around the unit circle, one could find examples for which the Euclidean Delaunay triangulation was made to have dilation as much as n/l. In the joumaL version of his paper [40], Chew added a further result, that the graph obtained by Delaunay triangulation for a convex distance function based on an equilateral triangle has dilation at most 2. Chew's conjecture that the Euclidean Delaunay dilation was constant was proved by Dobkin et al. [55], who showed that the Delaunay triangulation has dilation at most (pn where cp is the golden ratio (1 + V5)/2. Keil and Gutwin [89] further improved this bound to g^^^f .^. ^ 2.42. Das and Joseph [46] then showed that these constant dilation bounds were not unusual; in fact such bounds hold for a wide variety of planar graph construction algorithms, satisfying the following two simple conditions: • Diamond property. There is some angle of < TT, such that for any edge ^ in a graph constructed by the algorithm, one of the two isosceles triangles with ^ as a base and with apex angle a contains no other site. This property gets its name because the two triangles together form a diamond shape, depicted in Figure 6(a). For instance, because of its empty-circle property, the Delaunay triangulation satisfies the diamond property with ot = 7T/2. • Good polygon property. There is some constant d such that for each face / of a graph constructed by the algorithm, and any two sites M, V that are visible to each other across the face, one of the two paths around / from u to v has dilation at most d. Figure 6(b) depicts a graph violating the good polygon property, because two nearby sites have no short boundary path connecting them. The good polygon property is satisfies by any triangulation (with d = 1). Intuitively, if one tries to connect two vertices by a path in a graph that passes near the straight line segment between the two, there are two natural types of obstacle one encounters. The line segment one is following may cross an edge of the graph, or a face of

450

D. Eppstein

Fig. 7. Fractal )6-skeleton with unbounded dilation.

the graph; in either case the path must go around these obstacles. The two properties above imply that neither type of detour can force the dilation of the pair of vertices to be high. THEOREM 10 (Das and Joseph). Any planar graph construction algorithm satisfying the diamond and good polygon properties produces graphs with bounded dilation.

The proof is too complicated to summarize here, but is in some ways similar to the proof of Dobkin et al. [55] that the Delaunay triangulation has bounded dilation. Das and Joseph go on to show that not only Delaunay triangulations but also the greedy and minimum weight triangulations possess these two properties, and hence have bounded dilation. (The bound, while constant, is quite high and could presumably be strengthened.) It seems clear that similar results should also hold for some other triangulation methods developed since their paper, such as the min max edge length triangulation and the min max angle triangulation [60]. Constant dilation of greedy and related triangulations plays a key role in Levcopoulos and Krznaric's recent constant-factor approximation algorithm for the minimum weight triangulation [96], and Drysdale [29] has pointed out that the diamond property of minimum weight triangulation can be very helpful in pruning the edges that could potentially take part in it, and speed up exact solution methods for this triangulation. Another set of natural candidates for bounded dilation are the p-skeletons, formed by including an edge ab when no other site c forms an angle acb larger than some particular bound (depending on the parameter P). When the angle bound is 90° this is the Gabriel graph, a subgraph of the Delaunay triangulation and the relative neighborhood graph, and a supergraph of the minimum spanning tree. Skeletons with larger angle bounds have been used to find sets of edges guaranteed to be part of the minimum weight triangulation [38,88, 130]. As p approaches zero, these skeletons contain more and more edges, until eventually one forms the complete geometric graph; this limiting behavior along with the fact that the definition of yS-skeletons is closely related to Das and Joseph's diamond property hint together that these graphs might have bounded dilation. But Eppstein [67] has recently shown that a fractal construction leads to ^S-skeletons in the form of paths with unbounded dilation, for any fi >0. (Figure 7.) Curiously, there has been little or no published work on using dilation as the direct basis for constructing planar graphs (rather than constructing graphs some other way and mea-

Spanning trees and spanners

451

suring the dilation of the result). Obviously, the minimum dilation planar graph should be a triangulation, since it is never harmful to add diagonals. It seems that it should have useful properties similar to those of the Delaunay triangulation, min max angle triangulation, min max edge length triangulation, minimum weight triangulation, and other optimal triangulations, but this has apparently not been studied. For many optimal triangulation problems, the version of the problem in which one optimally completes the triangulation of a convex or simple polygon can be solved by dynamic programming [93], however even this is not obvious for the minimum dilation triangulation. A solution to this subproblem might have implications in allowing the powerful edge insertion method [22,60] to be applied to the point set version of the problem. OPEN PROBLEM 8. Is it possible to construct in polynomial time the minimum dilation triangulation of a point set, or of a simple polygon!

Clearly there still also remains a wide gap between the best upper and lower bounds (2 and \/2 respectively) on dilation of planar graphs. OPEN PROBLEM

9. What is the worst case dilation of the minimum dilation triangula-

tionl The rectilinear case of Open Problem 9 is solved: Arikati et al. [10] showed that for the L\ (or equivalently Loo) planar metrics there is always a planar 2-spanner, and that some point sets have no better spanner. 3.3. Planar dilation and weight Levcopoulos and Lingas [98] and Das and Joseph [46] brought the total weight of the graph, as well as its dilation, into the equation. Clearly the weight should be measured in terms of the minimum spanning tree, for as Das and Joseph [46] observe, any graph with bounded dilation should at least be connected. Das and Joseph [46] form a planar graph by applying a greedy triangulation algorithm to the polygons remaining between the minimum spanning tree and the convex hull of the sites. They then consider the greedy edges in decreasing order of weight, removing each edge if it is unnecessary to achieve the desired dilation. They then apply their diamond property and good polygon property criteria to bound the dilation of the resulting pruned graph. Because they only prune the greedy edges, the total weight of the spanner they construct is close to three times that of the minimum spanning tree. Althofer et al. [8,9] later generalized this pruning strategy to arbitrary graphs. Given any graph, and any parameter r > 0, their method again considers the edges of the graph in decreasing order by weight, removing each edge if it is not necessary to achieve dilation \-\-t. Obviously the result is a subgraph with dilation 1 -f ^, but they prove further that the total weight of this subgraph is 1 -\-0{n/t) times that of the graph's minimum spanning tree, and that the number of edges is 0(^^~^^^^/^^). For planar graphs these bounds are much better: The weight is 1 + 0 ( 1 / 0 times that of the minimum spanning tree, and the number of edges is n(l + 0 ( 1 / 0 ) -

452

D. Eppstein

Althofer et al. then apply this method to the Delaunay triangulation, which as we have seen is a planar graph with constant dilation that also contains the Euclidean minimum spanning tree. The result is a planar spanner with constant dilation, few edges, and weight arbitrarily close to that of the minimum spanning tree. Levcopoulos and Lingas [98] proved the same result by a similar but more complicated method of pruning the Delaunay triangulation; their pruning method works only for planar graphs, but has the further advantage that it runs in linear time. The same pruning method can be used to trade weight and dilation in the other direction, and find graphs with dilation arbitrarily close to that of the Delaunay triangulation, and weight a large constant times that of the minimum spanning tree.

4. General graphs Most of the work on general geometric network design problems, in which the network to be constructed is not of some restricted class, has been on dilation of sparse graphs, since it is trivial to find a graph with low weight or diameter, or to find a non-sparse graph with low dilation.

4.1. Dilation only As we saw, for planar graphs, the dilation can not approach one. By considering nonplanar graphs, it is possible to find sparse graphs approximating the complete Euclidean graph arbitrarily closely. Specifically, Keil [87] showed that variations of the Yao graph construction (in which one partitions the space around each point into wedges with a given fixed opening angle, and connects the point to the nearest neighbor in each wedge) produce graphs with dilation arbitrarily close to 1, with 0{n) edges, and that can be constructed in time 0{n \ogn). No better time bound is possible in the randomized algebraic decision tree model of computation, since spanners could be used to solve the element distinctness problem [35]. THEOREM 11 (Keil). The Yao graph, formed by wedges of opening angle 0 < 60°, produces graphs with dilation 1 + 0(l/6>). PROOF. TO find a path in this graph from u to v, one at each step determines the wedge containing v and moves along a graph edge to the nearest vertex (w;) in that wedge. The worst case for the algorithm occurs when uv and uw are similar in length but widely separated in angle, in which case the distance to v is reduced by (1 — 0(1/0))uw. For 0 < 60° this reduction must be positive, and repeating the process brings us eventually to V. The total distance traveled is proportional to 1/(1 - 0(1/^)) = 1 + O(l/0) times the total reduction in distance to v, which is exactly the original distance from u to v. D

Althofer et al. [8,9] observed that this result holds in any dimension, and Ruppert and Seidel [115] modify the technique so that orthogonal range searching methods can be used in its construction, improving its running time in high dimensions to 0(n log*^"^ n).

Spanning trees and spanners

453

Callahan [31] improved the dependence between the number of edges and the dilation, as well as the construction time, in this result: THEOREM 12. If one forms a well-separated pair decomposition, and chooses a representative edge from each pair, the resulting graph has 0{n) edges and can be made to have dilation arbitrarily close to one {as a function of the separation parameter of the decomposition). PROOF. We find a short path between two sites u and v by the following recursive process: by the definition of a well-separated pair decomposition, the decomposition includes some pair ([/, V) of sets of sites for which w is in t/ and i; is in V. Find the edge u'W representing the pair {U, V), and form a path by recursively connecting u to u', following edge u'v', and connecting v' to v. If the parameter of separation in the decomposition is s, and the length of wi; is r, the length of u'v' can be at most r{s -\- A)/s, and the length of uu' and vv' can be at most 2r/s. Therefore this recursive algorithm produces a path with length satisfying the recurrence

L{r) ^ r(l + A/s) + 2L{2r/s). If ^ > 4, this solves to 0(r), and for any e > 0 one can choose a sufficiently large s for which the solution to this recurrence i s r ( l + £ ) . D As in his approximation to the Euclidean minimum spanning tree, Callahan further shows that the dependence on e can be reduced by choosing more carefully the representative edge for each pair in the well separated pair decomposition. Similar constructions of sparse spanners with a larger dependence on the dilation were also given by Salowe [116] and Vaidya [129].

4.2. Dilation and weight Note that the small-dilation graphs described above may have very high weight. As we have already seen, it is possible for planar sites to construct small-dilation graphs with weight arbitrarily close to that of the minimum spanning tree. The greedy algorithm of Althofer et al. [8,9] (described in the section on planar graphs) was defined for any graph, and so produces spanners with nontrivial weight bounds in any dimension; but in general the results proved by those authors are far from the constant factor over minimum spanning tree weight that one would hope for. Das et al. [45] showed that applying this greedy algorithm to the complete Euclidean graph in three dimensions again produces a spanner with any given dilation t > \, and total weight 0(1) times that of the minimum spanning tree (where the constant depends on t). Chandra [33] showed that for random point sets in higher dimensions, the weight is again 0(1) times that of the minimum spanning tree. Das and Narasimhan [48] apply this greedy approach to a sparse spanner produced by clustering techniques; the dilation of the result is the product of the dilations from these two steps, which is still typically some constant. This idea speeds

454

D. Eppstein

Fig. 8. Isolation property: a cylinder around each edge is not crossed by any other edge.

up the greedy method to run in time 0{n log^ n), and produces results similar to those of Althofer et al. Chandra et al. [34] showed that, for any graph, one can construct a spanner with dilation 0(log^ n) and weight 0 ( l ) times that of the minimum spanning tree. For geometric graphs in any dimension, they construct spanners with constant dilation and weight O(logn) times that of the minimum spanning tree. They actually give two methods for this second result. One method is simply to apply the greedy algorithm; they show an O(logn) weight factor based on the gap property: the endpoints of any two edges are separated by a distance at least proportional to the smaller of the two edge lengths. The other method combines known sparse (but heavy) spanners with approximations to the traveling salesman path; the algorithm then partitions the path recursively into smaller pieces and combines spanners from representative points on each piece. Arya and Smid [141 modify and speed up the first, greedy, method: instead of adding edges incrementally when necessary to preserve the dilation, and proving that the result satisfies the gap property, they add edges unless the gap property would be violated, and show that the resulting graph has bounded dilation. With this modified greedy method they show that a graph with bounded dilation and weight 0(log/i) times that of the minimum spanning tree can be constructed in time 0{n \og^ n). Finally, Das, Narasimhan, and Salowe [49] extended the results of Das et al. [45], and showed that in any dimension the greedy algorithm produces spanners with both constant dilation and weight a constant times that of the minimum spanning tree. The dilation bound is immediate; the weight bound is reminiscent of the methods of Das and Joseph [46] in that the authors describe a collection of general conditions under which such a bound applies; further their isolation property is very similar to the diamond property of Das and Joseph. • Isolation property. There exists a constant c, such that any edge of length t produced by the given algorithm can be placed within a cylinder of radius and height c • i (Figure 8), such that the axis of the cylinder is a subset of the edge, and the cylinder does not intersect any other edge of the graph. Note that, unlike the diamond property, the cylinders are required to avoid the edges of the graph, and not just the other sites. Also note that in this definition the cylinders around each edge may intersect each other, but one can shrink them by a factor of two to avoid intersections. The exact shape of the cylinders is also unimportant.

Spanning trees and spanners

455

LEMMA 18 (Das et al.). Any geometric graph satisfying the isolation property has weight at most a constant times that of the minimum spanning tree. The proof is based on separating the edges of the graphs into groups of nearly parallel edges, and charging the length in each group to edges in the Steiner minimal tree of the sites. Das et al. also prove similar results for the leapfrog property, a generalization of the isolation property for which they give a more complicated definition. They then show that graphs produced by a version of the greedy algorithm have this property. This then proves that the greedy algorithm produces spanners with weight 0(1) times that of the minimum spanning tree. 4.3. Dilation, weight, and degree Perhaps the ultimate results in high-dimensional spanners combine dilation, weight, and vertex degree. Clearly the degree bound must be at least three, since degree-two graphs may be forced to have very large dilation. Further, for any fixed bound d on the degree, one must have dilation bounded away from one by some function of d, even in the plane, as can be seen by considering the vertices of a regular d + 2-gon. Chandra et al. [34] showed that their version of the greedy method, when applied to polyhedral approximations to the Euclidean graph, produces a spanner with degree bounded by some function of the dilation, dimension, and the particular approximation. Their bound is not stated explicitly but is roughly exponential in the dimension. As we have seen these spanners also have low weight. Salowe [117] produces another bounded-degree spanner algorithm by modifying the Yao graph construction described earlier (which may have unbounded degree). The idea is simply to add edges to the spanner in order by weight, adding an edge (w, v) if there is no other edge (w, w) or (u, w) already added and having an angle close to that of (w, f). Salowe also reports that a similar degree bound applies to the spanner of Ruppert and Seidel [115] but this appears to be erroneous. However it should be possible to keep track of the next edge to be added to the graph at each step of this construction (that is, the shortest edge within a certain range of angles, connecting two points not already incident to edges in that range) by combining Ruppert and Seidel's modified Yao graph orthogonal range searching technique [115] with a method of Eppstein [62] for maintaining bichromatic closest pairs dynamically. The result would be an 0{n log^^^^ n) time algorithm to construct this bounded degree spanner. As we have already seen, Arya and Smid [14] achieved a similar time bound for an alternate bounded degree spanner. Yet another bounded-degree spanner construction is credited by Vaidya [129] to Feder and Nisan. Finally, Arya et al. [13] improved the time bounds of all these methods. The results of Arya et al. include an 0{n \ogn) time algorithm for constructing a spanner with bounded dilation, bounded degree, and weight a constant factor times the minimum spanning tree. They also give an 0{n log n) algorithm for constructing a spanner with bounded dilation on paths of O(logn) edges, bounded degree, and weight 0(log^ n) times that of the minimum spanning tree. (The idea of finding short paths with few edges was also previously considered by Arya, Mount, and Smid [15].) Therefore for any fixed dilation, one can quickly

456

D. Eppstein

find spanners with bounded degree. Further work on the problem has turned this tradeoff around, and asked how small a degree is possible to achieve bounded dilation. Salowe [117] was the first to find degree bounds that did not grow with the dimension of the problem; he showed that in any dimension, there is a degree-four graph with constant dilation. Salowe starts with any one of the bounded degree methods discussed above. Salowe's method for reducing the degree to four is then to cluster points using the nearest neighbor forest, and use these clusters to roughly halve the degree of any spanner construction method. Starting with the initial bounded degree spanner method described above and iterating this degree reduction process produces his result. This paper also contains a convenient classification of the spanner literature in terms of five parameters (dilation, time, number of edges, weight, and degree) and the class of metric space for which the spanners are defined. Salowe's paper does not however include a bound on the total weight of his spanners. Das and Heffeman [44] improved this degree-four bound, by showing that in any dimension, there is a graph with maximum degree three, at most dn edges (for any J > 1), constant dilation (depending on d), and total weight O(logn) times the minimum spanning tree weight. They state that in dimensions two and three the weight can be further reduced to 0(1) times the minimum spanning tree weight. Their technique involves similar nearest-neighbor-forest based clustering methods to those of Salowe, applied somewhat more carefully, and combined with the greedy spanners constructed by Chandra et al. [34]. The weight bound comes from summing the weight of the greedy spanner with that of the nearest neighbor forest (which as a subgraph of the minimum spanning tree has small weight). Combining this with the recent result of Das et al. [49] on constant weight bounds for the greedy spanner construction yields the following result. THEOREM 13 (Das, Heffeman, Narasimhan, and Salowe). For sites in any fixed dimension, and for any constant d ^ \, one can construct in time 0(n logn) a graph with constant dilation, degree three, at most dn edges, and weight a constant factor times that of the minimum spanning tree.

References [1] Active Geometry Group, Johns Hopkins U., Extracting the geometry of the vascular tree. Manuscript, available online at http://blaze.cs.jhu.edu/grad/lundberg/agg/projects/vasc.html. [2] P.K. Agarwal, H. Edelsbrunner, O. Schwarzkopf and E. Welzl, Euclidean minimum spanning trees and bichromatic closest pairs. Discrete Comput. Geom. 6 (1991), 407^22. [3] P.K. Agarwal, A. Efrat and M. Sharir, Vertical decomposition of Shallow levels in 3-dimensional arrangements and its applications, Proc. 11th ACM Symp. Comp. Geom. (1995), 39-50. [4] P.K. Agarwal, J. Matousek and S. Suri, Farthest neighbors, maximum spanning trees and related problems in higher dimensions, Comput. Geom. 1 (1992), 189-201. [5] A. Aggarwal, L.J. Guibas, J. Saxe and P.W. Shor, A linear time algorithm for computing the Voronoi diagram of a convex polygon. Discrete Comput. Geom. 4 (1989), 591-604. [6] O. Aichholzer, F. Aurenhammer, M. Taschwer and G. Rote, Triangulations intersect nicely. Discrete Comput. Geom. 16 (1996), 339-359. [7] N. Alon, S. Rajagopalan and S. Suri, Long non-crossing configurations in the plane. Fund. Inform. 22 (1995), 385-394.

Spanning trees and spanners

457

[8] I. Althofer, G. Das, D. Dobkin and D. Joseph, Generating sparse spanners for weighted graphs, Proc. 2nd Scand. Worksh. Algorithm Theory, Springer LNCS 447 (1990), 26-37. [91 I. Althofer, G. Das, D. Dobkin, D. Joseph and J. Soares, On sparse spanners of weighted graphs. Discrete Comput. Geom. 9 (1993), 81-100. [101 S. Arikati, D.Z. Chen, L.R Chew, G. Das, M. Smid and CD. Zaroliagis, Planar spanners and approximate shortest path queries among obstacles in the plane, Proc. 4th Eur. Symp. Algorithms, Springer LNCS 1136(1996), 514-528. [11] S. Arora, Polynomial time approximation schemes for Euclidean TSP and other geometric problems, Proc. 37th IEEE Symp. Foundations of Comp. Sci. (1996), 2-11. [12] S. Arora, Nearly linear time approximation schemes for Euclidean TSP and other geometric problems. Manuscript (1997). [13] S. Arya, G. Das, D.M. Mount, J.S. Salowe and M. Smid, Euclidean spanners: Short, thin, and lanky, Proc. 27th ACM Symp. Theory of Computing (1995), 489^98. Available onhne at http ://w WW. cs. umd. edu/~ mount/Papers/stoc95. ps. [14] S. Arya and M. Smid, Efficient construction of a bounded degree spanner with low weight, Proc. 2nd Eur. Symp. Algorithms, Springer LNCS 855 (1994), 48-59. [15] S. Arya, D. Mount and M. Smid, Randomized and deterministic algorithms for geometric spanners of small diameter, Proc. 35th IEEE Symp. Foundations of Comp. Sci. (1994), 703-712. Available online at http://www.cs.umd.edu/~mount/Papers/focs94.ps. [16] T. Asano, B. Bhattacharya, M. Keil and F. Yao, Clustering algorithms based on minimum and maximum spanning trees, Proc. 4th ACM Symp. Comp. Geom. (1988), pp. 252-257. [17] B. Awerbuch, Y. Azar, A. Blum and S. Vempala, Improved approximation guarantees for minimum-weight k-trees and prize-collecting salesmen, Proc. 27th ACM Symp. Theory of Computing (1995), 211-1%Z. Available online at http://www-cgi.cs.cmu.edU/afs/cs.cmu.edu/Web/People/avrim/Papers/prizetsp.ps.Z. [18] A.I. Barvinok, Two algorithmic results for the traveling salesman problem. Manuscript (1994). [19] J. Basch, L.J. Guibas and J. Hershberger, Data structures for mobile data, Proc. 8th ACM-SIAM Symp. Discrete Algorithms (1997), lM-156. [20] J. Basch, L.J. Guibas and L. Zhang, Proximity problems on moving points, Proc. 11th ACM Symp. Comput. Geom. (1997), 344-351. [21] J.L. Bentley and J. Saxe, Decomposable searching problems I: Static-to-dynamic transformation, J. Algorithms 1 (1980), 301-358. [22] M. Bern, H. Edelsbrunner, D. Eppstein, S. Mitchell and T.S. Tan, Edge-insertion for optimal triangulations. Discrete Comput. Geom. 10 (1993), 47-65. [23] M. Bern and D. Eppstein, Mesh generation and optimal triangulation. Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds, World Scientific (1992); 2nd ed. (1995), 47-123. [24] M. Bern and D. Eppstein, Worst-case bounds for subadditive geometric graphs, Proc. 9th ACM Symp. Comp. Geom. (1993), 183-188. [25] M. Bern and D. Eppstein, Approximation algorithms for geometric problems. Approximation algorithms for NP-Hard Problems, D. Hochbaum, ed., PWS Pubhshing (1996), 296-345. [26] M. Bern, D. Eppstein and S.-H. Teng, Parallel construction of quadtrees and quality triangulations, Proc. 3rd Worksh. Algorithms and Data Structures, Springer LNCS 709 (1993), 188-199. [27] A. Blum, P. Chalasani and S. Vempala, A constant-factor approximation for the k-MST problem in the plane, Proc. 27th ACM Symp. Theory of Computing (1995), 294-302. Available online at http://wwwcgi.cs.cmu.edu/afs/cs.cmu.edu/Web/People/avrim/Papers/planarktrees.ps.Z. [28] A. Blum, R. Ravi and S. Vempala, A constant-factor approximation algorithm for the k-MST problem, Proc. 28th ACM Symp. Theory of Computing (1996). [29] H. Bronnimann, Computational Geometry Tribune, No. 3, available online at http://www.inria.fr/prisme/ personnel/bronnimann/cgt/cgt3.ps.Z. [30] L. Cai and D. Cornell, Tree spanners, SIAM J. Discrete Math. 8 (1995), 359-388. [31] P.B. Callahan, The Well-Separated Pair Decomposition and its Applications, PhD thesis, Johns Hopkins U. (1995). Available online at ftp://ftp.cs.jhu.edU/pub/callahan/dissertation.ps.Z. [32] P.B. Callahan and S.R. Kosaraju, A decomposition of multidimensional point sets with applications to k-nearest neighbors and n-body potential fields, J. ACM 42 (1995), 67-90.

458

D. Eppstein

[33] B. Chandra, Constructing sparse spanners for most graphs in higher dimensions. Inform. Process. Lett. 51 (1994), 289-294. [34] B. Chandra, G. Das, G. Narasimhan and J. Soares, New sparseness results on graph spanners, Intemat. J. Comput. Geom. Appl. 5 (1995), 125-144. [35] D.Z. Chen, G. Das and M. Smid, Lower bounds for computing geometric spanners and approximate shortest paths, Proc. 8th Canad. Conf. Comput. Geom., Carleton Univ. Press. (1996), 155-160. [36] D. Cheriton and R.E. Tarjan, Finding minimum spanning trees, SIAM J. Comput. 5 (1976), 310-313. [37] S.Y. Cheung and A. Kumar, Efficient quorumcast routing algorithms, Proc. IEEE Conf. Computer Communications, Vol. 2 (1994), 840-847. [38] S. Cheng and Y. Xu, Approaching the largest ^-skeleton within the minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geom. (1996), 196-203. [39] L.P. Chew, There is a planar graph almost as good as the complete graph, Proc. 2nd ACM Symp. Comp. Geom. (1986), 169-177. [40] L.P. Chew, There are planar graphs almost as good as the complete graph, J. Comput. System. Sci. 39 (1989), 205-219. [41] L.P. Chew and R.L. Drysdale, Voronoi diagrams based on convex distance functions, Proc. 1st ACM Symp. Comp. Geom. (1985), 235-244. [42] N. Christofides, Worst-case analysis of a new heuristic for the traveling salesman problem. Report 388, Grad. Sch. Industrial Admin., Carnegie Mellon U. (1975). [43] C. Chiang, M. Sarrafzadeh and C.K. Wong, A powerful global router based on Steiner min-max trees, Proc. IEEE Int. Conf. CAD (1989), 2-5. [44] G. Das and P.J. Heffeman, Constructing degree-3 spanners with other sparseness properties, Proc. 4th Int. Symp. Algorithms and Computation, Springer LNCS 762 (1993), 11-20. [45] G. Das, P.J. Heffeman and G. Narasimhan, Optimally sparse spanners in ^-dimensional Euclidean space, Proc. 9th ACM Symp. Comp. Geom. (1993), 53-62. [46] G. Das and D. Joseph, Which triangulations approximate the complete graph? Proc. Int. Symp. Optimal Algorithms, Springer LNCS 401 (1989), 168-192. [47] G. Das, S. Kapoor and M. Smid, On the complexity of approximating Euclidean traveling salesman tours and minimum spanning trees, Proc. 16th Conf. Found. Software Tech. and Theor. Comput. Sci., Springer LNCS 1180 (1996), 64-75. [48] G. Das and G. Narasimhan, A fast algorithm for constructing sparse Euclidean spanners, Proc. 10th ACM Symp. Comp. Geom. (1994), 132-139. [49] G. Das, G. Narasimhan and J. Salowe, A new way to weigh malnourisheed Euclidean graphs, Proc. 6th ACM-SIAM Symp. Discrete Algorithms (1995), 215-222. [50] A. Datta, H.-P. Lenhof, C. Schwarz and M. Smid, Static and dynamic algorithms for k-point clustering problems, J. Algorithms 19 (1995), 474-503. [51] O. Devillers, S. Meiser and M. Teillaud, Fully dynamic Delaunay triangulation in logarithmic expected time per operation, Comput. Geom. 2 (1992), 55-80. [52] T. Dey, Improved bounds for k-sets and kth levels. Manuscript (1997). [53] M. Dickerson and M. Montague, A (usually?) connected subgraph of the minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geom. (1996), 204-213. Available online at ftp://ams.sunysb. edu/pub/geometry/msi-workshop/95/dickerso.ps.gz. See also http://www.middlebury.edu/~dickerso/ mwtskel.html. [54] M. Dickerson and M. Montague, The exact minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geom. (1996). [55] D.P Dobkin, S.J. Friedman and K.J. Supowit, Delaunay graphs are almost as good as complete graphs. Discrete Comput Geom. 5 (1990), 399-407. [56] R.L. Drysdale, A practical algorithm for computing the Delaunay triangulation for convex distance functions, Proc. 1st ACM-SIAM Symp. Discrete Algorithms (1990), 159-168. [57] D.-Z. Du and F.K. Hwang, The state of the art in Steiner ratio problems. Computing in Euclidean Geometry, D.-Z. Du and RK. Hwang, eds. World Scientific (1992); 2nd ed. (1995), 195-224. [58] H. Edelsbrunner, L.J. Guibas and J. Stolfi, Optimal point location in a monotone subdivision, SIAM J. Comput. 15 (1986), 317-340.

Spanning trees and spanners

459

[59] H. Edelsbrunner and T.S. Tan, A quadratic time algorithm for the minmax length triangulation, Proc. 32nd IEEE Symp. Foundations of Comp. Sci. (1991), 414-^23. [60] H. Edelsbrunner, T.S. Tan and R. Waupotitsch, A polynomial time algorithm for the minmax angle triangulation, SIAM J. Sci. Statist. Comput. 13 (1992), 994^1008. [61] D. Eppstein, Offline algorithms for dynamic minimum spanning tree problems, J. Algorithms 17 (1994), 237-250. [62] D. Eppstein, Dynamic Euclidean minimum spanning trees and extrema of binary functions. Discrete Comput. Geom. 13 (1995), 237-250. [63] D. Eppstein, Average case analysis of dynamic geometric optimization, Comput. Geom. 6 (1996), 45-68. [64] D. Eppstein, Geometric lower bounds for parametric matroid optimization. Discrete Comput. Geom., to appear. [65] D. Eppstein, Faster geometric k-point MST approximation, Comput. Geom. 8 (1997), 231-240. [66] D. Eppstein, Faster circle packing with application to nonobtuse triangulation, Intemat. J. Comput. Geom. Appl. 7 (5) (1997), 485-491. [67] D. Eppstein, Beta-skeletons have unbounded dilation. Tech. Rep. 96-15, UC Irvine, Dept. Inf. & Comp. Sci. (1996). [68] D. Eppstein and J. Erickson, Iterated nearest neighbors and finding minimal polytopes. Discrete Comput. Geom. 11 (1994), 321-350. [69] D. Eppstein, Z. Galil, G.F. Italiano and A. Nissenzweig, Sparsification - A technique for speeding up dynamic graph algorithms, Proc. 33rd IEEE Symp. Foundations of Comp. Sci. (1992), 60-69. [70] D. Eppstein, G.F. Italiano, R. Tamassia, R.E. Tarjan, J. Westbrook and M. Yung, Maintenance of a minimum spanning forest in a dynamic plane graph, J. Algorithms 13 (1992), 33-54. [71] D. Femandez-Baca, G. Slutski and D. Eppstein, Using sparsification for parametric minimum spanning tree problems, Nordic J. Comput. 3 (1996), 352-366. [72] M. Fredman and D.E. Willard, Trans-dichotomous algorithms for minimum spanning trees and shortest paths, Proc. 31st IEEE Symp. Foundations of Comp. Sci. (1990), 719-725. [73] H.N. Gabow, Z. Galil, T. Spencer and R.E. Tarjan, Efficient algorithms for finding minimum spanning trees in undirected and directed graphs, Combinatorica 6 (1986), 109-122. [74] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman (1979). [75] N. Garg and D.S. Hochbaum, An 0(log k) approximation for the k minimum spanning tree problem in the plane, Proc. 26th ACM Symp. Theory of Computing (1994), 432^38. [76] P.D. Gilbert, New results in planar triangulations. Report R-850, U. Illinois Coordinated Science Lab. (1979). [77] D. Grigoriev, M. Karpinski, F. Meyer auf der Heide and R. Smolensky, A lower bound for randomized algebraic decision trees, Proc. 28th ACM Symp. Theory of Computing (1996), 612-619. [78] L.J. Guibas, D.E. Knuth and M. Sharir, Randomized incremental construction of Delaunay and Voronoi diagrams, Algorithmica 7 (1992), 381^13. [79] D. Gusfield, Bounds for the parametric spanning tree problem, Proc. Humboldt Conf. Graph Th., Combinatorics and Computing, Utilitas Mathematica (1979), 173-183. [80] S. Haruyama and D. Fussell, A new area-efficient power routing algorithm for VLSI layout, Proc. IEEE Int. Conf. CAD (1987), 3 8 ^ 1 . [81] M.R. Henzinger and V. King, Maintaining minimum spanning trees in dynamic graphs. Tech. Rep. DCS251-IR, Univ. of Victoria, Dept. of Computer Science (1997). [82] J.-M. Ho, D.T. Lee, C.-H. Chang and C.K. Wong, Minimum diameter spanning trees and related problems, SIAM J. Comput. 20 (1991), 987-997. [83] M.A.B. Jackson, A. Srinivasan and E.S. Kuh, Clock routing for high-performance IC's, Proc. 27th ACM/IEEE Design Automation Conf. (1990), 573-579. [84] A. Kahng, J. Cong and G. Robins, High-performance clock routing based on recursive geometric matching, Proc. 28th ACM/IEEE Design Automation Conf. (1991), 322-327. [85] D. Karger, P.N. Klein and R.E. Tarjan, A randomized linear-time algorithm to find minimum spanning trees, J. ACM 42 (1995), 321-328. [86] N. Katoh, T. Tokuyama and K. Iwano, On minimum and maximum spanning trees of linearly moving points. Discrete Comput. Geom. 13 (1995), 161-176.

460

D. Eppstein

[87] J.M. Keil, Approximating the complete Euclidean graph, Proc. 1st Scand. Worksh. Algorithm Theory, Springer LNCS 318 (1988), 208-213. [88] J.M. Keil, Computing a subgraph of the minimum weight triangulation, Comput. Geom. 4 (1994), 13-26. [89] J.M. Keil and C.A. Gutwin, The Delaunay triangulation closely approximates the complete Euclidean graph. Discrete Comput. Geom. 7 (1992), 13-28. [90] S. Khuller, B. Raghavachari and N. Young, Low degree spanning trees of small weight, SIAM J. Comput. 25 (1996), 355-368. [91] S. Khuller, B. Raghavachari and N. Young, Balancing minimum spanning trees and shortest-path trees, Algorithmica 14 (1995), 305-321. [92] D. Kirkpatrick, Optimal search in planar subdivision, SIAM J. Comput. 12 (1983), 28-35. [93] G.T. Klincsek, Minimal triangulations of polygonal domains, Ann. Discrete Math. 9 (1980), 121-123. [94] E. Lawler, J.K. Lenstra, A.H.G. Rinnooy Kan and D.B. Shmoys, The Traveling Salesman Problem: A Guided Tour of Combinatorial Optimization, Wiley (1985). [95] C. Levcopoulos, An Q{y/n) lower bound for non-optimality of the greedy triangulation. Inform. Process. Lett. 25 (1987), 247-251. [96] C. Levcopoulos and D. Krznaric, Quasi-greedy triangulations approximating the minimum weight triangulation, Proc. 7th ACM-SIAM Symp. Discrete Algorithms (1996), 392-401. [97] C. Levcopoulos and A. Lingas, On approximation behavior of the greedy triangulation for convex polygons, Algorithmica 2 (1987), 175-193. [98] C. Levcopoulos and A. Lingas, There are planar graphs almost as good as the complete graphs and as short as minimum spanning trees, Proc. Int. Symp. Optimal Algorithms, Springer LNCS 401 (1989), 9-13. [99] R.J. Lipton and R.E. Tarjan, Applications of a planar separator theorem, SIAM J. Comput. 9 (1980), 615-627. [100] E.L. Lloyd, On triangulations of a set ofpoints in the plane, Proc. 18th IEEE Symp. Foundations of Comp. Sci. (1977), 228-240. [101] G.K. Manacher and A.L. Zobrist, Neither the greedy nor the Delaunay triangulation approximates the optimum. Inform. Process. Lett. 9 (1979), 31-34. [102] C.S. Mata and J.S.B. Mitchell, Approximation algorithms for geometric tour and network design problems, Proc. 11th ACM Symp. Comp. Geom. (1995), 360-369. [103] D. McCallum and D. Avis, A linear algorithm for finding the convex hull of a simple polygon, Inform. Process. Lett. 9 (1979), 201-206. [104] K. Mehlhom, S. Meiser and C. O'Dunlaing, On the construction of abstract Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 211-224. [105] J.S.B. Mitchell, Guillotine subdivisions approximate polygonal subdivisions: A simple new method for the geometric k-MSTproblem, Proc. 7th ACM-SIAM Symp. Discrete Algorithms (1996), 402-408. [106] C. Monma, M. Paterson, S. Suri and F. Yao, Computing Euclidean maximum spanning trees, Algorithmica 5 (1990), 407^19. [107] C. Monma and S. Suri, Transitions in geometric spanning trees. Discrete Comput. Geom. 8 (1992), 265293. [108] K. Mulmuley, Randomized multidimensional search trees: Dynamic sampling, Proc. 7th ACM Symp. Comp. Geom. (1991), 121-131. [109] C. O'Dunlaing and C.K. Yap, A "retraction" method for planning the motion of a disc, J. Algorithms 6 (1985), 104-111. [110] S. Olariu, S. Toida and M. Zubair, On a conjecture by Plaisted and Hong, J. Algorithms 9 (1988), 597-598. [ I l l ] C.H. Papadimitriou and U. V. Vazirani, On two geometric problems related to the traveling salesman problem, J. Algorithms 5 (1984), 231-246. [112] D.A. Plaisted and J. Hong, A heuristic triangulation algorithm, J. Algorithms 8 (1987), 405^37. [113] R. Ravi, R. Sundaram, M.V. Marathe, D.J. Rosenkrantz and S.S. Ravi, Spanning trees short and small, Proc. 5th ACM-SIAM Symp. Discrete Algorithms (1994), 546-555. [114] G. Robins and J.S. Salowe, Low-degree minimum spanning trees. Discrete Comput. Geom. 14 (1995), 151-165. [115] J. Ruppert and R. Seidel, Approximating the d-dimensional complete Euclidean graph, 3rd Canad. Conf. Comp. Geom. (1991), 207-210.

Spanning trees and spanners

461

[116] J.S. Salowe, Constructing multidimensional spanner graphs, Intemat. J. Comput. Geom. Appl. 1 (1991), 99-107. [117] J.S. Salowe, Euclidean spanner graphs with degree four. Discrete Appl. Math. 54 (1994), 55-66. [118] J.S. Salowe, D.S. Richards and D.E. Wrege, Mixed spanning trees: A technique for performance-driven routing, Proc. 3rd Great Lakes Symp. VLSI Design Automation of High Performance VLSI Systems, IEEE (1993), 62-66. [119] N. Samak and R.E. Tarjan, Planar point location using persistent search trees, Comm. ACM 29 (1986), 669-679. [120] O. Schwarzkopf, Dynamic maintenance of geometric structures made easy, Proc. 32nd IEEE Symp. Foundations of Comp. Sci. (1991), 197-206. [121] Sedgewick and J. Vitter, Shortest paths in Euclidean graphs, Algorithmica 1 (1986), 31-48. [122] M.L Shamos and D. Hoey, Closest-point problems, Proc. 16th IEEE Symp. Foundations of Comp. Sci. (1975), 151-162. [123] N. Sherwani, Algorithms for VLSI Physical Design Automation, Kluwer (1993). [124] D.D. Sleator and R.E. Tarjan, A data structure for dynamic trees, J. Comput. System. Sci. 24 (1983), 362-381. [125] J.M. Steel and T.L. Snyder, Worst-case growth rates of some classical problems of combinatorial optimization, SIAM J. Comput. 18 (1989), 278-287. [126] H. Tamaki and T. Tokuyama, How to cut pseudo-parabolas into segments, Proc. 11th ACM Symp. Comput. Geom. (1995), 230-237. [127] R. Tsay, Exact zero skew, Proc. IEEE Int. Conf. CAD (1991), 336-339. [128] P.M. Vaidya, Minimum spanning trees in k-dimensional space, SIAM J. Comput. 17 (1988), 572-582. [129] P.M. Vaidya, A sparse graph almost as good as the complete graph on points in K dimensions. Discrete Comput. Geom. 6 (1991), 369-381. [130] B.-T. Yang, A better subgraph of the minimum weight triangulation. Inform. Process. Lett. 56 (1995), 255-258. [131] B.-T. Yang, Y.-F. Xu and Z.-Y You, A chain decomposition algorithm for the proof of a property on minimum weight triangulations, Proc. Int. Symp. Algorithms and Computation, Springer LNCS 834 (1994), 423-427. [132] A.C. Yao, On constructing minimum spanning trees in k-dimensional space and related problems, SIAM J. Comput. 11 (1982), 721-736. [133] A.A. Zelikovsky and D.D. Lozevanu, Minimal and bounded trees, Proc. Tezele Cong. XVIII Acad. Romano-Americane, Kishinev (1993) 25-26.

CHAPTER 10

Geometric Data Structures Michael T. Goodrich* Center for Geometric Computing, Department of Computer Science, Johns Hopkins University, Baltimore, MD 21218 E-mail: goodrich@cs.jhu.edu

Kumar Ramaiyer^ Informix Software, Inc., 1111, Broadway, Suite 2000, Oakland, CA 94607 E-mail: rk@ Informix, com

Contents 1. Introduction 1.1. Problem classification and goals 1.2. Chapter outline 2. Embedded planar graphs 2.1. The Doubly Connected Edge List (DCEL) 2.2. The winged-edge representation 2.3. The quad-edge representation 2.4. Well known PSLGs 3. Planar point location and ray shooting 3.1. The slab method 3.2. The trapezoid method 3.3. The chain method 3.4. Improving the chain method via fractional cascading 4. Dynamic point location 4.1. The inter-laced trees technique 5. Convex hulls and convex polytopes 5.1. J-dimensional representations 5.2. 2-dimensional dynamic maintenance 5.3. 3-dimensional subdivision hierarchies

465 465 466 466 467 468 469 469 471 471 473 474 475 480 481 482 482 483 483

*This research supported by the NSF under Grant CCR-9625289, and by ARC under grant DAAH04-96-1-0013. Author's homepage: h t t p : //www. c s . j h u . e d u / g o o d r i c h / . ^This research supported by the NSF under Grant CCR-9300079, and by ARC under grant DAAH04-96-1-0013. Author's homepage: h t t p : //www. c s . j h u . e d u / g r a d / k u m a r / . HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved

463

464

M T. Goodrich and K. Ramaiyer

6. Rectilinear data structures 6.1. k-D trees and quadtrees 6.2. Segment trees 6.3. Range trees 7. General techniques 7.1. Fractional cascading 7.2. Persistence 7.3. Static to dynamic conversions 7.4. Internal-memory to external-memory conversions References

484 484 485 485 485 486 486 486 487 487

Geometric data structures

465

1. Introduction Computational geometry problems often require preprocessing geometric objects into a simple and space-efficient structure so that the operations on the geometric objects can be performed repeatedly in an efficient manner. We refer to this as the "geometric data structuring" approach. This approach has been widely used by several researchers to design very elegant data structures to solve a number of geometry problems [15,22,26,32,36,4345,56,63]. Classic data structures hke lists, trees, and graphs are by themselves not sufficient to represent geometric objects as either they are generally one dimensional in nature or do not capture the rich structural properties of the geometric objects in the domain. For example, in a planar subdivision the clockwise and counter-clockwise orderings of edges around a vertex are often useful for solving many problems involving subdivisions (e.g, see Guibas and Stolfi [41]). Similarly, facial ordering and connectivity information of subdivisions is often needed and requires special representation. If one is given a collection of horizontal segments in M^, for example, one may like to represent the endpoints, and also some representation of the "aboveness" partial order (e.g., see Edesbrunner [34]). Higher dimensional geometric objects define even richer relationships and likewise cannot be easily represented by the classical data structures, and require careful study. Even with this short list of examples one can see that geometric data requires the representation of relationships that cannot be represented using strictly numeric or combinatoric data structures. Indeed, it is the interplay of numeric and combinatoric data that makes the design of efficient geometric data structures an interesting and challenging research domain.

1.1. Problem classification and goals Data structuring problems involving geometric objects vary and are often classified as follows: Static: In this case all the geometric objects in the problem domain are given as part of the input. Online: In this case new geometric objects are allowed to be added to the problem domain, but cannot be deleted. Dynamic: In this most general case new geometric objects are allowed to be added and some existing objects are allowed to be deleted from the problem domain. In addition, data structures used for storing geometric objects should ideally achieve all of the following goals: • • • • •

capture structural information, allow for efficient query processing, allow for efficient updates, optimize the space required, and store objects efficiently so as to minimize the number of I/O accesses, when the input size is very large.

466

M. T. Goodrich and K. Ramaiyer

1.2. Chapter outline In this chapter we review and highUght research on geometric data structures, describing important examples for each of the above problem classifications. In each case we review we sketch how well it achieves the basic goals of geometric data structure design. In the next section, we describe methods for representing embedded straight line graphs, which arise in a number of computational geometry contexts, including the construction and maintenance of fundamental geometric structures, including convex hulls, Voronoi diagrams, Delaunay triangulations, and arrangements. In Section 3, we review several methods for performing an important search operation in such subdivisions — the point location search, and we give a short review of dynamic methods for solving this problem in Section 4. In Section 5, we discuss some methods for representing convexity, and, in Section 6, we describe some data structures for representing data that is rectilinear (i.e., aligned with the coordinate axes). Finally, in Section 7, we discuss some general techniques for designing geometric data structures. Since geometric data structures are fundamental in the design and implementation of geometric computations, there are necessarily a number of interesting geometric data structures that we will not be discussing in this chapter. Fortunately, many of these are covered in other chapters of this Handbook [60]. In particular, a number of spatial and rectilinear structures for higher-dimensional spaces are discussed in Chapter 17. In addition, general techniques for designing randomized geometric data structures are covered in Chapters 13 and 16. Data structures for shortest paths and ray shooting are discussed in Chapters 15 and 12. In addition, the important and related visibility graph structure is discussed in Chapter 22. Other visibility related questions are covered in Chapter 19. An interesting variation of the data structuring problem is covered in Chapters 15 and 20, where one is allowed to answer queries approximately. There are also a host of interesting data structures that are based upon ^-nets and spanning trees with low stabbing numbers, which are topics covered in Chapters 1, 2, and 13. Finally, fundamental to the issue of geometric representations is the issue of numeric stability, which is covered in Chapter 14. We highlight in the following sections various geometric data structures and we also discern some of the general principles behind data structure design for geometric structures.

2. Embedded planar graphs A graph G = (V, £") is said to be embedded in a surface S when it is drawn on S so that no two edges intersect. A graph i^ planar if it can be embedded in the plane; di plane graph has already been embedded in the plane [42], in which case it makes sense to define the set F of faces of G. A planar graph can always be embedded in the plane so that all its edges are straight-line segments [37] and such an embedded graph is called planar straight line graph (PSLG). The planar graphs play an important role in many two-dimensional computational geometry problems, for an embedded planar graph represents a planar subdivision, which is a structure that arises in several useful applications, including include arrangements of lines, Voronoi diagrams, Delaunay triangulations, and general triangulations.

Geometric data

structures

467

A measure of the usefulness of an embedded graph representation is that such a representation should allow for efficient traversal of edges around a vertex (in clockwise and counter-clockwise directions), and it should allow for the efficient access of all edges bounding a face and all the faces incident on a vertex. In addition, it is very important for such a representation to preserve the topology of the embedding of the planar graph, as a given planar graph may have several embeddings. Once the embedding of a planar graph is given in the form of a planar straight line graph, one of the simplest representation is to represent the graph as a collection of simple polygons. This representation is not flexible enough for traversal, however. Representations for embedded planar graphs that do allow for efficient traversals include the doubly connected edge list or DCEL [57], the winged-edge structure [3], and the quad-edge structure [41]. Let us therefore review each of these representations.

2.1. The Doubly Connected Edge List (DCEL) Muller and Preparata [50,57] designed a PSLG representation, which they called the doubly-connected edge hst (or DCEL). The DCEL for a PSLG G = (V, E, F) has a collection of edge nodes. This representation treats each edge as a directed edge; hence, it imposes an orientation on each edge. Each edge node e = (va, vt) is a structure consisting of six fields: • Vo, representing the origin vertex (u^), • Vj, representing the destination vertex {vh), • Fu representing the left face as we traverse on e from VQ to Vj, • Fr, representing the right face as we traverse on e from Vo to Vj, • CCWo, representing the counter-clockwise successor of e around Vo, and • CCWd, representing the counter-clockwise successor of e around V^. The Figure 1 shows the DCEL representation of the edge e\ in the subdivision given. From the DCEL representation in linear time one can easily extract the edges around faces (in clockwise-order) and the edges around a vertex (in counter-clockwise order). To

Vo Vd

Fi

F,

^1

n

^2

fl

fl

^2

^3

^1

fl

/o

^3

V4

^2

h

/o

CCWoCCWd ^2

Fig. 1. A DCEL representation of an embedded planar graph.

^3

468

M.T. Goodrich and K. Ramaiyer

get the other ordering information efficiently, however, one needs to dupHcate the edges of the PSLG with opposite orientations from their original orientations and store a DCEL for this orientation as well. Once edges are duplicated and oriented in the opposite direction, one can access the edges bounding a face in counter-clockwise direction and edges around a vertex in clockwise direction in linear time. The total size of the DCEL representation is 0{\V\^\F\ + \E\).

2.2. The winged-edge representation The winged-edge representation was proposed by Baumgart [3] and is similar to the DCEL. Given a PSLG G = (V, E, F), the winged-edge representation stores an array for the vertices. This array stores for each vertex an arbitrary edge incident on that vertex. The winged-edge representation also stores an array for faces, which stores for each face an arbitrary edge bounding that face. For each edge e = (va, Vb) it stores the following information: • Vo, representing the origin vertex (Va), • Vj, representing the destination vertex (vt,), • F/, representing the left face as seen from Vo to Vd, • Fr, representing the right face as seen from Vo to Vd, • CWo, representing the clockwise successor of e around Vo, • CCWo, representing the counter-clockwise successor of e around Vo, • CWd, representing the clockwise successor of e around Vd, and • CCWd, representing the counter-clockwise successor of e around Vd. Thus four successor edges are stored for each edge. This allows one to do all the accesses we outUned earlier as efficiently as in a (double-orientation) DCEL. Figure 2 shows the winged-edge representation for a PSLG. The total storage needed for the winged-edge is 0 ( | y I + | F | + l^l), but the constant factor is sUghtly better than for a double-orientation DCEL.

VQ Vd F| F, CCWpCCWd CWQ CW^ ^1

V2

/2

/l

V3

V\

/2

/o

V4

V2

/l

/o

.

^2

^3

€4

^5

Fig. 2. A winged-edge representation of an embedded planar graph.

Geometric data

structures

469

Fig. 3. A quad-edge representation of an embedded planar graph. The graph and the representation are shown. The thick edges are the edges of the graph and the gray-dotted edges are the edges of the dual graph.

2.3. The quad-edge representation Guibas and Stolfi [41] proposed the quad-edge representation for the embedded planar graphs. Their structure is isomorphic to the winged-edge structure, but it is given semantics general enough to represent an undirected graph embedded in an arbitrary two-dimensional manifold. Their structure also simultaneously represents the graph-theoretic primal and the dual of a planar graph. Figure 3 shows an example representation. The total space required for the quad-edge structure is 0 ( | y | -f \F\ + l^"!), with the constants being essentially the same is for the winged-edge representation.

2.4. Well known PSLGs As a motivation for the use of these subdivision representation, let us briefly review some of the well-known geometric structures that are special cases of PSLGs. These structures are treated in greater detail in other chapters of this Handbook. Line arrangements. Given a set of lines in the plane, the intersection of lines form a structure that is referred to as the arrangement. This structure is a planar subdivision. This is a very useful structure and has number of applications. Since any two non-parallel lines intersect, if the given set of n lines does not contain any pair of parallel lines, then the number of intersections is 0(n^) and hence the size of arrangement is 0(n^). There are algorithms for computing the arrangement of lines in 0(n^) time, which is of course optimal. Figure 4 shows an example arrangement of lines. The arrangement is a PSLG and can be represented using one of the data structures discussed in the previous section.

470

M. T. Goodrich and K. Ramaiyer

Fig. 4. Arrangements of lines in a plane.

Fig. 5. The Voronoi diagram and Delaunay triangulation of a point set. The thick edges represent the triangulation and the thin edges represent the Voronoi diagram.

Voronoi diagrams and Delaunay triangulations. Given a collection of points and a metric, say L2, one can define a geometric structure called the Voronoi diagram. This is a very useful geometric structure for answering number of useful questions one can ask about a collection of points, including closest pairs and nearest neighbors. The Voronoi diagram for a set of points is a PSLG. Each face in the graph contains an unique point from the given set. Each face is a locus of points in the plane which are closer to the point inside it, than to any other point in the given set. A related structure, the Delaunay triangulation, is the graph-theoretic planar dual of the Voronoi diagram in which the faces and vertices are interchanged while preserving the incidence relationships (which forms a triangulation if the original points are in general position). Figure 5 shows a Voronoi diagram. Both the Delaunay triangulation and the Voronoi diagram have a wide variety of uses; and they are PSLG's. We can therefore use

Geometric data structures

All

one of the above representations (DCEL, quad-edge, or winged-edge) to store Voronoi diagrams and Delaunay triangulations. Interestingly, the quad-edge representation has the added advantage of being able to simultaneously represent both the Voronoi diagram and the Delaunay triangulation of a point set using a single representation. In the next section we study how to perform searches like point location or ray shooting in PSLG structures such as arrangements and Voronoi diagrams.

3. Planar point location and ray shooting The planar point location problem is one of the fundamental computational geometry problems and has several applications. This problem has been studied by several researchers [22,31,32,36,44,45,56,63], and there are a number of efficient solutions. The problem in its widely studied form is stated as follows: Given a planar subdivision in the form of a PSLG (using one of the representations discussed in the previous section), preprocess the subdivision and store it in a data structure so as to answer queries of the form "given a query point p find the face of the subdivision containing p'\ This query is typically answered by performing a vertical ray shooting query from /?, where one determines the first segment(s) in the PSLG hit by vertical rays emanating out of p. The important criteria for judging solutions to the point location problem are the space occupied by the data structure and the query time it allows. The preprocessing time is also an important criterion, but is generally not considered as critical as the others, since it amounts to a one-time cost. Variations of the problem as stated above include methods for special types of subdivision i.e., introducing constraints on the shapes of the faces of the subdivision and the connectivity of the underlying planar graph. Different subdivisions that have been studied over the years include general subdivisions (which may not even be connected), connected subdivisions, monotone and convex subdivisions (where each face is respectively a monotone polygon or convex polygon), and rectilinear subdivisions (where only horizontal and vertical edges are used). We outline below the various data structures used for solving the point location problem.

3.1. The slab method The "slab" method proposed by Dobkin and Lipton [31] is historically the first non-trivial method to solve the point location problem, and it is suitable for the most general types of subdivisions. The idea is very simple. Since general subdivisions can be of an arbitrary nature, their basic idea is to partition the subdivision into a collection of vertical slabs so that each slab contains only triangles and trapezoids. The partition is done as follows: one draws vertical lines through each of the vertices of the subdivision. This partitions the subdivision into 0(n) slabs. The slabs have the property

472

M.T. Goodrich andK.

Ramaiyer

Fig. 6. The slab method: Partitioning the subdivision into vertical slabs consisting of trapezoids.

that none of the edges inside the slab cross each other and the edges either cross the vertical boundaries of the slab or two or more edges meet at a vertex through which the vertical boundary Hne of the slab passes through. Thus, each slab contains a collection of triangles and trapezoids with vertical boundaries. Dobkin and Lipton store this collection of slabs in a data structure to perform point location as follows: the slabs are totally ordered left-to-right by the JC-coordinates of the vertices and hence can be stored using any balanced binary search tree structure. Call this search tree A. The edges within each slab are totally ordered by the "above" relationship, i.e., given a point and the supporting Hne of an edge inside the slab, one can find out whether the point is above or below the edge. ^ This total order relationship (in each slab) can also be stored using a balanced binary search tree. Let us call the collection of search trees for all the slabs as B. The point location is done as follows: given a query point /? = (XQ, yo), we first use the x-coordinate of p, i.e., JCQ to identify the slab in which the point lies by doing a binary search in A. Once the slab is identified, the corresponding binary tree in B storing the trapezoids within the slab is searched by performing "aboveness" comparisons. Summary: Space: Since 0{n) binary search trees (each of size 0(«)) need to be stored in B, the total space requirement is 0(«^). Query Time: To locate a point we need to perform two binary searches, and hence the query time complexity is O(logn). This is the unit-time operation that is used in the complexity measure. This operation can be implemented either by checking the point against the equation of the supporting hne or by checking whether the vertices of the edge e = {v\, V2) and the query point v^, make a "left turn" or "right turn" in the order f 1, 1*2, and 1^3.

Geometric data

structures

Al?>

3.2. The trapezoid method The slab method was improved by Preparata [56] to achieve an 0(log n) query time method with only 0(n logn) space. His method is commonly referred to as the trapezoid method, and is in principle the same as slab method as it also partitions the subdivisions into simple trapezoids. But rather than drawing 0(n) vertical lines, a recursive structure is built. The method for constructing a point location data structure using the trapezoid method is as follows. One inductively assumes one is given a trapezoid r with vertical sides containing the subdivision (initially we can use a bounding rectangle). Identify in r the "spanning" edges i.e., the edges which intersect both the vertical boundaries of r. If there are no spanning edges, then partition r again vertically at the median vertex and recurse on each side. If there are spanning edges, then partition the slab into a number of trapezoids using the spanning edges, i.e., each trapezoid has a spanning edge as its top and bottom boundaries and the vertical boundaries of the slab as its two side boundaries. Then order these trapezoids by the "above" relationship discussed in the previous section and recursively partition each such non-trivial trapezoid. Thus, one recursively partitions the subdivision, first vertically and then using the spanning edges. The vertical cuts are global and can be organized using a single binary search tree. The trapezoids within a container trapezoid r are organized using a biased search tree [4] which has the property that the depth of an item / with weight wi is 0(log W/wi), where W is the sum of the weights of all the items in the tree. Each trapezoid is assigned a weight proportional to the number of vertices within the trapezoid. Hence the resulting structure storing the subdivision is a compound structure in which the primary tree is a balanced binary search tree organizing the vertical cuts and the secondary structure is a

'

1

I

I

I

1 1 1 1

'

1

I

I

I

I I

1 1

till >

1

1

> 1

i ,

I 1 1 1 i 1 1 / , . . . , , . _

1

1

1

1 1 1

Fig. 7. Trapezoid method: The vertical cuts are shown in the tree as triangular nodes and the spanning cuts are shown as circular nodes.

474

M. T. Goodrich and K. Ramaiyer

biased search tree storing the trapezoids. The Figure 7 shows an example subdivision and the resulting data structure. The worst-case depth of a leaf node u in this compound structure is calculated as follows: the depth in the primary structure is O(logn), since vertical cuts are always at median X-coordinates. Suppose the depths in the different levels of secondary structures from the leaf u (weight of w = Wo = 1) to the root are 0(log Wi/Wo),0(log W2/W1),..., 0(log W/Wjt). These values form a telescoping sum that reduces to 0(log W). But the total weight W at the root is 0{n \ogn)\ hence, the worst-case depth of a leaf node in the compound structure is O(logn). Summary: Space: 0{n\ogn) as there are O(logn) levels and in each level, structures of total size 0(M) are stored. Query Time: To locate a point we need to perform alternate binary searches in the primary tree and the second tree. As argued above this is bounded by O(logn).

3.3. The chain method Lee and Preparata [45] introduced an alternative approach. Unlike the slab method and the trapezoid method, which partition the subdivision into trapezoids, their method partitions the subdivision into regions separated by "chains". A chain is a sequence of edges that either forms a cycle or a path such that the end vertices belong to the boundary of the unbounded region. This way the chain, whether it is a cycle or a path, partitions the subdivision into two parts. The method then is to first find a ^'median" chain so as to partition the subdivision into roughly two equal parts. Then recursively one finds chains in each of the subdivision to construct a "balanced tree" of chains. The point location method then proceeds by discriminating the point against the chain at the root to find the partition containing the point and then recurses at the appropriate child in the tree. The important work involved in searching such a data structure is therefore the discrimination of a point against a chain. It is easy to see that discrimination of a point against a general chain is as difficult as point location in a simple polygon and hence is not really any simpler. So Lee and Preparata restricted each chain to be monotone, thus restricting their method to monotone subdivisions (which really is not a big restriction, since we can convert a general subdivision to a monotone subdivision by a vertical decomposition construction). For any monotone chain there exists a straight line such that the line orthogonal to the line intersects the chain at most once, and this property can be exploited for point location. The Figure 8 shows the partition of a subdivision into monotone chains. The edges are shared by different chains, but the data structure stores only one copy of each edge. Lee and Preparata's point location data structure is a compound data structure that has as its primary data structure a binary tree with a separating chain associated with each vertex and the secondary data structure storing the description of each chain. The primary and secondary data structure are both balanced binary search trees, actually. During a point

Geometric data structures

475

Fig. 8. Chain method: Partition of the subdivision into monotone chains (with respect to j-axis).

location discrimination of a point versus a monotone chain is done using the description of the chain in the secondary data structure. The discrimination of point versus monotone chain (say with respect to vertical line) is done in the obvious way. The projection of y-coordinates of the vertices of the chain on the vertical line partition the line into intervals which enables a binary search and the query point is located within one of the intervals (so that the point can then be compared with the straight line supporting the edge corresponding to the interval to find out which side of the chain the point lies in). Thus, each chain discrimination can be done in O(logn) time. Summary: Space: Each edge belongs potentially to more than one chain. But by storing each edge to the highest chain in the primary data structure to which the edge belongs, the space required for the data structure can be made to be 0(f2). Query Time: The discrimination of a point with respect to a monotone chain takes O(logfz), and the depth of the primary data structure is O(logn). Thus, point location takes 0(log^ n) time using the chain method.

3.4. Improving the chain method via fractional cascading Edelsbrunner, Guibas, and Stolfi [36] propose an improvement to the chain method using a technique called fractional cascading. This technique is applicable in any general situation where there are repeated similar searches along the nodes of a path in a directed graph in which the degree of each node is bounded by constant and the set of items searched in each node are drawn from the same universe. Under these conditions one can do better than performing several independent binary searches. The list stored in each node of the graph is augmented with extra elements from the lists in the successors so as to correlate the searches in a node and its successors. We now describe the fractional cascading technique and show how to improve the chain method. In chain method, a sequence (0(logn)) of point-versus-monotone chain discriminations are performed. In each such discrimination, a search is performed using the same query point, but against different chains. Moreover, the set of _y-coordinates of the vertices of the edges against with the comparison is made is a fixed set i.e., the y-coordinates of

476

M. T. Goodrich and K. Ramaiyer

the vertices of the subdivision. Hence the conditions are favorable to apply the fractional cascading technique. In order to be concrete let us therefore review in detail how the fractional cascading technique can be applied in this case. Consider a node u in the primary structure with children i; and w. Let Cu,Cv, and Cw be the chain lists in the nodes w, v, and w respectively before augmentation. The problem is to compute appropriate augmented lists Tu,Ty, and Ty^ Stored in the nodes w, i>, and w respectively. We perform this augmentation bottom up. Assume Ty and T^j are already constructed. For an appropriate constant d {d = 4 works, for example), we select every d-th element from Ty and Tyj, respectively, and copy the elements to the list Cu to form the augmented list Tu. These copied elements are referred to as bridge elements in Tu. Moreover each element / in Tu stores additional pointers as follows: Left Bridge (Pi): Pointer to the closest bridge element (not to the left of /) copied from left child. Right Bridge (Pr)'- Pointer to the closest bridge element (not to the left of /) copied from right child. Proper (Pp): Pointer to the closest element from Cu not to the left of /. Predecessor: Pointer to the predecessor element in Tu. Bridge (P/?): Pointer to the corresponding element in Ty or Tuj (only for elements copied into Cu). The distance between two bridge elements in Tu is at most d. To perform the search, we first do a binary search using the the given query point in the list stored in the root to identify which child to search. Suppose we need to search the left child. We then follow the Left Bridge pointer of the successor element of the query point in the T list of root. From the Left Bridge we follow the Bridge pointer to the T list of the left child. We then use the Predecessor pointers to find the two elements in the T list of left child which encompass the given query point. We select the successor and then use the Proper pointer to identify the element in the C list so as to perform comparisons for branching to next level. The Figure 9 shows an example where the list at a parent node is augmented with elements from the lists in two children. Every fourth element is copied from the child to the parent. For sake of exposition, we use lists of integers. The total number of pointers traversed for crossing one level is J + 3 pointers i.e., one Left Branch pointer, one Bridge pointer, at most d Predecessor pointers, and one Proper pointer. Initial search takes O(logw) time and the subsequence searches together take 0(d\ogn) time. If d is chosen as constant, then the total search time is O(logn). Summary: Space: Edelsbrunner, Guibas, and Stolfi [36] show the total space requirement is 0(n) for an appropriate constant value of d. Query Time: O(logn), as argued above. The preprocessing time is 0(n logn).

Geometric data

3 7 10 12 13 17 25 33 34 35

structures

All

W \ 1 2 5 9 15 18 19 22 28 30 31

Fig. 9. Fractional cascading: Augmentation of list in a parent node with elements from the lists in two children. The left bridge and right bridge pointers for element 20 are shown. Similarly the proper pointer for element 9 is shown. Also the bridge pointers are shown.

Subdivision hierarchies. Historically, the method of Edelsbrunner, Guibas, and Stolfi is not the first to simultaneously achieve O(^) space and an O(logn) query time. Kirkpatrick [44] discovered earlier an elegant method, based upon a technique we call the subdivision hierarchy method, for performing point location. This method is also applicable for searching in higher-dimensional structures and is even amenable to parallelization [2325]. The method requires that the subdivision is triangulated and also that the outer face is a triangle. The triangulation, however, can be done in linear time using Chazelle's method [14] if the original subdivision is connected. The method then proceeds as follows: 1. Identify a maximal independent set in the PSLG representing the subdivision using a greedy heuristic with the condition that the degree of vertices in the independent set is bounded by a constant c. Also the independent set should not include any vertices of the outer face. 2. Remove the vertices of the independent set and the edges attached to them. Retriangulate each of the star polygons which contain the vertices of the independent set. 3. Repeat the process until only the outer face remains. The Figure 10 shows the process of removal of independent set of vertices and retriangulation for an example subdivision. Now the point location data structure is constructed as follows: We have a layered directed acyclic graph in which one layer represents an intermediate triangulation of the subdivision in the above recursive process. We assign one node of the dag to each triangle. After removing the independent set and retriangulating, some of the triangles are destroyed and new triangles are introduced inside each star polygon. We introduce a node for each new triangle and introduce pointers from the node representing the new triangle to all the nodes representing the triangles which are destroyed within the star polygon. In the limiting case we have one node representing the outer face and three nodes representing the

478

M. T. Goodrich and K. Ramaiyer

Fig. 10. A subdivision hierarchy: The figure shows removal of independent set and retriangulation. The independent set vertices selected at a step are shown as hollow circles.

Fig. 11. A subdivision hierarchy: Organizing triangles in a dag for searching. The last three levels of a hierarchy are shown.

three triangles destroyed in the previous step. The resulting data structure thus is a layered dag as shown in the Figure 11. Kirkpatrick shows that in the layered dag: • The degree of each node is constant, and • A fraction of the vertices are removed at each step. Hence the total depth of the dag is O(log^i). This follows from a theorem in graph theory which states that there are "large" independent sets of constant degree vertices in a planar graph, which allows one to find maximal independent sets of size which is a fraction of the current number of vertices. The point location algorithm proceeds by first locating the point inside the outer triangle.

Geometric data structures

479

480

M T. Goodrich and K. Ramaiyer

Summary: Space: The space occupied by the persistent structure is 0(n), since there are 0{n) updates and each requires 0(1) amortized space. Query Time: O(logn), as mentioned above.

4. Dynamic point location An important variant of the point location problem is to allow for environments that request incremental updates to the subdivision. In this variant one studies how to best reflect the changes to the subdivision (e.g., deletion and insertion of edges or vertices) in the data structure storing the subdivision. The goal, of course, is to continue to efficiently support point location queries while also also performing updates in an efficient manner. In addition, the space required by the data structure should be kept as small as possible. In this section we review some dynamic data structures used for performing dynamic planar point location, where edges are allowed to be inserted or deleted from a subdivision. The goal here is to efficiently maintain the data structure under the update operations and allow for fast point location queries. The basic problems in performing updates are the following: 1. Propagation of new information or modification of old information efficiently. Suppose one is deleting an edge. If the edge is represented in several nodes of the data structure, then one needs to remove that information from all the nodes. For example in the slab method, if an edge spans multiple slabs, then one needs to remove that information from each of the binary trees storing that edge. A reverse problem occurs when such a long edge is inserted into the subdivision. 2. Restructuring of the data structure to maintain the invariants assumed by the algorithm. For example in the trapezoid method, we have the invariant that each node represents a trapezoid and adjacent nodes are separated by a "spanning edge". Suppose a spanning edge is deleted. Then the two adjacent trapezoids (which are represented as two different nodes) must now be collapsed into a single trapezoid and represented by a single node. Similarly if a new spanning edge is inserted, then the corresponding node must be split into two different nodes. 3. Dynamization of the techniques (fractional cascading, persistence, etc.) used to achieve good space bounds. Preparata and Tamassia [59] present a method for dynamic point location in a convex subdivision. They construct the data structure by dynamizing the structure used in the static trapezoid method. They put a restriction that the vertices lie on a fixed set of A^ horizontal lines, however. The data structure in this case uses space O(NlogN). Still, they achieve an impressive time of 0(logn + log A^) for queries and an update time of 0(\ognlogN). The data structure consists of a primary component that is any balanced binary search tree and the secondary component that is a biased binary search trees [4]. Preparata and Tamassia [58] also dynamized the chain-method for performing point location on a monotone subdivision. They construct a data structure that allows for insertion and deletion of vertices, insertion and deletion of monotone chain of edges, and

Geometric data structures

481

point location queries. The update operation is required to leave the subdivision monotone. They achieve an 0(\o^ n) query time, O(logn) time for inserting or deleting a vertex, and 0(log^ n -\-k) time for inserting or deleting a monotone chain of k edges. The space requirement is 0(n). Chiang and Tamassia [21] later improved the above results for dynamic point location in a monotone subdivision. They further dynamized the trapezoid method to achieve 0(log«) time for queries and 0(log^ n) time for updates. The space required for the data structure is 0{n logn). Their data structure is a compound structure with the primary component being a BB[Qf] tree [10,48,51] and the secondary component being biased binary search trees [4]. Mehlhorn and Naher [49] dynamize fractional cascading to support insertions and deletions in O(loglogn) amortized time and queries in Oilogn + /: log logn), where k is the length of the path traversed. Hence their dynamization adds a 0(log logn) overhead to the static method. Dietz and Raman [27] improve the update time from amortized to worstcase. Cheng and Janardan [18] present methods for dynamic point location for any connected subdivision. They have two schemes. In one scheme, they achieve an 0(log^ n) query time, O(logn) time for insertion and deletion of vertices, and 0{k\og{n + k)) and O(^logn) times for insertion and deletion, respectively, of an arbitrary ^-edge chain inside a region. The space requirement is 0(n). In their other scheme they speedup the insertion and deletion of ^-edge monotone chain to 0(log^n log logn + k), but increase the other bounds slightly. Their general approach is based on the a new search strategy using priority search trees [47] taken together with the technique of dynamization as proposed by Willard and Lueker [46,66] and Overmars [53]. The main idea of this technique is that rather than updating the data structure immediately with each update request they perform only local updates and spread the restructuring over a sequence of future operations. They perform global rebuilding of the entire data structure periodically so that the structure does not go out balance too much. They also make use of BB[Qf] trees. Goodrich and Tamassia [38] present a method for dynamic method for point location in monotone subdivisions. They improve the update times by paying a penalty on the query time. In particular, they achieve O(logn) time for insertion and deletion of vertices, 0(logn -h k) for the insertion and deletion of a monotone chain of k edges, and 0(log^ n) time for queries. The space requirement is 0(n). Their data structure consists of two interlaced spanning trees, each of which is represented using link-cut trees [65]. In order to be concrete about one dynamic point location method, we briefly review their method. 4.1. The inter-laced trees technique Let 5 be a PSLG that is connected and monotone (and will remain that way throughout the update process). Goodrich and Tamassia [38] first construct a spanning tree T for the triangulation with the property that its root-to-leaf paths are monotone with respect to the }^-axis. Then they construct a graph-theoretic dual of the triangulation such that it excludes the edges dual to the monotone spanning tree constructed above. This defines the spanning tree D for the dual graph of 5, and these two trees "inter-lace." Each node of D represents a triangle of S and each edge of D corresponds to a non-tree edge of S, with respect to T (since edges dual to edges of T are ignored while constructing

482

M. T. Goodrich and K. Ramaiyer

D), and hence determines a unique cycle in S. Moreover this cycle partitions S into two regions, one inside the cycle and the other outside the cycle. This property allows one to perform searching the subdivision where we need to do point-versus-cycle discrimination. The main idea behind point location is as follows: since each edge of D represents a cycle of 5, it partitions S into two regions. Given a query point, we can compare it against the edges of the cycle to determine whether it is inside or outside the cycle in 0(logn) time, since T is monotone. Depending on this test, we proceed to an appropriate edge of D, which is either inside or outside the cycle of 5, for further discrimination. To perform such a search efficiently, one needs to balance the tree D. The authors use the link-cut tree data structure [65] to be able to implement a recursive centroid search [13,40] in D to eliminate a constant fraction of the triangular faces with each cycle test. This allows one to perform searches in 0(log^ n) time since the depth of the centroid decomposition tree is O(logn) and in each step one needs to perform an O(logn) -time point-versus-chain discrimination. Summary: Space: The space occupied by the structure is 0{n) (again from fractional cascading method). Query Time: 0(log^ n), as mentioned above. Update Time : The authors show how to use link-cut tree primitives to implement updates in 0(log«) time.

5. Convex hulls and convex polytopes Convex hulls and convex polytopes are fundamental geometric data structures and have been well studied. In this section we discuss the data structure representations of convex hulls and polytopes and also how they are maintained dynamically when the points are inserted and deleted.

5.1. d-dimensional representations Given a collection of points in J-dimension, where J is a fixed constant, there are algorithms (both randomized and deterministic) for computing the convex hull of the points in this collection. Alternately, some of the algorithms exploit the duality between a point and a hyperplane in d dimensions, and compute the intersection of a collection of halfspaces determined by the origin and a set of hyperplanes, which by this duality directly gives the information about the convex hull of the input set of (primal) points. A convex polytope is represented by the information about faces, edges, and vertices and the relationship between them. Each face of the convex polytope is a convex set. The (d — 1)-dimensional faces of a J-dimensional polytope are called facets, its (d — 2)- and lower dimensional faces are called subfacets, its one-dimensional faces are edges, and

Geometric data structures

483

its zero-dimensional faces are vertices. In a convex poly tope arises from a convex hull computation, then each vertex is a point in the input set. A J-dimensional convex polytope is represented generally using an incidence graph [35]. Dobkin and Laszlo [30] define such a representation for 3-dimensional convex poly topes and Brisson [11] extends this to J-dimensional convex polytopes, for fixed J ^ 2. In addition to the above definitions, we refer to the {d — 2)-dimensional face as a ridge. In the incidence graph, f o r — 1 ^ ^ < J — l , a ^-face / and a (/: + l)-face g are incident upon each other if / belongs to the boundary of ^. In this case, / is called a subface of g and g is called the super face of / .

5.2. 2-dimensional dynamic maintenance Let us now consider the problem of maintaining a convex hull of points in the plane when the underlying point set changes. The online problem, where the points are only allowed to be inserted, is easier than the dynamic problem, where one allows deletion of points as well. In the online case the convex hull can only expand in area. If a new point is determined to fall inside the existing convex hull, then one does not need to do any additional work. But if the point falls outside, then one must compute the tangets from the new point to the current convex hull. These tangents are added to the convex hull and the chain of points on the convex hull between the two tangents are deleted. This can be done in amortized O(logn) time, where n is the number of points on the convex hull, as shown by Preparata [55]. When the deletion of points is allowed things get more complicated, since one needs to maintain convexity information about points that are not currently on the convex hull. Overmars and van Leeuwen [54] present an elegant solution to this problem. They maintain the convex hull as an union of two monotone chains — the upper and lower hulls — partitioned at the point with largest and smallest x-coordinate, respectively. Each hull is then maintained as a compound tree structure, where each internal node stores the convex hull of the points in the subtree and the parent node adds the supporting tangent to the convex hull stored at its two children to maintain the convex hull of all the points in its subtree. The insert and delete operations work to modify these lists at the nodes appropriately. They show that the update operations take 0(log^ n) time (where n is the current number of points in the set), while the query operation of asking for the current convex hull involvex just reading the list from the root of the tree. In addition, they show that one can still perform tangent queries in O(logn) time.

5.3. 3-dimensional subdivision hierarchies Representing 3-dimensional convex polytopes is considerably harder. We know of no efficient dynamic schemes, for example. Still, Dobkin and Kirkpatrick [28,29] present an beautiful static data structure for representing 3-dimensional convex polyhedra so as to answer tangent and intersection queries quickly. Their structure is based upon the subdivision hierarchies technique introduced earlier (in Section 3.4). They form a hierarchy by first identifying a relatively large independent set of vertices of at most constant degree

484

M T. Goodrich and K. Ramaiyer

(viewing the edges of the polyhedron as a graph). They then remove these vertices and form the convex hull of those that remain, while forming pointers between the new facets formed and the vertex in the previous level that was deleted to give rise to these new facets. They then recursively repeat this process, terminating this construction when the polyhedron has constant size. Interestingly, they show that this simple approach can be used to answer a number of types of tangent and intersection queries on the original polyhedron in 0(log«) time, where n is the number of vertices.

6. Rectilinear data structures Having reviewed some data structures for maintaining convexity information, let us now consider the organization of geometric objects so as to enable "rectilinear" types of searching. In particular, we briefly review in this section methods that partition and query the space occupied by the underlying geometric objects using axis-parallel hyperplanes. For a more-complete description of these techniques, the reader is referred to the Chapter 17 by Nievergelt and Widmayer of this Handbook.

6.1. k-D trees and quad trees First we consider two rectilinear data structures, namely, the k-D tree [5,8,7] and the quadtree [61,62]. We now briefly describe the two types of partitions used to build these structures. We discuss the partitioning for point sets in J-dimensions. The method can be extended for other types of geometric objects in a straightforward way. In the case of the k-D tree,^ we first compute the median of the point set in one of the dimensions, say DQ and partition the point set into two sets based on the median point, i.e., all points having coordinates less than the median point along Do are placed in one set and the remaining points are placed in the other set. This process is then recursively continued along the other dimensions in the two resulting regions. Once the partitioning is completed along all dimensions, it is repeated starting from Do in the resulting regions. If the number of points in a particular region falls below a certain constant, the process is terminated for that region. These regions with boundaries parallel to the axes are organized in the form of tree with partitioning of a region into two smaller regions along an axis representing the parent-child relationship. In the case of the quad-tree, the bounding box of the point set is partitioned into 2^ regions by using axis-parallel hyperplanes passing through the mid point of each of the sides of the bounding box. The partitioning is continued recursively in each of the resulting regions until the number of points falls below a certain constant. These regions are then organized in the form of a multi-ary tree. The ^-D tree and quad tree occupy linear space and the performance of the search operations depends on the application, but is in general not optimal. The phrase means A:-dimensional or multidimensional binary search tree, but we use d to denote the dimension to be consistent with other sections.

Geometric data structures

485

The search algorithms proceed by intersecting the search volume with the bounding box of the region at the root node and recursively searching the regions in the children nodes whose bounding boxes intersect the search volume.

6.2. Segment trees Given a set of n segments in the plane, a segment tree [6] allows for efficient storage and searching operations on the underlying set. The x-coordinates of the segment endpoints are projected onto the real line so as to partition the line into several intervals (if the endpoints are in general position, there will be 2^ + 1 intervals). These intervals are then organized in the form of a tree structure. The intervals represent the leaf nodes of the tree. Each internal node represents an interval that is the union of all intervals in the leaf nodes in the subtree. We store a "cover list" of segments at each internal node (typically sorted by the "above" relationship). Formally we say a segment covers a node u if it spans interval at u and does not span the interval at the parent of u. One can show that a segment is stored in the cover lists of at most two nodes in each level and also in at most O(logn) different nodes, where n is the number of segments. A query operation, such as finding all the segments stabbed by a vertical query ray, can be answered by searching the cover list at each level and proceeding down the tree. The segment tree requires 0(n logn) space and the vertical ray-intersection query can be answered in 0(logn + k) time, where k is the output size.

6.3. Range trees Range trees allow for efficient storage of point sets for rectangle range searching. Given a set of n points in plane, for example, the 2-dimensional range tree is constructed as a compound tree structure. The primary tree structure is constructed as a balanced binary search tree structure on the x-coordinates of the points. Each node in the primary tree structure represents an interval in the x-axis. We associate with each internal node all the points within its interval and organize those points in the form of a search tree, but ordered using their y-coordinates. To perform a range search, one first searches the primary tree and locates the two intervals in the leaf nodes containing the bounding x-values of the query range. Then we walk up the tree to the least common ancestor of the two leaves and along the path we search the secondary structure stored in the nodes which are siblings (nodes not on the path) for the points which are within the range in the y-axis. The space occupied by the range tree is 0{n logn) since there O(logn) levels each containing 0(n) nodes. The complexity of range search is 0(log^ n + k), where k is the output size. This can be improved to 0(logn + k) by using techniques like fractional cascading.

7. General techniques In this section we briefly outline the some of the transformation and construction techniques used for improving the performance of the searches and updates on a data structure.

486

M. T. Goodrich and K. Ramaiyer

7.1. Fractional cascading As mentioned earlier, fractional cascading [16,17] is a very powerful data structure transformation technique that can improve the query performance of the data structures. We outlined the method in detail in Section 3.4. Given a graph-based data structure consisting of nodes of bounded degree in which search operations proceed along a path in the graph and compare the information stored in each node of the path with the "same" key, one can improve the performance by augmenting the information stored in each node. This will eliminate the need for independent searches in each node and will make the searches dependent. One important restriction is that all the information stored must be from the same universal set.

7.2. Persistence The data structures we study normally are ephemeral in nature, i.e., once the updates are done on the structures the previous information is lost. The persistent data structure maintains information about the past versions. This allows one to perform queries in the past. Such structures are called partially persistent structures. Sometimes one would like to allow for updates in the past versions. This becomes quite complicated as an update to one of the past version creates a new chain of data structures. We refer the reader to an excellent paper by DriscoU et al. [33] for complete details for how to make structures persistent. Such structures are referred to diS fully persistent structures. As showed in Section 3.4, the persistent structures can maintain the information during a plane sweep in a simple way which provides for efficient planar point location algorithm.

7.3. Static to dynamic conversions Bentley and Saxe [64,9] propose general techniques for converting static data structures to be dynamic. They considered a class of problems called decomposable searching problems and presented general techniques for converting static data structures to dynamic. The decomposable searching problems have the property that one can decompose a query about the complete set of objects into queries involving subset of objects and combining the results in a certain way to obtain the solution for the original query. These have applications to problems like membership querying, nearest neighbor querying, fathest point querying, and intersection querying. The transformations to online structures (i.e., ones that allow only insertions) is to maintain a collection of static structures of appropriate size and merge them to build large structures periodically. The size and time at which new structures are built are determined typically based on geometric progressions, such as powers-of-twos or a Fibonacci series. When deletions are allowed they advocate the use of a shadow structure where the deleted elements are maintained. One can then answer queries by searching both the shadow and the actual structures. Overmars [53] introduced another class called order decomposable set problems and he presented general techniques for dynamizations. This is a generalization of the method of

Geometric data structures

487

Overmars and van Leeuwen [54] for dynamic maintenance of convex hull of planar point set. This technique has applications in maintenance of the contour of maximal elements of a two-dimensional point set, maintenance of the intersection of a set of halfspaces in the plane, etc.

7.4. Internal-memory to external-memory conversions When the input data to a given problem is huge, one would like to design algorithms that optimize the number of I/O accesses. Because of the order of magnitude difference in the access times between disks and internal memory, algorithms dealing with large inputs should pay more attention to the organization of the underlying data structure so as to minimize the number of disk accesses. The main task in external memory organization of a data structure involves determining which substructures share the same block or page in the disk. The blocking of the nodes of the internal memory data structure is very crucial and different blocking schemes lead to different space requirement and different I/O performance of the query algorithms. Goodrich et al. [39] present external memory techniques for solving computational geometry problems dealing with large inputs. They presented four general techniques and showed how they can be applied to obtain efficient external memory algorithms for problems, like computing the pairwise intersection of orthogonal segments, constructing the 2-d and 3-d convex hull of points, answering batched range queries on points, point location queries on the planar subdivision, finding all nearest neighbors, etc. There are several other works related to external memory computational geometry. We refer the reader to some of the recent papers on this topic [1,12,19,52,20]. In addition, we highlight a recent paper by Arge [2], where he introduces a general technique, based on a data structure he calls the bujfer tree, for converting certain types of internal memory computations into efficient external memory computations.

References [1] L. Arge, External-storage data structures for plane-sweep algorithms. Technical Report RS-94-16, BRICS, Aarhus Univ., Denmark (1994). [2] L. Arge, The bujfer tree: A new technique for optimal I/O-algorithms, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955 (1995), 334-345. [3] B.G. Baumgart, A polyhedron representation for computer vision, Proc. AFIPS Natl. Comput. Conf., Vol. 44 (1975), 589-596. [4] S.W. Bent, D.D. Sleator and R.E. Tarjan, Biased search trees, SIAM J. Comput. 14 (1985), 545-568. [5] J.L. Bentley, Multidimensional binary search trees used for associative searching, Comm. ACM 18 (9) (1975), 509-517. [6] J.L. Bentley, Solutions to Klee's rectangle problems. Report ??, Carnegie-Mellon Univ., Pittsburgh, PA (1977). [7] J.L. Bentley, Multidimensional binary search trees in database applications, IEEE Trans. Softw. Eng. SE-5 (1979), 333-340. [8] J.L. Bentley, Multidimensional divide-and-conquer, Comm. ACM 23 (4) (1980), 214-229. [9] J.L. Bentley and J.B. Saxe, Decomposable searching problems I: Static-to-dynamic transformation, J. Algorithms 1 (1980), 301-358.

488

M.T. Goodrich andK.

Ramaiyer

[10] N. Blum and K. Mehlhom, On the average number of rebalancing operations in weight-balanced trees, Theoret. Comput. Sci. 11 (1980), 303-320. [11] E. Brisson, Representing geometric structures in d dimensions: Topology and order. Discrete Comput. Geom. 9 (1993), 387-^26. [12] P. Callahan, M.T. Goodrich and K. Ramaiyer, Topology B-trees and their applications, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955, Springer-Verlag (1995), 381-392. [13] B. Chazelle, A theorem on polygon cutting with applications, Proc. 23rd Annu. IEEE Sympos. Found. Comput. Sci. (1982), 339-349. [14] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [15] B. Chazelle, H. Edelsbrunner, M. Grigni, L. Guibas, J. Hershberger, M. Sharir and J. Snoeyink, Ray shooting in polygons using geodesic triangulations, Proc. 18th Intemat. Colloq. Automata Lang. Program., Lecture Notes in Comput. Sci. 510, Springer-Verlag (1991), 661-673. [16] B. Chazelle and L.J. Guibas, Fractional cascading: I. A data structuring technique, Algorithmica 1 (1986), 133-162. [17] B. Chazelle and L.J. Guibas, Fractional cascading: II. Applications, Algorithmica 1 (1986), 163-191. [18] S.W. Cheng and R. Janardan, New results on dynamic planar point location, SIAM J. Comput. 21 (1992), 972-999. [19] Y.-J. Chiang, Experiments on the practical I/O efficiency of geometric algorithms: Distribution sweep vs. plane sweep, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955, SpringerVerlag (1995), 346-357. [20] Y.-J. Chiang, M.T. Goodrich, E.F. Grove, R. Tamassia, D.E. Vengroff and J.S. Vitter, External-memory graph algorithms, Proc. 6th ACM-SIAM Sympos. Discrete Algorithms (1995), 139-149. [21] Y.-J. Chiang and R, Tamassia, Dynamization of the trapezoid method for planar point location in monotone subdivisions, Internat. J. Comput. Geom. Appl. 2 (3) (1992), 311-333. [22] R. Cole, Searching and storing similar lists, J. Algorithms 7 (1986), 202-220. [23] N. Dadoun and D.G. Kirkpatrick, Parallel processing for efficient subdivision search, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 205-214. [24] N. Dadoun and D.G. Kirkpatrick, Cooperative subdivision search algorithms with applications, Proc. 27th AUerton Conf. Commun. Control Comput. (1989), 538-547. [25] N. Dadoun and D.G. Kirkpatrick, Parallel construction of subdivision hierarchies, J. Comput. Syst. Sci. 39 (1989), 153-165. [26] M. de Berg, Ray Shooting, Depth Orders and Hidden Surface Removal, Lecture Notes in Comput. Sci. 703, Springer-Verlag, Berlin, Germany (1993). [27] P.P. Dietz and R. Raman, Persistence, amortization and randomization, Proc. 2nd ACM-SIAM Symp. Discrete Algorithms (1991), 78-88. [28] D.P. Dobkin and D.G. Kirkpatrick, A linear algorithm for determining the separation of convex polyhedra, J. Algorithms 6 (1985), 381-392. [29] D.P. Dobkin and D.G. Kirkpatrick, Determining the separation of preprocessed polyhedra — a unified approach, Proc. 17th Internat. Colloq. Automata Lang. Program., Lecture Notes in Comput. Sci. 443, Springer-Verlag (1990), 400-413. [30] D.P. Dobkin and M.J. Laszlo, Primitives for the manipulation of three-dimensional subdivisions, Algorithmica 4 (1989), 3-32. [31] D.P. Dobkin and R.J. Lipton, The complexity of searching lines in the plane. Technical Report, Dept. Comput. Sci., Yale Univ., New Haven, CT (1976). [32] D.P. Dobkin and R.J. Lipton, Multidimensional searching problems, SIAM J. Comput. 5 (1976), 181-186. [33] J.R. Driscoll, N. Samak, D.D. Sleator and R.E. Tarjan, Making data structures persistent, J. Comput. Syst. Sci. 38(1989), 86-124. [34] H. Edelsbrunner, A new approach to rectangle intersections, Part I, Intemat. J. Comput. Math. 13 (1983), 209-219. [35] H. Edelsbrunner, Algorithms in Combinatorial Geometry, EATCS Monographs on Theoretical Computer Science 10, Springer-Verlag, Heidelberg, West Germany (1987). [36] H. Edelsbrunner, L.J. Guibas and J. Stolfi, Optimal point location in a monotone subdivision, SIAM J. Comput. 15 (1986), 317-340. [37] I. Fary, On straight lines representation of planar graphs. Acta Sci. Math. Szeged. 11 (1948), 229-233.

Geometric data structures

489

[38] M. Goodrich and R. Tamassia, Dynamic trees and dynamic point location, Proc. 23rd Annu. ACM Sympos. Theory Comput. (1991), 523-533. [39] M.T. Goodrich, J.-J. Tsay, D.E. Vengroff and J.S. Vitter, External-memory computational geometry, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (FOCS 93) (1993), 714^723. [40] L.J. Guibas, J. Hershberger, D. Leven, M. Sharir and R.E. Tarjan, Linear-time algorithms for visibility and shortest path problems inside triangulated simple polygons, Algorithmica 2 (1987), 209-233. [41] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans. Graph. 4 (1985), 74-123. [42] F. Harary, Graph Theory, Addison-Wesley, Reading, MA (1972). [43] J. Hershberger and S. Suri, Offline maintenance of planar configurations, Proc. 2nd ACM-SIAM Sympos. Discrete Algorithms (1991), 32-41. [44] D.G. Kirkpatriclc, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1983), 28-35. [45] D.T. Lee and F.P. Preparata, Location of a point in a planar subdivision and its applications, SIAM J. Comput. 6 (1977), 594-606. [46] G.S. Lueker and D.E. Willard, A data structure for dynamic range searching. Inform. Process. Lett. 15 (1982), 209-213. [47] E.M. McCreight, Priority search trees, SIAM J. Comput. 14 (1985), 257-276. [48] K. Mehlhom, Sorting and Searching, Data Structures and Algorithms, Vol. 1, Springer-Verlag, Heidelberg West Germany (1984). [49] K. Mehlhom and S. Naher, Dynamic fractional cascading, Algorithmica 5 (1990), 215-241. [50] D.E. MuUer and F.P. Preparata, Finding the intersection of two convex polyhedra, Theoret. Comput. Sci. 7 (1978), 217-236. [51] J. Nievergelt and E. Reingold, Binary search trees of bounded balanced, SIAM J. Comput. 2 (1973), 33-43. [52] M.H. Nodine, M.T. Goodrich and J.S. Vitter, Blocking for external graph searching, Proc. 12th Annu. ACM Sympos. Principles Database Syst. (PODS '93) (1993), 222-232. [53] M.H. Overmars, Dynamization of order decomposable set problems, J. Algorithms 2 (1981), 245-260. Corrigendum in 4 (1983), 301. [54] M.H. Overmars and J. van Leeuwen, Maintenance of configurations in the plane, J. Comput. Syst. Sci. 23 (1981), 166-204. [55] F.P. Preparata, An optimal real-time algorithm for planar convex hulls, Comm. ACM 22 (1979), 402-405. [56] F.P. Preparata, A new approach to planar point location, SIAM J. Comput. 10 (1981), 473^82. [57] F.P. Preparata and M.L Shamos, Computational Geometry: An Introduction, Springer-Verlag, New York, NY (1985). [58] F.P. Preparata and R. Tamassia, Fully dynamic point location in a monotone subdivision, SIAM J. Comput. 18(1989), 811-830. [59] F.P. Preparata and R. Tamassia, Dynamic planar point location with optimal query time, Theoret. Comput. Sci. 74 (1990), 95-114. [60] J.-R. Sack and J. Urrutia, eds. Handbook on Computational Geometry, Elsevier Science B.V., Amsterdam, the Netherlands (1999). [61] H. Samet, Applications of Spatial Data Structures, Addison-Wesley, Reading, MA (1990). [62] H. Samet, Applications of Spatial Data Structures: Computer Graphics, Image Processing, and GIS, Addison-Wesley (1990). [63] N. Samak and R.E. Tarjan, Planar point location using persistent search trees, Comm. ACM 29 (1986), 669-679. [64] J.B. Saxe and J.L. Bentley, Transforming static data structures to dynamic structures, Proc. 20th Annu. IEEE Sympos. Found. Comput. Sci. (1979), 148-168. [65] D.D. Sleator and R.E. Tarjan, A data structure for dynamic trees, J. Comput. Syst. Sci. 26 (3) (1983), 362-381. [66] D.E. Willard and G.S. Lueker, Adding range restriction capability to dynamic data structures, J. ACM 32 (1985), 597-617.

CHAPTER 11

Polygon Decomposition J. Mark Keil Department of Computer Science, University of Saskatchewan, Saskatoon, SK, Canada, S7N 5A9

Contents 1. Introduction 2. Decomposing general polygons 2.1. Polygon partitioning 2.2. Polygon covering 3. Orthogonal polygons 3.1. Partitioning orthogonal polygons 3.2. Covering orthogonal polygons References

493 496 496 500 502 502 507 513

491

Polygon decomposition

493

1. Introduction Practitioners frequently use polygons to model objects in applications where geometry is important. In polygon decomposition we represent a polygon as the union of a number of simpler component parts. Polygon decomposition has many theoretical and practical applications and has received attention in several previous surveys [26,68,108,129,134]. Pattern Recognition is one area that uses polygon decomposition as a tool [41,111113,134]. Pattern recognition techniques extract information from an object in order to describe, identify or classify it. An established strategy for recognizing a general polygonal object is to decompose it into simpler components, then identify the components and their interrelationships and use this information to determine the shape of the object [41,112]. Polygon decomposition is also useful in problems arising in VLSI artwork data processing. Layouts are represented as polygons, and one approach to preparation for electronbeam lithography is to decompose these polygon regions into fundamental figures [6,42, 101,103]. Polygon decomposition is also used in the process of dividing the routing region into channels [83]. In computational geometry, algorithms for problems on general polygons are often more complex than those for restricted types of polygons such as convex or star-shaped. The point inclusion problem is one example [115]. For other examples see [4] or [109]. A strategy for solving some of these types of problems on general polygons is to decompose the polygon into simple component parts, solve the problem on each component using a specialized algorithm, and then combine the partial solutions. Other applications of polygon decomposition include data compression [93], database systems [91], image processing [98], and computer graphics [132]. Although much work has been done on decomposing polyhedra in three or higher dimensions [17,10], we will restrict the scope of this survey to that of decomposing polygons in the plane. Triangulation, the partitioning of the interior of a polygon into triangles, is a central problem in computational geometry. Many algorithms for polygons begin by triangulating the polygon. As early as 1978, Garey et al. [45] provided an 0(n log n) time algorithm, but no matching lower bound was known. The importance of the problem led to a significant amount of research [39,133] on algorithms, culminating in Chazelle's linear time algorithm [27]. Although it certainly is an example of a polygon decomposition problem, the triangulation problem has taken on a life of its own and we will consider a systematic study of the triangulation problem, as well as related mesh generation work, to be outside the scope of this survey. For a good survey of mesh generation and optimal triangulation see [17] or Chapter 6. There are a wide variety of types of component subpolygons that are useful for polygon decomposition. These include subpolygons that are convex, star-shaped, spiral or monotone, as well as fixed shapes such as squares, rectangles and trapezoids. Before proceeding further we provide definitions for some of the restricted types of polygons. A point x in a polygon P is visible from a point y in P, if the line segment joining x and y lies entirely inside P. We treat a polygon as a closed set, thus a visibility line may touch the boundary of P. A polygon P is convex if every pair of points in P are visible from each other. A polygon P is star-shaped if there exists at least one point x inside P from which the entire

494

J.M. Keil

(a)

(b)

(c) Fig. 1. (a) A star-shaped polygon, (b) a spiral polygon, and (c) a polygon monotone with respect to the y-axis.

polygon is visible. The entire set of points in P from which P is visible is called the kernel of P. A polygonal chain in a polygon P is a sequence of consecutive vertices of P. A spiral polygon is a polygon whose boundary chain contains precisely one concave subchain.

Polygon

decomposition

495

(a)

(b) Fig. 2. A polygon with 9 vertices and 3 reflex vertices partitioned into convex subpolygons (a) with a Steiner point and (b) without Steiner points.

A polygonal chain is monotone with respect to a line / if the projections of the vertices in the chain on / occur in exactly the same order as the vertices in the chain. A polygon P is monotone if there exists a line / such that the boundary of P can be partitioned into two polygonal chains which are monotone with respect to the line /. See Figure 1. It is also useful to classify the type of polygon that is being decomposed. Polygons may be simply connected or they may contain holes. Holes are nonoverlapping "island" simple polygons, inside the main polygon. Some authors allow for degenerate holes such as line segments or points. The complexity of a decomposition problem usually increases if the

496

JM. Keil

polygon contains holes. A polygon is said to be orthogonal if all of its sides are either horizontal or vertical. Orthogonal polygons are relevant in many applications and in this survey special emphasis is placed on the decomposition of orthogonal polygons. Polygon decompositions are also classified according to how the component parts interrelate. A decomposition is called 2i partition, if the component subpolygons do not overlap except at their boundaries. If generally overlapping pieces are allowed we call the decomposition a cover. Decomposing a polygon into simpler components can be done with or without introducing additional vertices which are commonly called Steiner points. While the use of Steiner points makes subsequent processing of the decomposed polygon more complex, it also often allows the use of fewer component parts. See Figure 2. In a polygon with n vertices, at some A^ of the vertices the interior angle will be reflex (greater than 180°). The number A^ of reflex vertices of a polygon can be much smaller than n and we analyze the complexity of decomposition algorithms with respect to both n and A^. See Figure 2. In most applications we want a decomposition that is minimal in some sense. Some applications seek to decompose the polygon into the minimum number of some type of component. Other applications use a decomposition that minimizes the total length of the internal edges used to form the decomposition (minimum "ink"). Perhaps the earhest minimum "ink" result is due to Klincsek [70]. He uses dynamic programming to find the minimum "ink" triangulation of a polygon. His work was influential in that it inspired subsequent dynamic programming solutions to decomposition problems. As in the example of Figure 6, a minimum edge length decomposition can be quite different from a minimum number decomposition for the same component type. In the next section we will review the work that has been done concerning partitioning and covering general polygons. In Section 3 we turn our attention to orthogonal polygons and consider the work done on decomposing orthogonal polygons.

2. Decomposing general polygons In this section we consider both partitioning and covering problems for general polygons.

2.1. Polygon partitioning When partitioning a polygon into simpler subpolygons, it is the application which determines the type of subpolygon to be used. Syntactic pattern recognition uses convex, spiral and star-shaped decompositions [41,111,113,124,9,134]. VLSI applications use trapezoids [6]. In the rest of this section we will consider each of these types of subpolygons in turn. Convex subpolygons. When the polygon may contain holes, the problem of partitioning a polygon into the minimum number of convex components is NP-hard [80], either allowing or disallowing Steiner points. For polygons without holes much of the work done disallows Steiner points. A 1975 algorithm, due to Feng and Pavlidis [41], runs in O(N^n) time, but

Polygon

decomposition

497

Fig. 3. AnX-pattern.

does not generally yield a minimum decomposition. Schachter's 1978 [124] 0(nN) time partitioning algorithm also cannot guarantee a minimum number of components. For polygons without holes disallowing Steiner points, several approximation algorithms provide results guaranteed to be close to optimum. In 1982 Chazelle [25] provides an 0(^ log n) time algorithm that finds a partition that contains fewer than 4^ times the optimal number of components. Later, Greene [55], and Hertel and Mehlhorn [61] provide 0(n log n) time algorithms that find a partition that contains less than or equal to four times the optimal number of components. Note that, for polygons without degenerate holes, any convex partition that does not contain unnecessary edges will be within four times of the optimal sized partition. This is true as each added edge can eliminate at most two reflex vertices and each reflex vertex requires at most two edges to eliminate it in any convex partition that does not contain unnecessary edges. The year 1983 saw the achievement of algorithms obtaining the optimal number of convex components. When disallowing Steiner points, Greene [55] developed an O(N^n^) time algorithm for partitioning a polygon into the minimum number of convex components. Independently, Keil [64,65] developed an 0(N^n log n) time algorithm for the problem. Recently, Keil and Snoeyink [69] have achieved an 0(n + A^^ mm{N^, n}) time algorithm. Allowing Steiner points makes the problem quite different. There are an infinite number of possible locations for Steiner points. Nevertheless, as early as 1979 Chazelle and Dobkin [24,28,29] developed an 0(n + N^) time algorithm for the problem of partitioning a polygon into the minimum number of convex components. They define an Xy^-pattern to be a particular interconnection of k reflex vertices which removes all the reflex angles at these vertices and creates no new reflex angles. See Figure 3. They achieve their algorithm by further developing this idea and using a dynamic programming framework. Dobkin et al. [37] show how to extend the existing algorithms for decomposing a polygon without holes into convex components to optimally partition a splinegon into convex components (with or without Steiner points). A splinegon is a polygon where edges have been replaced by "well behaved curves" [37]. Partitioning a polygon with holes into convex components remains hard under the minimum edge length criterion. With Steiner points Lingas et al. [83] show the problem is

498

JM. Keil

NP-hard. Disallowing Steiner points, Keil [64] shows the problem is NP-complete. Allowing Steiner points, Levcopoulos and Lingas develop approximation algorithms for the problem [77]. For polygons without holes, they have an 0(n log n) time algorithm that yields a solution of size 0{p log A^), where p is the length of the perimeter of the polygon. For polygons with holes, they have an 0(n log n) time algorithm that produces a convex partition of size 0{{b -\-m) log N), where b is the total length of the boundary of the polygon and the holes and m is the minimum length of its convex partition. No optimal algorithms for the problem are known when Steiner points are allowed. For a convex polygon with point holes, without the use of Steiner points, Plaisted and Hong [114] give a polynomial time algorithm for partitioning into convex subpolygons, such that the total edge length is within 12 times the minimum amount required. For this problem Levcopoulos and Krznaric [76] give a greedy type 0(rt log n) time algorithm that yields a solution that is also within a constant factor of optimal. The year 1983 also saw the achievement of optimal algorithms under the minimum edge length criteria. For polygons without holes, disallowing Steiner points, Keil [64] develops an 0(N^n^ log n) time dynamic programming algorithm for the problem of partitioning a polygon into convex subpolygons while minimizing the total internal edge length. Independently, Greene noticed that his algorithm for the convex minimum number problem [55] can be adapted to yield an O(N^n^) time algorithm for the convex minimum edge length problem. Spiral subpolygons. Recall that a spiral polygon is a simple polygon whose boundary chain contains precisely one concave subchain. Keil [64] shows that the problem of partitioning a polygon with holes into the minimum number of spiral components is NPcomplete, when Steiner points are disallowed. For polygons without holes, again disallowing Steiner points, Feng and Pavlidis [41] provide a polynomial time algorithm for the problem that does not generally yield the minimum number of components. Keil [65] provides an 0(n^ log n) time algorithm to partition a polygon without holes, disallowing Steiner points, into the minimum number of spiral components. He also provides an Oin"^ log n) time algorithm for the same problem under the minimum edge length optimality criterion [64]. No results are known concerning partitioning polygons into spiral components if Steiner points are allowed. Star-shaped subpolygons. Steiner points are disallowed in most of the known results concerning star-shaped partitioning. Again we see the hardness of decomposing a polygon with holes as Keil [64] shows that the problem of partitioning a polygon with holes into the minimum number of star-shaped components is NP-complete. In 1981, for polygons without holes. Avis and Toussaint [9] give an 0(n log n) time algorithm that partitions a polygon into at most n/3 star-shaped components. This algorithm does not generally yield a minimum partition. In 1984 Aggarwal and Chazelle [2] are able to partition a polygon into n/3 components inO(n) time. In order to achieve a partition into the minimum number of star-shaped components, in 1983 Keil employs dynamic programming to develop an 0(n^N^ log n) time algorithm [65]. The idea is to extend the solutions for small subpolygons into solutions for larger subpolygons. In general however, there can be an exponential number of minimum starshaped partitions of a subpolygon. Furthermore, there are situations where no minimum

Polygon decomposition

499

partition of a subpolygon can be extended into a global minimum partition. The solution is to introduce pseudo star-shaped polygons. A pseudo star-shaped subpolygon has the property that there exists a point x in the polygon, but not in the subpolygon, so that every point in the subpolygon can be seen from x. The algorithm proceeds by keeping one star or pseudo star-shaped minimum partition of each of a number of equivalence classes of partitions at each subpolygon. Shapira and Rappoport [126] make use of a form of star-shaped partition in a new method for the computer animation task of shape blending. They seek a partition into the minimum number of star-shaped components, each of whose kernels contains a vertex of the polygon. When such a partition exists, they compute it using a restriction of Keil's algorithm [64]. Since such a partition does not always exist, they also provide a heuristic which allows Steiner points. For the problem of partitioning a polygon into star-shaped components while minimizing the total internal edge length, Keil [64] provides an 0(N^n^ log n) time algorithm. Monotone subpolygons. Recall that a polygon P is monotone if there exists a line, /, such that the boundary of P can be partitioned into two polygonal chains, each of which is monotone with respect to /. For a polygon with holes, disallowing Steiner points, Keil [64] shows that the problem of partitioning a polygon into the minimum number of monotone subpolygons is NP-complete. For a polygon without holes, Keil [64] develops an O(Nn^) time algorithm for the problem. The algorithm relies on the fact that there are only a polynomial number of preferred directions with respect to which a subpolygon can be monotone. If a minimum partition is not important Garey et al. [45] can provide an 0(n log n) time algorithm. If all of the subpolygons in a partition are monotone with respect to the same line then the partition is a decomposition into uniformly monotone components. Liu and Ntafos [89] give algorithms for partitioning a polygon without holes into the minimum number of uniformly monotone subpolygons. They give an 0(nN^ + N'^n log n + N^) time algorithm that does not use Steiner points, and an 0(N^n log n-{- N^) time algorithm that does allow Steiner points. For the problem of partitioning a polygon into monotone components while minimizing the total internal edge length, Keil [64] gives an O(Nn^) time algorithm. Other subpolygons. The problem of partitioning a polygonal region into the minimum number of trapezoids, with two horizontal sides, arises in VLSI artwork processing systems [6]. A triangle with a horizontal side is considered to be a trapezoid with two horizontal sides one of which is degenerate. See Figure 4. In such systems the layout is stored as a set of polygonal regions which should be partitioned into fundamental figures since the aperture of a pattern generator is restricted. Trapezoids have been used as fundamental figures. Asano et al [6] develop an O(n^) time algorithm, based on circle graphs, for the problem when the polygon does not contain holes. If a minimum partition is not important, Chazelle is able to partition a polygon into trapezoids inO(n) time as a by-product of his linear time triangulation algorithm [27]. In the case where the polygon does contain holes, Asano et al. [6] show the problem to be NP-complete, and they provide an 0(n log n) time approximation algorithm that finds a partition containing not more than three times the number of trapezoids in a minimum partition.

500

J.M. Keil

Fig. 4. A partition into trapezoids.

Everett et al. [40] consider the problem of partitioning a polygon into convex quadrilaterals. They use Steiner points, and give an 0{n) time algorithm that is not guaranteed to provide the minimum number of components. Another 0(n) time algorithm for this problem, that limits the number of Steiner points, is given in [117]. It is not always possible to partition a polygon into convex quadrilaterals without adding Steiner points. Lubiw [92] shows that the problem of deciding whether or not a partition without Steiner points is possible is NP-complete. Algorithms for partitioning convex polygons with point holes into quadrilaterals are given in [135,18]. Levcopoulos et al. [82,79] provide some algorithms for partitioning some types of polygons into m-gons under the minimum edge length optimization criterion.

2.2. Polygon covering Much of the work done concerning covering general polygons has involved convex or starshaped components. Convex subpolygons. The problem of covering a polygon with the minimum number of convex subpolygons finds application in syntactic pattern recognition [41,111,113,112, 110]; for example in the recognition of Chinese characters. In 1982 O'Rourke was one of

Polygon decomposition

501

the first to investigate the complexity of this problem. He showed that, although it is difficult to restrict the possible locations of Steiner points [106], the problem is nevertheless decidable [105,104]. For polygons with holes, O'Rourke and Supowit show that the problem is NP-hard [110], with or without Steiner points, and for this problem O'Rourke [107] provides an algorithm which runs in exponential time. Several years later, in sharp contrast to the partitioning situation, Culberson and Reckhow show that even if the polygon does not contain holes, the problem of covering a polygon with the minimum number of convex components remains NP-hard [35]. The difficulty of the problem motivates the consideration of the problem of covering a polygon with a fixed number of convex subpolygons. Shermer [130] provides a linear time algorithm for recognizing polygons that can be covered with two convex subpolygons. Belleville provides a linear time algorithm for recognizing polygons that can be covered with three convex subpolygons [13,14]. A more general type of polygon decomposition allows set difference as well as union as an operator to apply to the components. This additional operator may allow for a smaller number of component pieces. Batchelor [12] investigates a procedural approach to convex sum/difference decompositions. This type of decomposition has been applied to the automatic transformation of sequential programs for efficient execution on parallel computers [95]. Also, Tor and Middleditch [132] give an 0(n^) time algorithm for finding a convex sum/difference decomposition that may not necessarily use the minimum number of components. Star-shaped subpolygons. The problem of covering a polygon with star-shaped subpolygons has often been investigated as the problem of guarding an art gallery [9,108,129]. The region visible from a guard is a star-shaped subpolygon and the polygon models the art gallery. Knowledge of this problem helps with the understanding of visibility problems within polygons. General satisfactory solutions are not known for the minimum star-shaped covering problem. In 1983 for polygons with holes, O'Rourke and Supowit show the problem to be NP-hard [110]. Later Lee and Lin [71] show the problem remains NP-hard, even without holes, if the kernel of each star-shaped subpolygon must contain a vertex. Aggarwal [1] then shows that the unrestricted problem is NP-hard for polygons without holes. More recently other variations of the problem are shown to be NP-hard by Hecker and Herwig [59],andbyNilsson[102]. In 1987 Ghosh [48] develops an 0(n^ log n) time approximation algorithm, that finds a cover within a factor of 0(log n) of optimal, if the kernels of the subpolygons are restricted to contain vertices. His algorithm works whether or not the polygon contains holes. In 1988 Aggarwal et al. [3] consider a restricted problem, for polygons without holes, where subpolygon sides must be contained in either edges, edge extensions or segments of lines passing through two vertices of the polygon. For this restricted problem they develop an 0(n^ log n) time approximation algorithm that produces a cover within a factor of 0(log n) of optimal. They also show that the restricted problem remains NP-hard. Belleville [15] investigates the problem of recognizing polygons that can be covered by two star-shaped subpolygons. He gives an 0(n^) time algorithm for recognizing such polygons.

502

JM. Keil

Shermer [128] contributes to knowledge of related problems by giving bounds on the number of generalized star-shaped components required in a generalized cover. Other subpolygons. Spiral polygons and rectangles are two other types of component subpolygons that have been used to cover a polygon. For polygons with holes, O'Rourke and Supowit [110] show that covering with the minimum number of spiral subpolygons is NP-hard. Levcopoulos and Lingas [78] consider covering acute polygons, whose interior angles are all greater than 90°, by rectangles. They show that for convex polygons, the minimum number of rectangles needed in a cover is 0{n log(r(P))), where r{P) is the ratio of the length of the longest edge of the polygon to the length of the shortest edge of the polygon. Later Levcopoulos [72,75] extends this result and gives an algorithm that covers such an acute polygon with 0{n log n-\-m{P)) rectangles in time 0{n log n-\-m{P)), where m(P) is the number of rectangles in an optimal cover.

3. Orthogonal polygons In this section we turn our attention to the problem of decomposing orthogonal polygons. An orthogonal polygon is a polygon whose edges are either horizontal or vertical. Orthogonal polygons are also referred to as rectilinear polygons. They arise in applications, such as image processing and VLSI design, where a polygon is stored relative to an implicit grid. The set of orthogonal polygons is a subset of the set of all polygons, thus any polynomial time algorithm developed for general polygons will apply to orthogonal polygons, but problems NP-complete for general polygons may become tractable when restricted to orthogonal polygons. There are also natural subpolygons for orthogonal polygons, such as axis aligned rectangles or squares that are less relevant to general polygons. In the next two subsections we treat partitioning and covering problems for orthogonal polygons.

3.1. Partitioning orthogonal polygons Rectangles are the most important type of component to consider in relation to orthogonal polygons. The problem of partitioning orthogonal polygons into axis aligned rectangles has many applications. Image processing is often more efficient when the image in rectangular. For example, Ferrari et al. [42] indicate that the convolving of an image with a point spread function can be made particularly efficient by specifying the nonnegative values of the point spread function over a rectangular domain and specifying that function to be zero outside that domain. They suggest handling a nonrectangular orthogonal image by partitioning it into the minimum number of rectangular subregions. In VLSI design, two variations of the problem arise. The first occurs in optimal automated VLSI mask fabrication [84,101,103]. In mask generation a figure is usually engraved on a piece of glass using a pattern generator. A traditional pattern generator has a rectangular opening, thus the figure must be partitioned into rectangles so that the pattern generator

Polygon

503

decomposition

L

L

n

r

n

r

J

L

J

L

Fig. 5. Horizontal and vertical chords between reflex vertices.

can expose each such rectangle. The entire figure can be viewed as an orthogonal polygon. Since the time required for mask generation depends on the number of rectangles, the problem of partitioning an orthogonal polygon into the minimum number of rectangles becomes relevant. Another VLSI design problem is that of dividing the routing region into channels. Lingas et al. [83] suggest that partitioning the orthogonal routing region into rectangles, while minimizing the total length of the lines used to form the decomposition, will produce large "natural-looking" channels with a minimum of channel to channel interaction. Thus the minimum "ink" criteria is also relevant. Other application areas for the problem of partitioning orthogonal polygons into the minimum number of rectangles include database systems [91] and computer graphics [54]. At this point we should note that the use of Steiner points is inherent in the solution of the problem of partitioning into rectangles. For example for an orthogonal polygon with one reflex vertex, a partition can be formed by adding a horizontal line segment from the reflex vertex to the polygon boundary. In fact a generalization of this idea forms the basis for most partitioning algorithms. The following theorem [88,103,42] expresses this. See Figure 5. THEOREM 1. An orthogonal polygon can be minimally partitioned into N — L — H -\- I rectangles, where N is the number of reflex vertices, H is the number of holes and L is the maximum number of nonintersecting chords that can be drawn either horizontally or vertically between reflex vertices.

504

JM. Keil

The theorem impHes that a key step in the decomposition problem is that of finding the maximum number of independent vertices in the intersection graph of the vertical or horizontal chords between reflex vertices. This problem can in turn be solved by finding a maximum matching in a bipartite graph. In 1979 Lipski et al. [88] exploited this approach to develop an 0{n^/^) time algorithm for partitioning orthogonal polygons with holes. Algorithms for the same problem running within the same time bounds were also developed in [103] and [42]. In the early 1980s the special structure of the bipartite graph involved allowed the development of improved algorithms for the problem running in 0(n^/^ log n) time [62,86,87]. These algorithms have been recently extended by Soltan and Gorpinevich [131] to run in the same time bounds even if the holes degenerate to points. It is open as to whether or not faster algorithms can be developed. The only known lower bound for the problem with holes is Q.{n log n) [84]. If the polygons do not contain holes then faster algorithms are possible. In 1983 Gourley and Green [54] develop an O(n^) time algorithm that partitions an orthogonal polygon without holes into within 3/2 of the minimum number of rectangles. In 1988 Naha and Sahni [101] also develop an algorithm that partitions into less than 3/2 of the minimum number of rectangles, but their algorithm runs in 0(n log n) time. Finally in 1989, Liou et al. [84] produce an 0(n) time algorithm to optimally partition an orthogonal polygon without holes into the minimum number of rectangles. The 0{n) time is achieved assuming that the polygon is first triangulated using Chazelle's linear time triangulation algorithm. Note that the three dimensional version of the problem is NP-complete [36]. Minimizing the total length of the line segments introduced in the partitioning process is the other optimization criterion that arises in the applications. See Figure 6. Lingas et al. [83] were the first to investigate this optimization criteria. They present an 0{n^) time algorithm for the problem of partitioning an orthogonal polygon without holes into rectangles using the minimum amount of ink. If the polygon contains holes they show that the problem becomes NP-complete. In applications holes do occur, thus the search was on for approximation algorithms for the problem. The first algorithm of this type was given by Lingas [81]. In 1983 he presented an O(n^) time algorithm to partition an orthogonal polygon with holes into rectangles such that the amount of "ink" used is within a constant of the minimum amount possible. Unfortunately, the constant for this algorithm is large (41). In 1986 Levcopoulos [74] was able to reduce the constant to five while also producing an algorithm running in only 0{n^) time. In the same year [73] he further reduced the time to 0(/i log n), but at the expense of a large increase in the size of the constant. The restriction of the problem to where the orthogonal polygon becomes a rectangle and the holes become points is also NP-complete [83]. Gonzalez and Zheng [51] show how to adapt any approximation algorithm for the restricted problem to yield an approximation algorithm for the more general problem where the boundary polygon need not be a rectangle. Their method is to use the algorithm given in [83] to partition the boundary orthogonal polygon into rectangles, then each of these rectangles along with the point holes inside it, becomes an instance of the restricted version of the problem. In 1985 Gonzalez and Zheng [51] give an approximation algorithm, running in 0{n^) time that partitions a rectangle with point holes into disjoint rectangles, using no more than 3 + \/3 times the minimum amount of "ink" required. The next year Levcopoulos

Polygon

decomposition

505

(a)

(b) Fig. 6. A partition using (a) the minimum number of rectangles, and (b) the minimum amount of "ink"

[73] improves the time to 0(n log n), while maintaining the same bound. Later Gonzalez and Zheng [53] give an algorithm that runs in 0{n^) time, that produces a solution within 3 times optimal. They use a so called "guillotine" partition to develop an approximation algorithm within 1.75 times optimal [52], but which uses O(n^) time. See Figure 7. A recent paper [49] provides a simpler proof that the "guillotine" partition is within 2 times optimal. If time is more important, Gonzalez et al. [50] give an algorithm that runs in 0{n log n) time, but only finds a solution guaranteed to be within four times optimal. If Steiner points are disallowed, then quadrilaterals rather than rectangles become the natural component type for the decomposition of orthogonal polygons. Kahn, Klawe and Kleitman [63] show that it is always possible to partition an orthogonal polygon into convex quadrilaterals. This is not always possible for arbitrary polygons. This partitioning of a polygon into convex quadrilaterals is referred to as quadrilateralization. Sack and Toussaint develop an 0{n log n) time algorithm for quadrilateralizing an orthogonal polygon [120,122]. They use a two step process. First the orthogonal polygon is partitioned into a specific type of monotone polygon, these are in turn partitioned into quadrilaterals in linear time [121]. Lubiw [92] also provides an 0(n log n) time quadrilateralization algorithm for orthogonal polygons. Arbitrary monotone or star-shaped orthogonal polygons can be quadrilateralized in linear time [122].

n

JM. Keil

506

i 1

1 1 i 1

1

1

1 1

1

1 1 i 1

1 r

1 1 1

A

1

w

^

;

1

''

'

^_J

1

Fig. 7. A guillotine partition.

Let us now turn to the problem of finding the minimum edge length quadrilateralization of an orthogonal polygon. For this problem Keil and Sack [68] give an O(n^) time algorithm. Later Conn and O'Rourke [32] improve this to Oirv' log n) time. There are other known results concerning orthogonal partitioning. Liu and Ntafos [90] show how to partition a monotone orthogonal polygon into star-shaped components. Their algorithm runs in 0{n log n) time, allows Steiner points, and yields a decomposition within four times optimal. Gunther [56] gives a polynomial time algorithm for partitioning an orthogonal polygon into orthogonal polygons with k or fewer vertices. In most cases this algorithm finds a partition that is within a factor of two of optimal. Gyori et al. [58] also have some results on partitioning orthogonal polygons into subpolygons with a fixed number of vertices.

Polygon

507

decomposition

3.2. Covering orthogonal polygons Tools from graph theory are useful when developing algorithms for covering orthogonal polygons. If each edge of an orthogonal polygon is extended to a line, a rectangular grid results. Based on this grid, a graph can be associated with a covering problem as follows. The vertices of the graph are the grid squares that lie within the polygon and two such vertices are adjacent if the associated grid squares can be covered by a subpolygon lying entirely within the polygon. Depending upon the type of subpolygon, there can be a correspondence between covering the graph with the minimum number of cliques and the original polygon covering problem. For example in Figure 8, if the grid squares are joined by edges if they lie in the same rectangle, then the problem of covering the polygon with rectangles corresponds to covering the derived graph with cliques. If such a correspondence exists, then the tractability of both problems depends upon the properties of the derived graph. This graph theory approach underlies several of the algorithms we shall encounter in this section. The types of subpolygons that have been studied include rectangles, squares, orthogonally convex, orthogonally star-shaped and others. Rectangles. The problem of covering an orthogonal polygon with the minimum number of axis aligned rectangles has found application in data compression [91], the storing of graphic images [96], and the manufacture of integrated circuits [23,60]. As early as 1979 Masek [96] showed that if the orthogonal polygon contains holes, then the problem is NP-complete. Later Conn and O'Rourke [31] show that for an orthogonal polygon with holes it is also NP-complete if only the boundary or only the reflex vertices

1 1 1 1

_ 1 1

Fig. 8. Each grid region can be associated with the vertex of a graph.

508

JM. Keil

need to be covered. Attention then turned to the case where the polygon does not contain holes. In 1981 Chaiken et al. [23] initiated the above mentioned graph theory approach. They define a graph G with grid squares for vertices and with two vertices adjacent if there is a rectangle, lying entirely within the polygon, that contains both associated grid squares. They show that the cliques of this graph correspond to the rectangles in the polygon whose sides lie on grid lines. The rectangle cover problem then corresponds to the problem of covering the vertices of the graph with the minimum number of cliques. This clique problem is NP-complete in general but polynomially solvable for the class of perfect graphs. Unfortunately, the graph derived from the rectangle problem is not perfect, even if the polygon does not contain holes [23]. In the search for a solvable restriction of the problem attention turned to restricted types of orthogonal polygons. An orthogonal polygon is called horizontally {vertically) convex if its intersection with every horizontal (vertical) line is either empty or a single line segment. For an example see Figure 9. An orthogonal polygon is called orthogonally convex if it is both horizontally and vertically convex. Chaiken et al. [23] have an example showing that even for orthogonally convex polygons the derived graph is not perfect. Thus for the rectangle covering problem the graph approach has not yielded efficient algorithms. Note that the intersection graph of the maximal rectangles in an orthogonal polygon without holes is perfect [127]. To develop a polynomial time algorithm for the special case of covering an orthogonally convex polygon with the minimum number of rectangles, in 1981 Chaiken et al. [23] use an approach that reduces the problem to the same problem on a smaller polygon. Later Liou et al. [85] develop an 0(n) time algorithm for this problem. Brandstadt also contributes a linear algorithm for the restricted case of 2-staircase polygons [19]. In 1984 Franzblau and Kleitman [43] handle the larger class of horizontally convex polygons. They give a polynomial time algorithm for covering this class with the minimum number of rectangles. See also [57]. In 1985 Lubiw [93] was able to provide a polynomial time algorithm for another restricted class of orthogonal polygons. Her algorithm handles orthogonal polygons that do not contain a rectangle that touches the boundary of the polygon only at two opposite comers of the rectangle. In spite of these efforts on special cases the general problem of covering an orthogonal polygon without holes with the minimum number of rectangles remained open for some time. Finally in 1988, Culberson and Reckhow [35] settle the issue by showing the problem to be NP-complete. Later Herman and Das Gupta [16] go further and show that no polynomial time approximation scheme for the problem exists unless P = NP. The difficulty of the problem led Cheng et al. [30], in 1984, to develop a linear approximation algorithm that is guaranteed to find a solution within four times optimal for hole free polygons. Then in 1989 Franzblau develops an 0{n log n) time approximation algorithm that yields a covering containing 0(^ log 9) rectangles, where 0 is the minimum number of rectangles required for a covering [44]. She also shows that an optimal partitioning contains at most 20 -\- H — \ rectangles, where H is the number of holes contained in the polygon.

Polygon

decomposition

509

Fig. 9. A horizontally convex polygon.

Recently, Keil [67] introduces a type of rectangle decomposition which is intermediate between partitioning and covering. This non-piercing covering allows rectangles to overlap, but if two rectangles A and B overlap, then either A — B or B — A must be connected. Keil provides an 0(n log n-\-mn) time algorithm for finding an optimal non-piercing covering of an orthogonal polygon P without holes, where m is the number of edges in the visibility graph of P that are either horizontal, vertical or form the diagonal of an empty rectangle. Squares. Covering polygons with axis aligned squares has application in the construction of data structures used in the storage and processing of digital images. For example, the digital medial axis transform (MAT) [136] is based on representing an image by the union of squares. Simple images may be covered by few squares and may be easily reconstructed from the MAT. Scott and Iyengar [125] define the Translation Invariant Data Structure (TID), as a method for representing images. An image is considered to be a grid of "black" and "white"

510

JM. Keil

pixels, and the TID for a given image consists of a list of maximal squares covering all black regions within the image. In order to reduce the cost of storing and manipulating a TID, the underlying list of squares should be as small as possible. Scott and Iyengar [125] give a heuristic for finding a small covering set of squares as part of their TID construction algorithm. Albertson and O'Keefe [5] investigate a graph associated with the square covering problem. A unit square in the plane whose comers are integer lattice points is called a block. A polygon with integer vertices then contains of set of A^ blocks. Albertson and O'Keefe define a graph, with the blocks as vertices and with such vertices adjacent if the corresponding blocks can be covered by a square lying entirely within the polygon. They show that for polygons without holes this graph is perfect. They further show that the blocks corresponding to a cUque in the graph form a set of blocks entirely contained within a single square lying in the polygon. Aupperle et al. [8] investigate this graph further and show that for polygons without holes the graph is chordal. This allows the use of an algorithm for covering chordal graphs by cliques to serve as an 0(N^-^) time algorithm for the problem of covering an orthogonal polygon without holes with the minimum number of squares. By further exploiting the geometry, Aupperle [7] adapts this approach to produce an 0(A^^^) time algorithm for this problem. The fastest algorithm based on the blocks lying in the polygon runs in O(A^) time and is due to Moitra [97,98]. The number A^ of blocks lying in the polygon could be much larger that n, the number of vertices defining the polygon. Even if the block side is optimized A^ may be Q (n^). In light of this Bar-Yehuda and Ben-Chanoch [11] consider an alternative approach of covering the polygon one square at a time and achieve an 0(n -\- 0) time algorithm for covering an orthogonal polygon without holes, where 0 is the minimum number of squares required in a cover. If the polygon contains holes the square coverage problem becomes NP-complete [8,7]. Orthogonal convex and star-shaped subpolygons. When restricting the polygons to be orthogonal we find it is natural to also restrict the notion of visibility. We consider two notions of orthogonal visibility [33]. Two points of a polygon are said to be r-visible if there exists a rectangle that contains the two points [66]. Using r-visibility leads to the fact that an r-convex polygon is just a rectangle. The decomposition of an orthogonal polygon into rectangles has been discussed in previous subsections. An r-star-shaped polygon, P, is an orthogonal polygon for which there exists a point q of P such that for all other points p of P p is r-visible (i.e. lies in the same rectangle) to q. Recall that an orthogonally convex polygon is an orthogonal polygon that is both horizontally and vertically convex. Two points of an orthogonal polygon are said to be s-visible (staircase visible) if there exists an orthogonally convex subpolygon containing both points. Note that an s-convex polygon is simply an orthogonally convex polygon. An s-starshaped polygon contains a point q, such that for every point /?, in the polygon, there is an orthogonally convex subpolygon containing both p and q. In this subsection we will consider the problems of covering an orthogonal polygon with the minimum number of r-stars, s-stars and orthogonally convex polygons. A classification of orthogonal polygons, due to Reckhow and Culberson [119], based on the types of "dents" encountered, has been useful in the work on these problems [34,33,

Polygon

decomposition

511

Fig. 10. A class 3 polygon containing N, W and S dents.

100,99,116,118,119]. If the boundary of the orthogonal polygon is traversed in the clockwise direction, at each comer either a right 90° (outside comer) or a left 90° (inside corner) tum is made. A dent is an edge of P both of whose endpoints are inside comers. If the polygon is aligned so that north (N) corresponds with the positive y axis, then dents can be classified according to compass directions. For example, an N dent is traversed from west to east in a clockwise traversal of the polygon. An orthogonal polygon can then be classified according to the number and the types of dents it contains. A class k orthogonal polygon contains dents of k different orientations. Class 0 orthogonal polygons are the orthogonally convex polygons. A vertically or horizontally convex polygon (class 2a) is a class 2 orthogonal polygon which has only opposing pairs of dent types (i.e. N and S or E and W). Class 2b orthogonal polygons have two dent orientations that are orthogonal to one another (i.e. W and N, N and E, E and S, or S and W). For an example of a class 3 polygon see Figure 10. The graph theory approach has been important in the development of understanding of these problems. By extending the dent edges across the polygon a partition into 0(n^) basic regions results. These basic regions correspond to vertices in the definition of several relevant graphs. Motwani et al [100,99] define an s-convex visibility graph, using the basic regions as vertices, where two vertices are adjacent in the graph if the corresponding basic regions can be covered by a single orthogonally convex subpolygon. They define an r-star (s-star) visibility graph, again using the basic regions as vertices, where two vertices u and V are adjacent if there is a region w that is r-visible (s-visible) to the regions corresponding to u and i;. Related directed graphs were defined by Culberson and Reckhow [119,33,118, 34]. In 1986 Keil [66] provides the first algorithm for minimally covering with orthogonally convex components. He provides an 0(n^) time algorithm for covering horizontally convex orthogonal polygons. In 1987, for this problem, Reckhow and Culberson [119,34] give an ^ (n^) lower bound on actually listing the vertices of all the subpolygons in the output, but provide an 0(n) time algorithm for finding the minimum number of orthogonally convex polygons in an optimal cover of a horizontally convex orthogonal polygon. Culberson and Reckhow also provide an 0(n^) algorithm for minimally covering class 2b type orthogonal

512

J.M. Keil

polygons, and they give a complex algorithm for handling a larger class. Later for class 3 polygons Reckhow [118] provides an 0{n^) time algorithm. For the problem of covering with orthogonally convex components the relevant convex visibility graph is formed by connecting two grid squares if they can be covered by a single orthogonally convex subpolygon [99,116,118,119]. Motwani et al. [99] prove that a minimum clique cover of this visibility graph corresponds exactly to a minimum cover of the corresponding orthogonal polygon by orthogonal convex polygons. Thus we may solve the polygon covering problem using existing graph clique cover algorithms. The complexity of the available clique cover algorithms depends upon the properties of the convex visibility graph. For class 2 polygons, the convex visibiHty graph is a permutation graph [99,116]. For class 3 polygons, the graph turns out to be weakly triangulated [99,118]. Although these graph classes allow polynomial time clique cover algorithms, the known geometric algorithms are still the most efficient algorithms to solve the problem of covering an orthogonal polygon with the minimum number of orthogonally convex subpolygons. For class 4 polygons (general orthogonal polygons) the convex visibility graph is not perfect [99,116] and the complexity of the general problem of covering orthogonal polygons with the minimum number of orthogonally convex subpolygons remains open. For covering with r-stars, Keil [66] provides an O(n^) time algorithm for optimally covering a horizontally convex orthogonal polygon. This is later improved to 0{n) time in [46]. For general class 2 polygons, class 3 polygons and general orthogonal polygons the problem of covering with the minimum number of r-stars remains open. For covering with s-stars, Culberson and Reckhow [33] provide 0{n^) time algorithms for optimally covering horizontally convex orthogonal polygons and general class 2 polygons. For class 3 and class 4 polygons the development of algorithms has depended upon properties of the s-star visibility graph. Motwani et al. [100] show that for class 3 polygons the derived s-star visibility graph is chordal. They show that a minimum chque cover algorithm for chordal graphs can be used to s-star cover class 3 polygons in Oirv") time. For class 4 polygons they show that the derived s-star graph is weakly triangulated. This then leads to an O(n^) time algorithm for the general s-star covering problem [100]. Other covering subpolygons. There are some other known results related to the covering of orthogonal polygons with subpolygons. Bremner and Shermer [20,21] studied an extension of orthogonal visibility, called (9-visibility, in which two points of the polygon are (9-visible if there is a path between them whose intersection with every line in the set O of orientations is either empty of connected. For orthogonal visibility O = {0°, 90°}. A polygon P is O-convex if every two points of P are O-visible, and C7-star-shaped if there is a point of P from which every other point of P is O-visible. Bremner and Shermer [20,21] were able to characterize classes of orientations for which minimum covers of a (not necessarily orthogonal) polygon by (9-convex or (9-star-shaped components could be found in polynomial time. Regular star-shaped (nonorthogonal) polygons have also been studied as covering subpolygons. Edelsbrunner et al. [38] give an 0{n log n) time algorithm that covers an orthogonal polygon with L§ J + 1 star-shaped subpolygons, where r is the number of reflex vertices in the polygon. This is improved by Sack and Toussaint [123] who give an 0{n) time

Polygon decomposition

513

algorithm for covering an orthogonal polygon with [fj star-shaped components. Carlsson et al. [22] are able to produce an optimal star-shaped cover for histograms in linear time. Gewali and Ntafos [47] consider covering with a variation of r-stars where periscope vision is allowed. They give an O(n^) algorithm for optimally covering a restricted type of orthogonal polygon. A different variation of r-stars is considered by Maire [94]. His stars consist of a union of a vertical and a horizontal rectangle and look like "plus" signs. He defines a type of star graph and shows it is weakly triangulated implying an optimal algorithm for the covering problem. Acknowledgement The author wishes to thank the Natural Sciences and Engineering Research Council of Canada for financial support.

References [1] A. Aggarwal, The Art Gallery Problem: Its Variations, Applications, and Algorithmic Aspects, PhD thesis, Johns Hopkins Univ., Baltimore, MD (1984). [2] A. Aggarwal and B. Chazelle, Efficient algorithm for partitioning a polygon into star-shaped polygons. Report, IBM T.J. Watson Res. Center, Yorktown Heights, NY (1984). [3] A. Aggarwal, S.K. Ghosh and R.K. Shyamasundar, Computational complexity of restricted polygon decompositions. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam (1988), 1-11. [4] A. Aggarwal, L.J. Guibas, J. Saxe and RW. Shor, A linear-time algorithm for computing the Voronoi diagram of a convex polygon. Discrete Comput. Geom. 4 (6) (1989), 591-604. [5] M. Albertson and C.J. O'Keefe, Covering regions by squares, SIAM J. Algebraic Discrete Methods 2 (3) (1981), 240-243. [6] Ta. Asano, Te. Asano and H. Imai, Partitioning a polygonal region into trapezoids, J. ACM 33 (1986), 290-312. [7] L.J. Aupperle, Covering regions by squares, M.Sc. thesis, Dept. Comput. Sci., Univ. Saskatchewan, Saskatoon, Sask. (1987). [8] L.J. Aupperle, H.E. Conn, J.M. Keil and J. O'Rourke, Covering orthogonal polygons with squares, Proc. 26th AUerton Conf. Commun. Control Comput. (October 1988), 97-106. [9] D. Avis and G.T. Toussaint, An efficient algorithm for decomposing a polygon into star-shaped polygons. Pattern Recogn. 13 (1981), 395-398. [10] C. Bajaj and T.K. Dey, Convex decompositions ofpolyhedra and robustness, SIAM J. Comput. 21 (1992), 339-364. [11] R. Bar-Yehuda and E. Ben-Chanoch, A linear time algorithm for covering simple polygons with similar rectangles, Internal. J. Comput. Geom. Appl. 6 (1996), 79-102. [12] B.G. Batchelor, Hierarchical shape description based upon convex hulls of concavities, J. Cybem. 10 (1980), 205-210. [13] P. Belleville, On restricted boundary covers and convex three-covers, Proc. 5th Canad. Conf. Comput. Geom., Waterloo, Canada (1993), 467^72. [14] P. Belleville, A Study of Convex Covers in Two or More Dimensions, PhD thesis, School of Computing Science, Simon Fraser University (1995). [15] P. Belleville, Computing two-covers of simple polygons. Master's thesis. School of Computer Science, McGill University (1991). [16] P. Berman and B. DasGupta, Approximating the rectilinear polygon cover problems, Proc. 4th Canad. Conf. Comput. Geom. (1992), 229-235.

514

JM. Keil

[17] M. Bern and D. Eppstein, Mesh generation and optimal triangulation, Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds. Lecture Notes Series on Comput. 1, World Scientific, Singapore (1992), 23-90. [18] P. Bose and G. Toussaint, Generating quadrangulations ofplanar point sets, Comput. Aided Geom. Design 14 (1997), 763-785. [19] A. Brandstadt, The jump number problem for biconvex graphs and rectangle covers of rectangular regions. Lecture Notes in Comput. Sci. 380 (1989), 68-77. [20] D. Bremner, Point visibility graphs and restricted-orientation polygon covering, M.Sc. thesis, School of Computing Science, Simon Eraser University, Bumaby, BC (April 1993). [21] D. Bremner and T. Shermer, Point visibility graphs and restricted-oriention convex cover. Technical Report CMPT TR 93-07, School of Computing Science, Simon Eraser University (1993). [22] S. Carlsson, B.J. Nilsson and S. Ntafos, Optimum guard covers and m-watchmen routes for restricted polygons, Proc. 2nd Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 519, SpringerVerlag (1991), 367-378. [23] S. Chaiken, D. Kleitman, M. Saks and J. Shearer, Covering regions by rectangles, SI AM J. Algebraic Discrete Methods 2 (1981), 394-410. [24] B. Chazelle, Computational geometry and convexity, PhD thesis, Dept. Comput. Sci., Yale Univ., New Haven, CT (1979). Carnegie-Mellon Univ. Report CS-80-150. [25] B. Chazelle, A theorem on polygon cutting with applications, Proc. 23rd Annu. IEEE Sympos. Found. Comput. Sci. (1982), 339-349. [26] B. Chazelle, Approximation and decomposition of shapes. Advances in Robotics 1: Algorithmic and Geometric Aspects of Robotics, J.T. Schwartz and C.-K. Yap, eds, Lawrence Erlbaum Associates, Hillsdale, NJ(1987), 145-186. [27] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [28] B. Chazelle and D.P. Dobkin, Decomposing a polygon into its convex parts, Proc. 11th Annu. ACM Sympos. Theory Comput. (1979), 38-48. [29] B. Chazelle and D.P. Dobkin, Optimal convex decompositions. Computational Geometry, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1985), 63-133. [30] Y Cheng, S. Iyengar and R. Kashyap, A new method of image compression using irreducible covers of maximal rectangles, IEEE Trans, on Software Eng. 14 (1988), 651-658. [31] H. Conn and J. O'Rourke, Some restricted rectangle covering problems. Technical Report JHU 87-13, Dept. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1987). [32] H.E. Conn and J. O'Rourke, Minimum weight quadrilaterization in 0(/i log n) time, Proc. 28th AUerton Conf. Commun. Control Comput. (October 1990), 788-797. [33] J. Culberson and R. A. Reckhow, Dent diagrams: A unified approach to polygon covering problems. Technical Report TR 87-14, Dept. of Computing Sci., University of Alberta (1987). [34] J. Culberson and R.A. Reckhow, Orthogonally convex coverings of orthogonal polygons without holes, J. Comput. Syst. Sci. 39 (1989), 166-204. [35] J. Culberson and R.A. Reckhow, Covering polygons is hard, J. Algorithms 17 (1994), 2-44. [36] V.J. Dielissen and A. Kaldewaij, Rectangular partition is polynomial in two dimensions but NP-complete in three. Inform. Process. Lett. 38 (1991), 1-6. [37] D.P. Dobkin, D.L. Souvaine and C.J. Van Wyk, Decomposition and intersection of simple splinegons, Algorithmica 3 (1988), 473^86. [38] H. Edelsbrunner, J. O'Rourke and E. Welzl, Stationing guards in rectilinear art galleries, Comput. Vision Graph. Image Process. 28 (1984), 167-176. [39] H. ElGindy and G.T. Toussaint, On geodesic properties of polygons relevant to linear time triangulation. Visual Comput. 5(1-2) (1989), 68-74. [40] H. Everett, W. Lenhart, M. Overmars, T. Shermer and J. Urrutia, Strictly convex quadrilateralizations of polygons, Proc. 4th Canad. Conf. Comput. Geom. (1992), 77-83. [41] H.Y.F. Feng and T. Pavlidis, Decomposition of polygons into simpler components: Feature generation for syntactic pattern recognition, IEEE Trans. Comput. C-24 (1975), 636-650. [42] L. Ferrari, P. V. Sankar and J. Sklansky, Minimal rectangular partitions of digitized blobs, Comput. Vision Graph., Image Process. 28 (1984), 58-71.

Polygon decomposition

515

[43] D. Franzblau and D. Kleitman, An algorithm for covering polygons with rectangles, Inform. Control 63 (1984), 164-189. [44] D.S. Franzblau, Performance guarantees on a sweep-line heuristic for covering rectilinear polygons with rectangles, SI AM J. Discrete Math. 2 (1989), 307-321. [45] M.R. Garey, D.S. Johnson, F.P. Preparata and R.E. Tarjan, Triangulating a simple polygon. Inform. Process. Lett. 7 (1978), 175-179. [46] L. Gewali, J.M. Keil and S. Ntafos, On covering orthogonal polygons with star shaped polygons. Inform. Sci. 65 (1992), 45-63. [47] L. Gewali and S. Ntafos, Minimum covers for grids and orthogonal polygons by periscope guards, Proc. 2ndCanad. Conf. Comput. Geom. (1990), 358-361. [48] S. K. Ghosh, Approximation algorithms for art gallery problems, Proc. Canadian Inform. Process. Soc. Congress (1987). [49] T. Gonzalez, M. Razzazi, M.-T. Shing and S.-Q. Zheng, On optimal guillotine partitions approximating optimal d-box partitions, Comput. Geom. 4 (1994), 1-12. [50] T. Gonzalez, M. Razzazi and S.-Q. Zheng, An efficient divide-and-conquer approximation algorithm for partitioning into d-boxes, Intemat. J. Comput. Geom. Appl. 3 (1993), 417^28. [51] T. Gonzalez and S.-Q. Zheng, Bounds for partitioning rectilinear polygons, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 281-287. [52] T. Gonzalez and S.-Q. Zheng, Improved bounds for rectangular and guillotine partitions, J. Symbolic Comput. 7 (1989), 591-610. [53] T. Gonzalez and S.-Q. Zheng, Approximation algorithms for partitioning a rectangle with interior points, Algorithmica 5 (1990), 11-42. [54] K.D. Gourley and D.M. Green, A polygon-to-rectangle conversion algorithm, IEEE Comput. Graphics 3 (1983), 31-36. [55] D.H. Greene, The decomposition of polygons into convex parts. Computational Geometry, F.P. Preparata, ed.. Advances in Computing Research, Vol. 1, JAI Press, London, England (1983), 235-259. [56] O. Gunther, Minimum k-partitioning of rectilinear polygons, J. Symbolic Comput. 9 (1990), 457^83. [57] E. Gyori, Covering simply connected regions by rectangles, Combinatorica 5 (1985), 53-55. [58] E. Gyori, F. Hoffmann, K. Kriegel and T. Shermer, Generalized guarding and partitioning for rectilinear polygons, Proc. 6th Canad. Conf. Comput. Geom. (1994), 302-307. [59] H.-D. Hecker and D. Herwig, Some NP-hard polygon cover problems, J. Inform. Process. Cybem. 25 (1989), 101-108. [60] A. Hegedus, Algorithms for covering polygons by rectangles, Comput. Aided Geom. Design 14 (1982), 257-260. [61] S. Hertel and K. Mehlhorn, Fast triangulation of the plane with respect to simple polygons. Inform. Control 64 (1985), 52-76. [62] H. Imai and Ta. Asano, Efficient algorithms for geometric graph search problems, SIAM J. Comput. 15 (1986), 478^94. [63] J. Kahn, M. Klawe and D. Kleitman, Traditional galleries require fewer watchmen, SIAM J. Algebraic Discrete Methods 4 (1983), 194-206. [64] J.M. Keil, Decomposing a polygon into simpler components, PhD thesis, Univ. of Toronto, Toronto, Canada (1983). Report 163/83. [65] J.M. Keil, Decomposing a polygon into simpler components, SIAM J. Comput. 14 (1985), 799-817, [66] J.M. Keil, Minimally covering a horizontally convex orthogonal polygon, Proc. 2nd Annu. ACM Sympos. Comput. Geom. (1986), 43-51. [67] J.M. Keil, Covering orthogonal polygons with non-piercing rectangles, Intemat, J. Comput. Geom. Appl. (1996). [68] J.M. Keil and J,-R, Sack, Minimum decompositions of polygonal objects. Computational Geometry, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1985), 197-216, [69] J.M. Keil and J. Snoeyink, On the time bound for convex decomposition of simple polygons. Proceedings of the Tenth Canadian Conference on Computational Geometry (1998). [70] G.T, Klincsek, Minimal triangulations of polygonal domains. Discrete Math. 9 (1980), 121-123. [71] D.T. Lee and A. Lin, Computational complexity of art gallery problems, IEEE Trans. Inform, Theory 32 (1986), 276-282,

516

JM. Keil

[72] C. Levcopoulos, A fast heuristic for covering polygons by rectangles, Proc. Fundamentals of Comput. Theory, Lecture Notes in Comput. Sci. 199, Springer-Verlag (1985). [73] C. Levcopoulos, Fast heuristics for minimum length rectangular partitions of polygons, Proc. 2nd Annu. ACM Sympos. Comput. Geom. (1986), 100-108. [74] C. Levcopoulos, Minimum length and thickest-first rectangular partitions ofpolygons. Report LITH-IDAR-86-01, Dept. of Computer and Information Sci., Linkoping University, Linkoping, Sweden (1986). [75] C. Levcopoulos, Improved bounds for covering general polygons with rectangles, Proc. Conf. Found. Softw. Tech. Theoret. Comput. Sci., Lecture Notes in Comput. Sci. 287, Springer-Veriag (1987), 95-102. [76] C. Levcopoulos and D. Krznaric, Quasi-greedy triangulations approximating the minimum weight triangulation, Proc. 7nd Annu. ACM-SIAM Symp. on Discrete Algorithms (1996), 392^01. [77] C. Levcopoulos and A. Lingas, Bounds on the length of convex partitions of polygons, Proc. 4th Conf. Found. Softw. Tech. Theoret. Comput. Sci., Lecture Notes in Comput. Sci., Springer-Verlag (1984), 279295. [78] C. Levcopoulos and A. Lingas, Covering polygons with minimum number of rectangles, Proc. 1st Sympos. Theoret. Aspects Comput. Sci., Lecture Notes in Comput. Sci., Springer-Verlag (1984), 63-72. [79] C. Levcopoulos, A. Lingas and J.-R. Sack, Heuristics for optimum binary search trees and minimum weight triangulation problems, Theoret. Comput. Sci. 66 (2) (August 1989), 181-203. [80] A. Lingas, The power of non-rectilinear holes, Proc. 9th Intemat. Colloq. Automata Lang. Program., Lecture Notes in Comput. Sci. 140, Springer-Veriag (1982), 369-383. [81] A. Lingas, Heuristics for minimum edge length rectangular partitions of rectilinear figures, Proc. 6th GI Conf. Theoret. Comput. Sci., Lecture Notes in Comput. Sci. 145, Springer-Veriag (1983), 199-210. [82] A. Lingas, C. Levcopoulos and J.-R. Sack, Algorithms for minimum length partitions of polygons, BIT 27 (1987), 474^79. [83] A. Lingas, R. Pinter, R. Rivest and A. Shamir, Minimum edge length partitioning of rectilinear polygons, Proc. 20th AUerton Conf. Commun. Control Comput. (1982), 53-63. [84] W.T. Liou, J.J.M. Tan and R.C.T. Lee, Minimum partitioning simple rectilinear polygons in 0{n log log n) time, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 344-353. [85] W.T. Liou, C.Y. Tang and R.C.T. Lee, Covering convex rectilinear polygons in linear time, Intemat. J. Comput. Geom. Appl. 1 (2) (1991), 137-185. [86] W. Lipski, Jr., Finding a Manhattan path and related problems, Networks 13 (1983), 399^09. [87] W. Lipski, Jr., An 0{n log n) Manhattan path algorithm. Inform. Process. Lett. 19 (1984), 99-102. [88] W. Lipski, Jr., E. Lodi, F. Luccio, C. Mugnai and L. PagH, On two-dimensional data organization II, Fund. Inform. 2 (1979), 245-260. [89] R. Liu and S. Ntafos, On decomposing polygons into uniformly monotone parts. Inform. Process. Lett. 27 (1988), 85-89. [90] R. Liu and S. Ntafos, On partitioning rectilinear polygons into star-shaped polygons, Algorithmica 6 (1991), 771-800. [91] E. Lodi, F. Luccio, C. Mugnai and L. PagH, On two-dimensional data organization I, Fund. Inform. 2 (1979), 211-226. [92] A. Lubiw, Decomposing polygonal regions into convex quadrilaterals, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 97-106. [93] A. Lubiw, The Boolean basis problem and how to cover some polygons by rectangles, SIAM J. Discrete Math. 3(1990), 98-115. [94] F. Maire, Polyominos and perfect graphs. Inform. Proc. Lett. 50 (1994), 57-61. [95] M. Manjuathaiah and D. Nicole, Accuractely representing the union of convex sections. Manuscript (1995). [96] W.J. Masek, Some NP-complete set covering problems. Manuscript (1979). [97] D. Moitra, Efficient parallel algorithms for covering binary images, PhD thesis, Dept. Comput. Sci., Cornell Univ., Ithaca, NY (1989). Technical Report TR-89-1013. [98] D. Moitra, Finding a minimal cover for binary images: An optimal parallel algorithm, Algorithmica 6 (1991), 624-657. [99] R. Motwani, A. Raghunathan and H. Saran, Perfect graphs and orthogonally convex covers, SIAM J. Discrete Math. 2 (1989), 371-392. [100] R. Motwani, A. Raghunathan and H. Saran, Covering orthogonal polygons with star polygons: The perfect graph approach, J. Comput. Syst. Sci. 40 (1990), 1 9 ^ 8 .

Polygon decomposition

517

[101] S. Nahar and S. Sahni, Fast algorithm for polygon decomposition, IEEE Trans. Computer-Aided Design of Integrated Circuits and Systems 7 (1988), 473^83. [102] B. Nilsson, Guarding art galleries, PhD tliesis, Dept. Comput. Sci., Lund Univ., Lund, Sweden (1994). [103] T. Ohtsuki, Minimum dissection of rectilinear regions. Proceedings of the 1982 IEEE International Symposium on Circuits and Systems, Rome (1982), 1210-1213. [104] J. O'Rourke, The complexity of computing minimum convex covers for polygons, Proc. 20th AUerton Conf. Commun. Control Comput. (1982), 75-84. [105] J. O'Rourke, The decidability of covering by convex polygons. Report JHU-EECS 82-4, Dept. Elect. Engrg. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1982). [106] J. O'Rourke, Minimum convex cover for polygons: Some counter examples. Report JHU-EE 82-1, Dept. Elect. Engrg. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1982). [107] J. O'Rourke, Polygon decomposition and switching function minimization, Comput. Graph. Image Process. 18(1982), 382-391. [108] J. O'Rourke, Art Gallery Theorems and Algorithms, Oxford University Press, New York, NY (1987). [109] J. O'Rourke, C.-B. Chien, T. Olson and D. Naddor, A new linear algorithm for intersecting convex polygons, Comput. Graph. Image Process. 19 (1982), 384-391. [110] J. O'Rourke and K.J. Supowit, Some NP-hard polygon decomposition problems, IEEE Trans. Inform. Theory IT-30 (1983), 181-190. [ I l l ] T. Pavlidis, Structural Pattern Recognition, Springer-Verlag, Berlin-Heidelberg (1977). [112] T. Pavlidis, Survey: A review of algorithms for shape analysis, Comput. Graph. Image Process. 7 (1978), 243-258. [113] T. Pavlidis and H.-Y Feng, Shape discrimination. Syntactic Pattern Recognition, K.S. Fu, ed., SpringerVerlag, New York (1977), 125-145. [114] D. Plaisted and J. Hong, A heuristic triangulation algorithm, J. Algorithms 8 (1987), 405^37. [115] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag, New York, NY (1985). [116] A. Raghunathan, Polygon decomposition and perfect graphs, PhD thesis. University of California at Berkeley, Berkeley, California (1988). [117] S. Ramaswami, P. Ramos and G. Toussaint, Converting triangulations to quadrangulations, Proc. 7rd Annu. Canadian Conf. on Comput. Geom. (1995), 297-302. [118] R. Reckhow, Covering orthogonal convex polygons with three orientations of dents. Report TR87-17, Department of Computing Sci., Edmonton, Alberta (1987). [119] R.A. Reckhow and J. Culberson, Covering a simple orthogonal polygon with a minimum number of orthogonally convex polygons, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 268-277. [120] J.-R. Sack, An 0(n log n) algorithm for decomposing rectilinear polygons into convex quadrilaterals, Proc. 20th AUerton Conf. Commun. Control Comput. (1982), 64-75. [121] J.-R. Sack, Rectilinear computational geometry, PhD thesis, School Comput. Sci., Carleton Univ., Ottawa, ON (1984). Report SCS-TR-54. [122] J.-R. Sack and G.T. Toussaint, A linear-time algorithm for decomposing rectilinear polygons into convex quadrilaterals, Proc. 19th AUerton Conf. Commun. Control Comput. (1981), 21-30. [123] J.-R. Sack and G.T. Toussaint, Guard placement in rectilinear polygons. Computational Morphology, G.T. Toussaint, ed., North-HoUand, Amsterdam, Netherlands (1988), 153-175. [124] B. Schachter, Decomposition of polygons into convex sets, IEEE Trans. Comput. C-27(ll) (1978), 10781082. [125] D.S. Scott and S.S. Iyengar, Tid - a translation invariant data structure for storing images, Comm. ACM 29 (5) (1986), 418^29. [126] M. Shapira and A. Rappoport, Shape blending using the star-skeleton representation. Manuscript (1994). [127] J. Shearer, A class ofperfect graphs, SIAM J. Algebraic Discrete Methods 3 (3) (1982), 281-284. [128] TC. Shermer, Covering and guarding polygons using l]^-sets, Geometriae Dedicata 37 (1991), 183-203. [129] TC. Shermer, Recent results in art galleries, Proc. IEEE 80 (9) (September 1992), 1384-1399. [130] T.C. Shermer, On recognizing unions of two convex polygons and related problems. Pattern Recognition Lett. 14 (9) (1993), 737-745. [131] V. Soltan and A. Gorpinevich, Minimum dissection of rectilinear polygon with arbitrary holes in to rectangles. Discrete Comput. Geom. 9 (1993), 57-79.

518

JM. Keil

[132] S.B. Tor and A.E. Middleditch, Convex decomposition of simple polygons, ACM Trans. Graph. 3 (1984), 244-265. [133] G. Toussaint, Efficient triangulation of simple polygons. Visual Comput. 7 (1991), 280-295. [134] G.T. Toussaint, Pattern recognition and geometrical complexity, Proc. Fifth Inter. Conf. on Pattern Recognition (1980), 1324-1347. [135] G.T. Toussaint, Quadrangulations of planar sets, Proc. 4th Worlcshop on Algorithms and Data Structures (1995), 218-227. [136] A.Y. Wu, S.K. Bhaskar and A. Rosenfeld, Computation of geometric properties from the medial axis transform in 0(n log n) time, Comput. Vision, Graph. Image Process. 34 (1986), 76-92.

CHAPTER 12

Link Distance Problems Anil Maheshwari*^ Carleton University, School of Computer Science, Ottawa, ON, Canada KIS 5B6 E-mail: maheshwa @ scs. carleton. ca

Jorg-Rudiger Sack* Carleton University, School of Computer Science, Ottawa, ON, Canada KIS 5B6 E-mail: sack®scs.carleton.ca

Hristo N. Djidjev Department of Computer Science, University of Warwick, Coventry, CV4 7AL, England E-mail: hristo @ dcs. Warwick, ac. uk

Contents 1. Introduction 1.1. Motivation and applications 1.2. Notation and definitions 1.3. Organization of this chapter 2. Sequential algorithms for link distance problems 2.1. Simple polygons 2.2. Link paths for polygons with holes 2.3. Rectilinear polygons 2.4. Rectilinear link paths among obstacles 2.5. Robustness issues in link distance computations 3. Parallel algorithms for link distance problems 3.1. Simple polygons 3.2. Rectilinear polygons 4. Applications and extensions 4.1. Movement of robot arms in bounded regions

521 521 522 522 522 523 531 533 536 538 539 540 542 547 547

*This work was supported in part by the Environmental Protection Agency grant R82-5207-01-0. ^Part of this work was done at the Tata Institute of Fundamental Research, Mumbai, India. •^This research was supported in part by NSERC (Natural Sciences and Engineering Research Council of Canada) and Almerco Inc. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved

519

520

A. Maheshwari

et al.

4.2. c-oriented paths 4.3. Approximating polygons and subdivisions with minimum hnk paths 4.4. Separation problems 4.5. Bicriteria shortest path problems 4.6. Nested polygon problems 4.7. Central link segment 4.8. Walking in an unknown street 4.9. Miscellaneous References

548 548 549 549 550 552 553 554 555

521

522

A. Maheshwari et al

An interesting aspect of the study of link distance problems is that often algorithms are more complex and/or have higher time complexities than those solving the corresponding problems for the Euclidean distance. One of the reasons for this is that in simple polygons the Euclidean path connecting two points is unique whereas this is usually not the case for a minimum link path.

1.2. Notation and definitions We are using standard notation and definitions. We assume that a simple polygon P is given as a clockwise sequence of vertices with their respective coordinates. The symbol P is used to denote the region of the plane enclosed by P, and bd(P) denotes the boundary of P.lf p and q are two points on bd(P), then the clockwise bd(P) from p to q is denoted by bd(p, q). Two points are said to be visible if the line segment joining them does not intersect the exterior of P (but might intersect bd(P)). The visibility polygon from a point X e P consists of all points y e P that are visible from x. A subpolygon of P is said to be a weak visibility polygon from a segment s if every point of the polygon is visible from some point of s. (Note that it is not necessarily the same point on s that sees all points in P.) Let SP{u, v) denote a Euclidean shortest path inside P from a point u to another point V. The shortest path tree of a polygon rooted at a vertex w, denoted hy SPT{u), is a tree containing Euclidean shortest paths from u to all other vertices of P. A Euclidean shortest path between any two vertices of a polygon is a polygonal path whose turning points are vertices of the polygon. If the polygon is simple, there is a unique shortest path between any pair of vertices. For details on shortest path characteristics, see Chapter 15 in this Handbook [75] or [41,56], and [84]. Throughout this chapter we assume that the simple polygons considered are triangulated. If required, an arbitrary simple polygon can be triangulated in linear time using the algorithm of Chazelle [12].

1.3. Organization of this chapter In this chapter, we will survey various link distance problems set in simple polygons, rectilinear polygons, and polygonal regions with holes. Sections 2 and 3 deal with sequential and parallel algorithms for link distance problems in Euclidean and rectilinear metric spaces, respectively. Section 4 deals with various applications and extensions of link distance problems.

2. Sequential algorithms for link distance problems In this section, we survey sequential algorithms for link distance problems in simple polygons (with and without holes), in rectilinear polygons, and among rectilinear obstacles. In Section 2.1, we describe algorithms for computing minimum link paths from a fixed source, for computing the link diameter, the link radius, and the link center, and for answering link

523

distance and minimum link path queries in a simple polygon. In Section 2.2, we survey the literature on link path problems in polygonal domains in the presence of polygonal obstacles. In Section 2.3, we discuss algorithms for rectilinear link distance problems, including the computation of rectilinear histogram partition, rectilinear link diameter and link center. In Section 2.4, we survey the literature on rectilinear link distance problems in rectilinear domains. Finally, in Section 2.5, we study robustness issues arising in link distance computations. (General robustness issues are discussed in Chapter 14 of this Handbook [75].)

524

A. Maheshwari

et al.

(a)

B

(b) Fig. 1. A window partition. The numbers indicate the Unk distance from s to any point inside that region. W{s) is the corresponding window tree.

525

induced polygon or simply, a window polygon. This procedure divides P into regions of equal link distance from s. The resulting partition of P is called a window partition of P with respect to s. The window tree W(s) denotes the planar dual of the window partition of P with respect to s, i.e., W(s) has a node for each region of the partition and an arc between two nodes whose regions share a window edge (see Figure 1). Before proceeding further, we analyze the complexity of computing a window partition and a window tree. In order to compute a window partition, we need to invoke visibility computations inside P from point s and weak visibility polygon computations from several window edges in P. Several 0(n) time algorithms are known for computing a visibility polygon from a vertex (see ElGindy and Avis [31] and Lee [57]), and for computing a weak visibility polygon from a segment (see Guibas et al. [41]), inside a simple polygon (see Chapter 19 in this Handbook [75]). A brute force approach requires computing a weak visibility polygon from each of the 0(n) window edges (in the worst case). Thus the worst case complexity for this approach is 0(n^). Suri [78] presents a more efficient method for computing all visibility polygons from the window edges. In his approach, only those triangles of the given triangulation, that (at least partially) belong to the visibility polygon are processed. In particular, if e is a window edge, then the visibility polygon of ^, V(e), is computed in 0(ke) time, where ke is the number of triangles of the given triangulation that have nonempty intersection with V(e). His algorithm is a modification of the algorithm of Guibas et al. [41] for computing shortest paths. Using Suri's algorithm, it is easy to see that the window partition is computed in linear time, since each triangle of the given triangulation can intersect at most three regions of the window partition. The algorithm of Suri, while computing visibility information, maintains the adjacency information, and thus the window tree can be computed in additional 0(n) time from the window partition. The above result is summarized in the following theorem. 2.1 (Suri [78]). Let P be a simple polygon on n vertices. Let s be a point in P. The window partition and the window tree of P with respect to s can be computed in optimal time and space @(n). THEOREM

Before we describe the solution to the three problems mentioned in this section, we need the following result on planar point location (see Chapter 10 in this Handbook [75]). A triangulated planar subdivision, containing n triangles, can be preprocessed in linear time by the algorithm of Kirkpatrick [51] to obtain a data structure such that, given a query point t, the unique triangle of the subdivision containing t can be located in O(logn) time. Using the window partition and the window tree data structures, the three problems formulated at the beginning of this section can be solved as follows. Let 5 be a fixed source point inside P. (i) Link distance query: given a query point t e P, determine the link distance between s andt Find the region R{t) containing t in 0(log n) time by applying the planar pointlocation algorithm. Using the window tree data structure, compute the depth of the

526

A. Maheshwari et al

THEOREM

527

w\ and W2, respectively, of the window tree. Let di{a, b) be the Unk distance between a and b and let g{w\, W2) denote the tree distance between w\ and if2- It can be shown that g{w\, W2) — l^dL(a,b)^g(w\, W2) + 3, and this results in an approximation of the link distance. This method can also be used to determine approximately the link distance between any two query points as follows. Locate the nodes of the window tree which contains the query points by performing point location in the regions which correspond to the nodes of the tree and then compute the tree distance between them. THEOREM 2.3 (Suri [81]). An approximate link diameter of a simple polygon can be computed in linear time, and it differs from the exact link diameter by at most two.

The link diameter problem is an example of a number of link distance problems for which it is often much easier and usually more efficient to provide an approximate solution than the exact solution. To compute the exact link diameter takes 0{n logn) time using a fairly complex algorithm developed by Suri [80]. THEOREM 2.4 (Suri [81]). The link diameter of a simple polygon can be computed in 0{n\ogn) time.

528

A. Maheshwari et al.

Next we describe how to reduce the time complexities of the link center and link radius problem from 0{n^)ioO{n log n). Three challenges arise: • The total number of vertices of the /?-neighborhood polygons for all convex vertices may be quadratic in n. • The actual computation of the 0(n) neighborhood polygons must be carried out more efficiently than by computing them individually in 6)(n) time each. • Finally, their intersection must be carried out efficiently. We sketch the approach taken by Djidjev, Lingas and Sack [25]. (An alternate approach has been proposed independently by Ke [49].) Firstly, a region is identified which contains the link center. This region is the 2neighborhood polygon of a particular diagonal which is, in some sense, "central" to P. To define the notion of central diagonal, consider that every diagonal induces two subpolygons in P, and denote by c/, Cr the maximum link distances to any point in the induced subpolygons. The quantities Q , Cr are called covering radii. A diagonal of P is called central if it minimizes (the absolute value of) the difference between c/ and Cr among all diagonals of a given triangulation of P. The following property has been derived for central diagonals: LEMMA 2.2 (Djidjev, Lingas and Sack [25]). In any simple polygon with link radius R a central diagonal exists for which both covering radii, ci and Cr, are at least R — 1. Furthermore, such a diagonal can be found in 0(n log n) time.

Before we describe the method for finding a central diagonal, we motivate this concept. For this, observe that convex vertices that are too close to the link center are irrelevant as