increm.entally adding new vertices to T , in such a way as to avoid forming overlapping triangles or leaving "' holes" [8, 5~, 671. Then, they optimize. 7" by an ...
1 Introduction 95, :1,...,.>g :~ ,~:;e, :,. .f,./e.>$....> ~.:
Surface representations based on triangular grids Leila D e F1 ori a rd { ~ J t ~ t o pe.r I a M a t e m a t { r A p p i i c a t a - - - C.. N . R . , V i a L B . A~bcr!J 4 , [ - 1 5 1 3 2 G e n r e , a , l~.aIy
The proble:.n of represet~dng 2~/, dimen-siom:~l s,,~rfaces defined a t a se~ of r a n * domty located points by means of triangular grids ix considered. Such. represents.. dons approximate a surl:kme as a network of ph',.nar, {riangular times with vertices at the data points, In the paper we describe diI~k:rent models and data s~ru'.ctu.res f,,:a encoding triangular grids. Slate Dehiu:nay triangulatior~ provides a commot~ basis for many :medels of 2 ~/~ D surfaces, we review its basic properties and we describe the m o a important approaches t o its corn s{ruction, Hierarci.',ical suri-'ace models are also presemed, which are based on nested .. triangulatioris of t h e surface domah~ and provide variable resoh:.do~ surface repreo semations. A~ a.lgori~bm is d e s c r i e d [or bu.itdmg a hierarchical description of a ~ested trhmgulation at different levels of abstractic, n. Finally, the 3D surface retort. sU'uctio~:~ problem is briefly discussed. Key words: T:daagulatiou --- Surface m.odeis - - D a t a st.r.uctures--- G r a p h s - Trees ---A lgori~ trms
Surface representatiou plays an important :role in many diffi~ren.t application domains~ including comp.uter graphics, geographic data ro~':essim;, computer vision and computer aided desiga. I~ the last few years, a lot o f w o r k has Ix:eu done to solve the s:uri:ace reco:t~s~ructioa problem in 2~/: dimension.s, mainly %r applications to digital surface modeling. The proNem can be mathema {ically stated as that of interpolating a bivadate function when its values are given either a{ {he vertices o f a uniformly spaced grid or at a set of irregularly distributed poises in {be ,x----y plane. Defini:og a conveniem relational mode,'., for encoding the neighborhood relations am.oug the dam point pr~jections on the .x:--y plane is the grst step necessary ~o b~fild an effective surface representa-tion, When th.e surface is sampled at regular i m e > vals in. both of the coordinates, ~l~e ftmction values can be easily eacoded as a two-dimensional array [691. F.ven ii~ tiffs case, howeveL it is highly desirable to use a model which, adapts to the chaages in the roughness of the terrain and includes a set of "surfi~ce~specific" points, like peaks, pits or passes [7t ], which characterize the surface indepeadendy of tim data sampling and thus are usually irregularly distributed. Hence, a Triangulated Irregular Network (TIN) is ttm mos~ appropria{e and flexible topographic s'drface model, since it ap-. proxhnates the surface by means of a net:work of planar, non-overlapping and irregtflarly simped t m angular facets: The construction of this surface approximatior~ re&ices to the problem of computing a s~raight-:lhm graph m the plane, termed phmar triangulation, in which the data point projections are joined by line segments imersecting mad a~ theh" endpoints, An arbitrary tria~gu.lation may m:)t ,vpresent, in general, an acceptable solution for numerical ip,terpolation beta:use of tt~e elongated shape of i~.a triangles, ln'uitive!y, a "good ~' triangtflati~::n %T~interpolation purposes is oae in which the triangles are as equim~guh~r as possible, so as to avoid thin a~d elongated tria.r~gular facets [54, 5I], D e l a u n a y triangulation [73] is optimal with reSl::ect to the previous req~drements, aad thus has bee~ extensively used as a basis o f surli~ce models, Efficient algorit]nms %:r computii~g a two-dimensional Delaunay ~,esselation have been d.eveioped h~. the liters{m-e, When a large aumber of data points is available, a {riangulated irregular network joi,~.mg all the da{a can ~ highly iaeimcieut i:.', storage and for search and retrieval o~'.rations. Approxhnated surface models based on triangular grids have beer~ r
............ :
proposed [27, 37]. "l"hey provide surfitce represe~tations at predefined degrees of accuracy so as to achieve a reduction in the space complexity of the resukiag structure as well us to guarantee the capability of ti~e model to represent the surface whhi:,i certain error tolerances. Approximated surface models provide a good data compression mechanism to re&me the number of points used to represent a surface, but give only approximations at som.e fixed degrees of accuracy. Hierarchical models, on the contrary, can rep.resep.t a surface at variable resolution,, thereby allowing efficient access and manipulatioo of surface data at different levels of abstraction. Hierarchical structures have been l~sed in a wide range of appli.cation domains as models of point data, curves, planar regions and three~dimensioaal objects (see [781 for a survey). Hierarchical structures fbr variable resolution representation of 2 ' / 2 D surfs.cos have been recently proposed it~ the literature [9. 24, 42]. Such structures, which are based on nested triangulatio~s of the domain, combine the usefl~l [eatures of triangular grids for domain discretizatio:n with the advantages derivi~g from the use of a hierarchical model. A hierarchicM surface model consists of a tree describi~ag a T I N aud def?nes an order over the points of the given data set., which are sorted accordi~g to their contribution to represent the surfa.ce. In the paper we address the problem of building triangle-based models of 23/~. dimensionN surfaces defined st a set of randomly located points in the plane, mainly %r applications to tt~e representation of topographic surfi~ces in a geographic infbrm.ation system. Such m o d d s approximate a surface by a ~etwork of planar, triaugMar f'aces with vertices at the data. points, which are computed based on a triangular tesseIafion of the domain. In secti,.:m two, two graph models of a planar triangula.tion are briefly reviewed, while section three describes dill?rent e'..acoding structures fix a triangular grid. h~ section four, the basic properties of planar Delaunay triangu/atioa and the fundamep,.tal approaches to its coastruction are discusse& in particular, a PascaMike description of two incremental Delaunay triangulatio~ algorithms and of a well-kuowa asymptotically optimal oe,e ix presented. The problem of variable resolution represeatatio~ of a surface is coa.sidered in sectio:o five, which describes two hierarchical models based on a tevoary and a quateruary aested subdivision of the domain. A muhiresoh~tion surface represents28
tion based on a Delaunay tesselation is proposed as a~ attempt to overcome the intrinsic problems com~ected with hierarchical triaugular grids. Even if the scope of this stwvey is focused on 2 ~/~ dimen~ sional surfaces, we briefly discus,~ ..*h.e problem of surface reconstrvction in three dks The interested reader is. however, referred to the palx:rs mentioned in sectioo six fbr a more complete expo.sition of the 3D triangulatio~ problem.
2 Graph models of a planar triangulation An app~oxhnatio~)of a flmcdonM surf'ace by mea~'is o[" a collection of t:dangu]ar patches is based on a discretizafion of the surfhce dom.ain into a set of quasi disjoint triangles with vertices at the projections of the data points in tt~r .~----y plane. Intuitively~ a p/anal' ~riat,g,,dation ix a planar graph in which the pr~ectioos of the data points are pahwise .joined by line segmem~, which h~.tersect at most at their endpoims. More formally, if V denotes the given set of points in the plane (in surface interpolation problems, V will be the yet of the projections or, the data poiat.s oi~ th.e x - y plane), Pi, i= 1..2 .... n, a generic point of I.% sod U the set of the straight-.liae segments joining all pairs of points of V, thou a triangutation of V is a graph, T = ( V , E), where E is a maximal subset of U such that no two edges of E intersect except at their extreme vertices [63]. "/"is a plane connected graph [451, with the further property that each.~we of T (i.e., each region in the plane bouaded by a cycle whM;. does ~aot contain any edge of T inside) is a t.riangle. Being an euclidean graph, a triangulador,, has a unique representation in tt~e ; , ; - y plmm. On the other hand, there exist m.a~y possible triangulations of a set of poims, all formed by the same number of edges and tria~gles, h~ ti~ct, any phmar triangulatioa oi" a set V on ~ points, ~t~ of which belong to the conve~ hull of v, has exactly 30..~--1)----nb edges and 2 ( n - 1 ) - ~ b triaw hies [80]. An alternative graph, represeutatiou of a t:rhmgu.lar subdivision is provided by' the (,weak) dua.l graph of 2~ i.e., by a graph in which the nodes represent the triangles of T and the arcs the mutual adja.coney relations between pairs o[" triangles defined by ti~e edges of T. More formally, the dual representation of a plaaar triangulatio~ 7' is a graph 7'* ::: (N*, A*) such that
T:,>", >'~
. . . . . . . . . . . . . . . . .
(i) There exists a one4o-one correspondence between the elements of' N* and the Fiaaoles x , r of 7" (ii) For ever;/ pair of triangles t' and t" ia N*, the arc (t',t") belongs to A* if and only if ~' and t;' share a common edge, Hence. there is also a one4o-one correspondence between the edges of 7' and the arcs of T*, since two faces of" 7' may have at most one commor! edge. The above definition of weak dual graph is slighdy different f?om the canonical definition of duality r e p o s e d in [45I, since the external m> bounded face of 7" is nat represented by any node of T*. Nevertheless, T* is unique and thus uriah> biguously defines a triangular subdivision. Fig* are I shows an exainple of a triangulation mad of its dual representation. An important property of the dual graph representation of a triangular grid is related {o the problem of contou.r e~traction in topograpl~ic surface modeling. I f a surface S is approximated by a network T of planar triangles, theu a co,.tour ~ine of S o f level k is an ordered sz'quence of intersection points between the plane e ::::k and the triangular patches. I--lop.co. a contour defines a simple path [45] in tim dual graph iv* : an. open contour defines a shnple path joining two boundary triangles (i.e., two tri-
\'---..
....
=
I ~ \
\
"---42. . . .
-'
/
/
"~L ..........
.--,
;" ~,, ')~'
i(
a >~-~/7"
'.-..1"
j
t " ~. "
':,
"
!
-h2"~
a,agles having one side oa the bom~dary of the domain) whereas a closed one is a cycle in T*. Auy c o m o u r extraction algorithm can be expressed as a path-finding algorithm on T*. performing a depth-first search guided by the intersection points betw(~u each contour li-t~e and the triangular sat-face patches.
3 Data structures for encoding a triangular grid Vertices. edges and triangles a.re the three primitive topological enuties defining any ~:riangular subdivision on an orieataNe manifold. As in the gmmral case of an a r b i t r a ~ segmentation of" a surface into t~aces [90] ~ine possible retatio:~s can be defined l~tween pairs of primitive entities< as show~ in the arrow diagram depicted in l::ig. 2 [91]~ In ~his diagram., each arrow denotes an ordered relation between a pair of entities. In the special case of triangular subdivisions, each edge is unamb~guous.ly identified by its two extreme vertices and each. face is botmded by exactly thi ~ ed~,,~ and vertices. TMs simplifies the internal encoding o f a triangular grid as well as the correspoading struccure accessing algorithms. The topology of'a triangular subdivision is corm pletely and unambiguously represented by any suitably selected subset o f the sine mutuaI adjacency relations. A data structn:re for enc;xtiag a taangu.. Iation can be thought of as ~he cmnbinatkm of the three basic ~opological entities and a set of adiacency relati;:ms. Since encoding .:oo m a w re lauons increases die storage complexity of the data structure, it ,s ~.mportant to identif}' a minimal sub.. set of relations, capable of providing a sufficient topological representation and ofe~}surmg the ettidency of the basic structure accessing algorithms at the same time. The compk'xity of a dam s t r u t -
~. "-
:
~
k
'.._j
V
( ~; !'--,-(',F;
% / .f slats of a doubly ~inked list of edge records encod-. lag the Edge-Vertex. Edge..Edge and .Edge;friai:-gle relatio:~, its space complexi-y is S 4 ( n ) = 18n, since the two fractional Ve:,'tex-Edgc and Triat~gleEdge refations are -~c,t stored ip, the DCEI..~ HOw.ever, its time complexity T4(r,') is equal to 3k:+ 6* O(n), since only the three, reladon,_~ e~.coded can be retrieved in constant time. The edge.-ondered re~ presentation used by Kirkpatrick [48I is a DCEL structure extended with an explicit encoding of the Vertex-Edge relation as a set of ad~}acency subIists associated with the vertices. This ensures a fast access to the entities related to the vertices of a triangulation, which is required by the vertex elimi* nation strategy used in the point location algorithm described in [48]: The storage complexity of this structure, however, is 3:l.< and its time com.picxity is (;k-t-,3" O(n), Nnc,:" retrieving tlae trianglebased :relations may require a complete search over the entire list of tb.e vertices, The qua&,dge structure proposed by Guibas and Stolfi [44] for general subdivisions is similar to the D C E L structure when considered for planar triangular subdivisions. The quadedge sm~ctme provides an edge-based representation of a triangulation and of its gum graph. Each record describing an edge contains eight tSelds: four fields are used to store the immediately adjacem edges and the other {\.~ur correspond to the vertex and face pointers of the modified winged-edge structure [441. The storage complexity of the quadedge structure is 24~, whereas its time complexity is the same as that of the DCEL str:actm'e.
32
A triangle-based representation c~-mfl)ined with a hierarchical structure is used to encode va:dable resolution representatioE~.s of surfaces defined over partitions of d.teir domai~s iE~.t.o nested non-overhppi ;.g triangles [26, 42.t. These hierarchical representations are treated in more detail in s,~:.tion five. Edge-based representations are employed in con> bination with multilevel ceil s~ru.cmres, like the EXCELL. spatial directory [83i or the PM quad~ tree [781, to solve ~he point location problem in a pla~aar subdivision.
4 Two-dimensional Delaunay triangulation This section oufli,~.es the concept of Delaunay tria~gulation together with :its basic properties (Sect. 4.1). Aiso, it describes and classif)ea some of the l-andamemal algorithms proposed i~ the lit-erature tb.r building a Delaunay triangulation (Sect. 4.2). The imcres{ed reader is also referred to [44, 54~ 58, 801.
4. t Basic definitions and properties The p~oblem of findi~~g an opdmal triangulation of a set ~."ol'poi~ts in the plane among all ~eas o.:e ones has been considered by several authors for diffi~re~{ applications (.see [89] for a S'd:C~'ey)~ l:.~. communicadc, n problems,, the minimum.-weight triangulation, i.e., a {:dang:utation which minimizes tt;.e sm~3 of the weights associated with its edges, is requhed [63, 50, 64, 80], In s~,~face approximation p;~oblems, a criterion related to the si;~e of the angIes of the triangles f~~rmi.ng a triangulation is co~~sidered more appropriate, since it produces a tria:.~guladon, called D d a u n a y triangulation, in 9which the triangles are equkmgular as possible [5], It has been shown, by means of counterexample [63], that the Dela~may triangulation is not a mh'..imu:.n-weigh~ triangulation. The D d a u n a y triangutadot~ of a set V of points is usually def~.ed in terms c,f another geometric structure., the Voronoi diagram, which represe~ats the spatial proximity relationships amop, g the points of V. A G.,,,oswi diagram (sometin',es called Y)%iexsen ~esxela*.i(m3 of t/~ is a subdivision of the plane imo polygonal regions, each associated with
a point Pi of V and defined as the region which is closer to Pi tb.m~ {o any other point P./, ./< > i, belonging to V. A Vo,onoi region Ri associated wida a point Pi in V, called cen~e*"of Ri, is defined as
P,0
.... ().. i4/
where H(Pi, Fj) is the halgpiane containing Pi m~d bounded by the pe.rpen.dicular bisector of seg.-
ment 1}}"~/-~-}. Every Ri is a convex polygon, and also a Voronoi region is unbounded if and only /fits ce:oter lies on the convex hull of V. Two points .Pi, Pj in V are said to be ~-oronoi neighbons" if' and oniy if their Voronoi regions share a common side [75]. The dual graph of the Voronoi diagram is a planar graph ?"=(V, E), cal|ed the l-2.~.~:au,,,al:g,,as of V. such that E = { ( P i , P j ) { P i , s ii~ I", i < > j , and Pi and P/ are Voronoi neighbors}. The Delau.aay grapb explicitly represet~.{s the Voronoi neighbor.. hood relation indtmed by tt~e Voronoi diagram over the set V. T is called the l)ela~na.~, u'iangu/e~t&n of V if and only if every [ace o!" the Delaunay g:,'aph T :is a triav.gle. Otf~erwise, T can always be completed to give a Delau:nay triangulation of V by decomposing each c:i" its non-triae.gular faces i~to a set of non.-overlapNng triangles. Since each non-triaagular face can be triangulated in different ways, there are re.any possiNe tria.r~gnlations gener-. ated from the same D d a u n a y graph (.see Fig. 7). De/aunay {riaogo.lation satisfies some i~lteresting properties, which are used by {be algorithms which
i
x i
,, -4 ...z>, '\ ...."
, ,/
\...-
>. '. 1".. /.
i
"
\
"\
Fig~ 7, A Dciau my trJangul;~dou and its corfcspc,~;ding Vorosoi d{agrm:a
construct it. These properties are Woven and discussed m {54, 8I, 58]. A Delaunay mangulation satisfies tile ma;v-mi~ an,die cri:e;-'ior: 9 if' {lie diagonal of any strictly convex quadrilaterat formed by any two adjacent t~iangIes of a Delaunay triangulation is replaced by the opposite one, the minimum of the six internal av,gles does no~: increase. This rule car, be applied to any arbitrary uiangulation T to produce a Delaunay one. In fact. i.f {he repeated a.pplicatioo of the max-rain an~le criterion to each edge of T does not cause any edge swa.ppmg (i.e., every edge is [,.~ca?6: ~g~dmal), then T is a Delaunay t.rian~ulatio~, of V. This .property is called ~,qMangulariO., pgopero,. Furthermore, a triangulation T of a set V is a Delaunav triangu]a.. doo if and only if no point o f t.-" is interior to the circumcircle of any triangle o f T. This property is called c#che g~flation obtained forms a convex polygon at each step. Because of this property, it has been ~3sed also to triangulate arbitrary shaped domains in severn finite element mesh generators [20, 49,
761, The algorithms considered so far implicitly assume that all the data points are known in advance, and thus can be called static algorithms. Many appl.icatio~s [23, 3';;], however, reqt~ire the use of dynamic algorithms, which allow efficie~}{ updatings of the triangt~lation by insertion of new points, l.ncremen* tal algorithm belm~ging to this class are based on the stepwise insertion of the internal points i..'~ a De]sunny tria~.gulation [87, 44, I41. An initiM triangulatio~ of the domain can be obtained, ff~r instance, By c~eating a triangle etmlosing all the data points, which will be removed together with. all the triangles sharing a vertex with it at the et~d of the triangnla{ion process [871. Another approach consists of producing first a Delaunay triangufation of the points which define the domain boundary. "['he latter can be obtained, for instance, by triangulating the polygon defining the boundary of the domain and then optimizing it by means of standard optimization criteria~ An arbitrary triangulation of the boundary polygon B can be compmed in O(n log n} steps [2I, 40, 86i, if" B is a simple polygon, or in linear time, if B is convex (see [61] for a s~w~ey), An algorithm fbr computing the Delamaay trim~gtflation of a convex polygon is proposed in [291. h~. [221 a divide.-andconq,mr algorithm .ik~r triangulatit~.g a simple poly.. don is reported, wb.ich has an O(n log s) time complexity, where s is the smu.osity of the polygon, ~.e., the number of times its boundary alternates betwee~, complete spirals of opposite directions, Another method [br the Delaunay triangulatio~ of a simple polygon is described in [27], which is based on the computation of the visibility list of a vertex of a simple polygon [60] (according to the definition of constrained Delmmay triangula* tion given in Sect. 4.1) and has an O(n**2) time complexi ty. The second step --- point insertion --- iocates first the new point P in one of the triangular faces of the existing triangulation T and connects it to tb.e vertices of tb.e enclosing triangR. The new tria~g-u-lation is then optimized by iteratively applying the max-rain angIe crite:.'ion until ~o more edge swap.-
36
pings occur. This process is usuaily implemented by means of a stack, in which tim edges to be tested are placed i~ a counterclockwise order. It can be proven that the algorithm correctly compt~tes a De]sunny triangulation of the new set of points, since MI edges incident into the new point P intro-. duced during tim optimization process are Deiaunay edges and no edge is ever stacked twice [4@ The point insertion process is described by algorithm [NSERT._.POINT given beiow. Primi* tire EDGE_.ADJACENT...TRIANGLE (T.,t,e}, which returns the triangle of T sharing edge e with triangle t, and four classical primitives for stack manipulation (INFF .. STACK, IS... EMPTY _. STA.CK, PUSII, POP) are used in tim algorithm description. Alg~rRhm iNSERT.. POINT (P, T, B); / / P is the new point, T is the triang~fiation and B is {be boundary of' the d o m a i n / / if P is inside B the~t locate the triangle t of T enclosing P; tNIT__. STACK (.S'); f,}r every edge e of f not belonging to B do PUSH (S, e, t, E D G E .. ADJACENT~.TRIA N G L E (;~', t, e)) end .i~r; delete triangle ~; split t iE~.to three subtriangles tl. ~2 and g3 having point P as common vertex; repe~t POP(S, e, t !, t 2): let 0 be {he quadrilateral formed by gI and ~2, if edge ~:: in 0 must be swapped with the opposite diagonal e tJ~en delete triangles (! and ~2; insert {wo new triangles into ]-' by splitting ~ along e; f~r every edge e' of Q not incident in P do let ~!' and t2" be the *.wo triangles of T sharing e': PUSH(S, d, tl", f2') espy! for e~d if uritil IS_. EMPTY., STACK(S) e~ad if e~d INSERT...POINT. Fig~,re J 0 depicts the steps per%treed by algoriihm lNSERT__POINT when inse~ting a new point .P
:.,
' 5;i,
{ ;:er}mp{ {e o D
/7 //
//
\\ ;/
0
//?,
\\
"/
/
',,,
/ /
.._...-~
a
,,, -I"
%%
;
%
b ,,7
/ /
/".7.1//
'\
9
_
,, \
\
, / g
/ t"t"
\
"----.._\
!
\
B
1
};'ig, It}a---e, Upd:p:.mg a D d a t m a y m a ~ g i i l a t i o n as a c~3nseque.nce r the msertim~ o f .'-~r~e',,,: p,.,m [271 a Ii3}t'.:;~i :.ria~gulal.ion. b ir~:-,ertio:~ o f poLqi P. t" Sw-~pping o f side A F 4 Swapping of side f,B. e Swapping of ~{de B.D
into tile Delaunay triaag~flation of Fig. 10a. The algorithm, correctly updates a Delauna5 triangl~Iafion as shown in [44I. The identitTcatio~ of the tria~gie ~ enclosing the ~ew pom~ Y can ~ accomplished by using the li~ear point-in-triangulation algorithm proposed by Lawson [54, 58j. More efficient point-location algorithms, but requiring a preprocessmg step, as. fbr instance, those by Kirkpatrick [48] or by Lee a,~d Preparata [55, 56], can.not be applied in this situatio~ because of the ume complexity involved in the preprocessmg step. It can be proven [44] that the worst-case time complexity of the sevo~3.d step of the triangulation method (algorithm INSERT_. POINT)., is O (n**2 }. The worsbcase time complexity of the first step is O(nb**2), where nb is the number of pofi~ts on the boundary, In [14] an efficie~t implementation of a dynamic n-dimensional Delaunay triangulation algorithm is proposed, which is based on a new hierarchical smmture, the De,outlay ~ree. The nodes o f the Delaunay tree are triangles at different steps of the construction, hs leaf' ~mdes represent the triangles of the final. Delaunay triangulation. The bra,mbes in the De/aunay tree represent re]atim~ships betwc'en existing triangles and newly created ones. Given a ,row point P to be inserted i~ the Delauaay triangulatiot~ Ti produced at a step i, the Deiaunay ~ree is -ased to find the set of the triangles whose circumcircles contain P and then to create the ~ew
J
ldangles generated by the h~serfion of P in 77. It has been proven [14] thai the average case time complexity of" the resulting Delaunay triangulation algorithm is O ( n logn), since the ave~,ge number of ~mdes visited when locating a new point in a Delaunay tree b.'ailt on ~, points is O (log n). In. summary, all incremental techniques are s~bopfimaI. in the sense that they have a,~ O(~*'2) time comNexity in the worst case. They are usually easier to code nod require a limited ammmt of" storage. gh'.as, they can be sv.ccess.fullv used to process medi-mn size sets of data points. A classification of mcrememal De/aunay triangulation algorithms is reported h~. TaMe i. Dynamic Mgoritbms can be Table 1. Classification c4" h-~creme~.~tM I)ei.:mrsay tri:mg,Jia.~ioa a.ig..ovithms .5"m;~c ct&-orif~m.? Akima {t9761 Barr~h{]l ~19T7~ G o l d (] 977) Laws~'n (1977) McC~.dlltgt! { 1980} M[r (,976) M i r a n t e ar..d Wei.agar~.eu ~I982~ D'cs~ar,',i;: algoriff~sne."
Beisso~a* ~,1986} De FJefiaai. Falcid{e~o ;rod P*euovi {1985} G u i b a s and. S.'.oifi (1983} W a l s o e ~19S 11
37
adapted to deal with domains of arbitrary geometric shape, thus solving the constrained Delatmay triangulation problem [271. They are also especially appropriate when not all o f the data points are known in advance, since they produce a Delaunay t:dangulation covering the whole domain at each step. Such methods, when applied as a basis of surNce models, can produce a surfiace approximation. at a certain level of accuracy at each step, since the surface is approximated by a network of planar triangular patches constructed over a Delaunay triangulation of a subset of the given data. An incremental approach is also used by algo* rithms which compute the n-dimensional Delam~ay tesselatioa of a set of points [14, 36, 46, 87].
4,2,2 Divide:and=conquer algorithms Compared with incremental techniques, divideand-conquer algorithms require more storage space, bu.t are iv. general computationally more eft. ficient. The first triangulation algorithm based on this principle is tim one due to Lewis and Robinson [62], which can work also on domains of arbitrary shape. This algorithm, computes the final Delaunay triangulation ia two steps. At the first step, an arbitrary triangulation of a planar region R is computed by reenrsively sp!itti:og it into two subregions R I and R2 with an almost equal m~mber of points and solring the triangulation problem for R:i and R2 separately. Subregions are divided until {riangies with no interior points are .found, while each triangle containing interior points is iterativety split by joining each interior point to two of its vertices. The resulting triangulation is the~ optimized at the second step. Since both the recursive generation of a triangulation and the optimization step perform the task in O(n**2) operations, the worst-case time complexity of the algorithm is O(n**2). Lewis and Robinson show that the gener~ ation step reduces to O(~ h:.0gn) on the average. An asymptotically optimal Delam~ay triangulation algorithm is due {o Lee and Schacter [58]. Similarly ~o the Voro,~oi diagram computation algo:.'ithm proposed by Shamos [79, 80], the method by Lee and Schacter is based on the recursive splitting of the set of the data poin.ts and the pairwise merging of the triangulations separately computed, h~ th.e .foliowi~g, we give an i~%rmat description o[' tb.e algorithm.. A more detailed specification and a ccwrectness proof can be found in [44. 58]. Let V den-
38
ore {he set of data points. Then the algorithm per-. forms the following four steps: I. The points of V are lexicographicaily sorted in
ascending order in such a way that Pi= (.~i, yO~g P/={_vi, y 0 if and o:oly if either xi < .~;/, or xi,= xj and .vi4 in its. interior, the value FALSE otherwise. Algeri~hm M E R G E _.TR ~ANG U LATION (D T( V L), i) T( v R),, Base, Upper. D T(V)) ; / / D T ( V L ) and D T ( V R ) are the Delao~ay triangulations of V]_; and V.R;
/ I /
x Q..
,
-%
"%.
\
m~
/
" /!i k/ ii
\ \
/.~g /
K,
s
I ~/
Z~.Y
b
"-
~
.... .,
t\./\
~ "~-
~\\ /, , ~/ , .el". . . .
~ //
",
L?X &,'x)
\
\
"%
\
,~ It.
~' ~l
\X ~
"~-Q,L..j~"
. . . . . . . . . -";,,.
Base and Upper denote the {ower and the upper common ~angent respectively,: b T(H} :=:D 7-'1VL} ,,~ D T(f"R}; le~ P L and P R be the left and righl eadpoints of Base: while, B a s e < > Upper ~to add edge ( P L , P R ) to DT(V); P R' ".::::LAST(P R, PL.); i/delete the edges o F D T ( V R } wtfich are ~ot De~aunay edges in O T(V),.'/ if .PR' is above line Base- t h e ~ P R" ::=LASTIPR, P R') while ~mt CIRCLE._T EST (PR' PL, PR. PR"} d~ delete edge ( P R, P R'); pR',=pR"; P R " ~=LAST (PR. PR'~ e~ld w t f i l e :
P L' .-= N EXT(P L, P R); ; delete the edges of D T(VL) which are not I)elaunay cMges in D 7"1 V} / i f P L." is a hove line Base theT~ P L"==NEXT (PL, PL:} while n ~ CIR.CLE...TEST (PL, PR. PL'.PL,")d,o delete edge ( P L, P L' ) ; PL" : = P L " : P L " ' ~ = N E X T (PE, PL'}; e~l while: if PL' is below line Base er CIRCLE...TEST (Pl.., PR. PR'. PI..')
/ ;ampls ef a nested qua~.r triat~gulatior.,
to at most o'..ae triangle ot~ each side, whereas a triangle in a quaternary triangulation may have more than one adjacent triangle on a~y of' its sides. This different behavior plays an important role in numerical interpolation problems. A nested triangulation T can b e represented by a segmentation tree $7", in which the root corresponds to the initial enclosing triangle ~0, whereas any other node represm.~ts a triangular cycle in T res~Ating from the subdivision of the ~riangula'.," cycle in T corresponding to its pa:,'ent n.ode in NT. The ternfinal aodes of S 1" correspond to those triangular cycies of T which do not contain any other data points iuside~ i.e.~ to :the triangles of T, Decause of the di.fferent subdivision rules which define the two nested triangulations, a ternary triangulation is described b y a ten3ary tree, whereas a quaternary one by a t:rce in which every node has exactly K-mr children, and, hence, is also .re-
ferred to as a quadtreedike triangular tesselation. .Figures 14 and I5 show respectively the hierarchical representation of the two triangulatioas depicted in Fig. t2 and I3. Let S T be the tree representation of a nested triangulation T and tO the triangle corresponding to the root of ~.. A a y subtree ST" of SI" rooted at l0 satisJ)ing the following condition: if a node ,'. of S T be!ongs also S T', ther~ the sibliugs of t in S T are trades of ST" as well is termed a consi,stent s~r of $71. The recursive substitution o f each internal triangle of S T ; with the subtriangles correspm~ding to its child nodes in S T' results in a nested triangulation 7"" o f the same type as T o f a subset V' of V, which is a subgraph of T as well, This recursive substitution process is caked necm'.~ive e.,vpansio:~, since an expansion. ~s simply a :replacement of an interna| triangle in the ~:~v-e representing a nested triangulation with the subtriangles definin~ its first level subdivision. I-Ience, the recurslve expansioa of S T gives the nestc~t triangulation T. Algorithm. R E C U R S I V E .. E X P A N S I O N presented below describes the recursive expansion operator applied to a consisteat subtree S Y' of the tree represem:ng a aested triangulation. Algc.Mt~m RECURSIVE_..EXPANSION ( S T ' , ~. "I"): , .,',ST' is a cons~smnt subtree of .ST. t is tim c'drrent triangle: (t :=root mangle of S 7" at the firs..*, activation); T' is the resulting nested trianguiation ;
r. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
,%\ Fig. ~4. f r e e descriptioa of Q:,e tera.:lry triangulation depicted i~ Fig. 1..2
41
I /"
/
/
/ /
!
/
\ \
\
\\
I ~
'\.
\ . _\ .
/-
/ , , ....
I /'
I
\ '\.
\
\\
\..
\...\ ,
Fig. 15. Tree dee~ipt{,on of :.he quaternary triangula'~op, depic~cxJ in Fig. 13
(T;:::={root triangle of S T ' } at the first activation) / / .if not IS .. A_ L E A F _ T R I A N G L E (IS T', l) (he~i T,= 7" because of the fixed splitting rule which describes a nested triangulation. If T is a te'..'na:,-y triangulation, each graph component Gi of SG is a complete graph with three nodes (see Fig, 16a)< whereas, if Tis a q~mte> nary one, Gi is a graph with four nodes and three arcs (see Fig. 16b), si,me each p,.ode corresponding to a triangle and each arc describes an edge of the subdivision, UsiE~.g a. strvmtu.red graph representation for encoding a nesmd triangulation at different levels of abstract/on has beei~ demonstrated to be more economical in terms of storage than represeming it by means of a segmentation tree [25], also gvhei~ a pointe~less representation of both structures is ctmsen rather than a.i~ explicit one [781, The structured graph representation has also been exte,~ded to represent segmentations of surfaces into arbi.trarily shaped tSces at variable resolution [281.
/!, ," i X
/' \ /'
'.
/
/
.X
7...
"
/
", -k J -
~,
,
F'ig< I6. ,'~ Graph describ{ng the triangie subdivision i:~ a ternary lrial!gutation, b G:.aph describing the lda.nglc s~,~bdivisionin a quatefr~ary t_riangu/ation .......................................................................................
I. ,4~;flltTllllil{~f 5.2 Surface representations based on a nested triangulation A nested triangtflat]on can. be the basic domain discretizafion strncmre for building at variable res-. ohmon 2~/; D represealafion of a surface defined at a set of points h~. the .v----v plane. A variable resolution representation of a snrface allows th.e construction os surface approximations at different levels of accuracy. "['he concepts of approximation of a surface at a certain level of accuracy and of" error associated with a given surface approx,~.mation can be more formally defined as fbllows. Let S = { P i ! Y i .... (.~:i, yi, zfL i:,,, 1,2, ...,, r~} denote the set of given data points defining the surface s a d Eps a given fhresho/d val',.m. An approximazion of the sure?me at level Eps of accuracy can be defined as a Amction f(x. y) which satisfies the following lwo properties: (i) zi=J(.~cg).O %r every poiw. Pi in .5". wh.ere S" is the set of poio.ts o f S selected at level Eps of accuracy (ii) e(P.9< = E p s for every petal. Pi in S - N , where e(Pj) is tile interpolation error a{ Pj = (a:i, y L :