Approximate Minimum Weight Steiner Triangulation in ... - CiteSeerX

0 downloads 0 Views 210KB Size Report
It is shown that a polyhedron P of size n can ... a set of n triangles is triangulated conforming to the input triangles. ... When the lengths of the edges are taken as weights, he shows that ..... tetrahedron xyzw via the triangle xyz such that wx, wy,.
Approximate Minimum Weight Steiner Triangulation in Three Dimensions Siu-Wing Cheng

Tamal K. Deyy

Abstract

for their applications in ray shooting [3, 7]. A triangulation of a PSLG is the decomposition of the convex hull of its vertices where the input line segments appear as edges. When Steiner points are allowed these segments may appear as union of edges. Aronov and Fortune [3] observe that the technique of [8] applies to this case to produce a polynomial size triangulation approximating MWST within a constant factor. In the special case when the input PSLG is a polygon possibly with holes, Cheng and Lee [7] presented an algorithm with both size and running time O(n logn), where n is the number of edges. The triangulation of a point set in 3D is the decomposition of its convex hull into disjoint tetrahedra. The weight of the triangulation is the sum of the area of the triangles in it. Instead of point sets, the input may consist of a set of triangles with disjoint relative interior, a counterpart of PSLG in 3D. In this setting called general obstacle set, a minimum weight triangulation of the convex hull is sought where the input triangles have to be conformed. A special case arises when the input triangles form the boundary of a polyhedron whose interior is to be triangulated with minimum weight. Notice that the formulation of the minimum weight triangulation problem in these cases must allow Steiner points since there are arrangements of triangles in three space such as the boundary of Schonardt polyhedron for which no triangulation is possible without Steiner points [12]. We consider MWST problem for three di erent categories of inputs: polyhedra, point sets, and general obstacle sets. Of course, this leaves open the problem of MWT of a 3D point set since a point set can always be triangulated without Steiner points. Result on MWST problem in three dimensions is scarce. Eppstein, in his paper [8], acknowledges the dif culty of the problem and observes the obstacles in generalizing a method working in two dimension. When the lengths of the edges are taken as weights, he shows that the method can be modi ed to produce an O(logn)factor approximation to MWST of a point set. However, with areas of triangles taken as the weights, the method could not be generalized. Aronov and Fortune [3], building upon the technique of Eppstein showed how to produce an O(n6) size triangulation approximating the MWST of a general obstacle set. They argued that

Diculty of minimum weight triangulation of a point set in R2 is well known. In this paper we study the minimum weight triangulation problem for polyhedra and general obstacle set in three dimensions. The weight of a triangulation in three dimensions is assumed to be the total surface area of all triangles involved. It is shown that a polyhedron P of size n can be triangulated with O(n2 log n) tetrahedra in time O(n2 log 3 n) approximating the minimum weight triangulation of P within a constant factor. No such prior result is known. The same bounds also hold for a 3D point set triangulation allowing Steiner points. We consider another setting called general obstacle set, where the convex hull of a set of n triangles is triangulated conforming to the input triangles. In this case we show that our method produces a triangulation of size O(n3 log n) in time O(n3 log 3 n) approximating the weight of the minimum weight triangulation within a constant factor. This is a considerable improvement over the O(n6 ) bound known for this case [3]. It is shown in [3] that minimum weight triangulation is good for average case ray shooting in three dimensions. This further substantiates the signi cance of our result.

1 Introduction

The minimum weight triangulation (MWT) problem is most well-known in the plane, where a triangulation with the minimum total edge length is sought for a 2D point set. The problem is not known to be NPhard but no polynomial-time algorithm is known. Recently an approximation algorithm with constant factor performance guarantee has been designed for MWT by Levcopoulos and Krznaric [10]. In another version of the problem Steiner points are allowed and a minimum weight Steiner triangulation (MWST) among all possible Steiner triangulations is desired. In particular, MWT is also a Steiner triangulation but with zero Steiner points. Eppstein [8] showed how to approximate the MWST of a 2D point set within a constant factor. Instead of a 2D point set, general inputs such as planar straight line graphs (PSLG) have also been considered  Department

of Computer Science, HKUST, Hong Kong. email: [email protected] y Department of CSE, IIT Kharagpur, Kharagpur 721302, India. e-mail: [email protected]

1

2 approximate minimum weight triangulations in 2D and 3D are good for average-case ray shooting [1]. A simple approach for the ray shooting problem is to compute a subdivision of the complement of input obstacles so that each cell is of constant complexity and has at most a constant number of adjacent faces. Then the ray shooting query is answered by walking from face to face until the rst obstacle is hit [9]. Aronov and Fortune showed that a Steiner triangulation of small weight is good for ray shooting in the average case. The average is taken over all random choices of light source on the convex hull boundary or on the input triangles and over all random choices of ray direction. The average number of triangles visited is equal to the total surface area of tetrahedra divided by the total surface area of obstacle boundaries. This connection to ray shooting further substantiates the signi cance of the problem we are dealing with. In this paper, we improve the result of [3] in two directions. First, we consider inputs, namely, polyhedra and point sets whose requirement for triangulations is di erent from general obstacle sets. Secondly, we improve the existing bounds of [3] considerably. For a polyhedron of size n, our algorithm runs in time O(n2 log3 n) and returns a triangulation of size O(n2 log n). When the input is a 3D point set, complexities of our algorithm remain the same. The case of general obstacle set makes a di erence, wherein our algorithm computes an approximate MWST of size O(n3 logn) in time O(n3 log3 n). This is a considerable improvement over the previous O(n6 ) size bound obtained in [3]. Our O(n2 log n) size triangulation for a polyhedron is nearly worst-case optimal since there exists polyhedra for which any triangulation has size (n2) [6]. The size analysis of our triangulation for general obstacle set is almost tight since there exists a set of triangles such that our algorithm generates (n3 ) tetrahedra. It is open whether an approximate MWST for a general obstacle set can be constructed using O(n3 ), or even better o(n3 ), tetrahedra. There is an inherent di erence between the MWSTs of a polyhedron and a general obstacle set. A construction of [7] in 2D can be generalized to 3D to show that the weight of MWST of a polyhedron can be

(log n) times smaller than the weight of the MWST of the boundary triangles treated as a general obstacle set. The rest of the paper is organized as follows. Section 2 presents the basic de nitions and major three results. Section 3.1 describes our algorithm to compute an octtree-based subdivision of a given polyhedron. In Section 3.2, we show that the surface area of the subdivision is within a constant factor of the MWST of the polyhedron. Section 3.3 discusses how to use the

subdivision to produce an approximate MWST of the given polyhedron. Section 4 discusses the adaptation of our algorithm and analysis for triangulating a general obstacle set. We also represent a general obstacle set that forces our algorithm to generate (n3 ) tetrahedra. We conclude in Section 5.

2 De nitions and results

Let S, an obstacle set, be a set of triangles and their edges and vertices in R3 such that any two triangles are interior-wise disjoint and can meet only at their boundaries properly. Two triangles 1; 2 meet at their boundaries properly if 1 \ 2 is an edge or vertex of both. A 3D point set is a special case where triangles degenerate to points. An obstacle set S bounds a polyhedron P if the underlying space of S bounds a three manifold in R3. Notice that P can have more than one component and disconnected boundaries (voids). Our de nition requires P to have triangulated boundary. This is not a serious restriction since any non-triangular facet can be triangulated into linear number of triangles by any of the existing algorithms running in less than quadratic time. Let @X denote the boundary of a closed set X 2 R3 ; @P is the union of triangles in S which must be a 2-manifold. Triangulation of S has di erent requirements for its di erent types. A triangulation T of P is its decomposition into tetrahedra that are interior-wise disjoint and meet face-to-face. When S is a point set, a triangulation is the decomposition of its convex hull H with the input points as vertices. The triangles, edges and vertices of H are considered members of S. In case S is a general obstacle set, a triangulation T of S means a decomposition of its convex hull H such that the triangles in S are union of triangles in T . Again, in this case, the triangles, edges and vertices of H are considered members of S. Weight of T , wt(T ) is the total area of the triangles in it. An octtree is a hierarchical subdivision of a root cube in R3 . An internal node in the octtree is a cubic box B which is further subdivided into eight equal cubic boxes by three planes passing through the center of B. These eight boxes are the children of B; parent (B) denotes the node whose child is B. The leaves of the octtree constitute a nal subdivision of the root cube. Our algorithms are based on an octtree decomposition of the obstacle set. In a generic step of this decomposition a connected component X of P (for the polyhedron case) in a box is further subdivided using octtree decomposition if X is crowded as de ned precisely in the next section. Finally each component of P in the leaf boxes are triangulated compatibly. For general obstacle sets and point sets, P is replaced by

3 the convex hull H. In all cases let n denote the total number of triangles in S. We have the following three main results. Theorem 2.1. A triangulation T of a polyhedron P can be computed in time O(n2 log3 n) such that the number of tetrahedra in T is O(n2 logn) and wt(T )  c  wt(T 0 ), where T 0 is any Steiner triangulation of P and c is a constant. Theorem 2.2. Given a three dimensional point set

S , a triangulation T of S can be computed in time O(n2 log3 n) such that the number of tetrahedra in T is O(n2 logn) and wt(T )  c  wt(T 0), for any Steiner Figure 1: We illustrate a cross-section of the polyhedron triangulation T 0 of S and c is a constant. and the boxes. The shaded regions lie in the polyhedron Theorem 2.3. A triangulation T of a general obstacle interior. The two most shaded regions are the two set S can be computed in time O(n3 log3 n) such that the subpolyhedra at the center box. They have di erent number of tetrahedra in T is O(n3 logn) and wt(T )  zones and each zone is the union of the subpolyhedron c  wt(T 0 ), where T 0 is any Steiner triangulation of S with the surrounding region of intermediate shading. The subpolyhedron on the right is crowded as its zone and c is a constant. overlaps with two obstacle edges.

3 The polyhedron case

Theorems 2.1 and 2.3 suggest that a polyhedron can cell C normal if size (C) >  and small otherwise. Note be triangulated with fewer tetrahedra than the general that all small cells have the same size. We denote the obstacle set. This di erence is due to the fact that nal subdivision by SP (). each triangle in the polyhedron case separates \inside" from \outside" which is not necessarily true for general obstacle set. We describe the details of the subdivisions for the polyhedron case and later in section 4 point out the di erences adopted for the general obstacle set.

3.1 The subdivision. With proper scaling the polyhedron P can be assumed to lie inside a unit cube which is taken as the root box. Given any octtree box B, we denote its width by size (B) and the total area of its bounding facets by area (B). We call a connected component X of P \ B a subpolyhedron. The size of X, size (X), is size (B). An expanded box rB of B is the box with the center same as B and with width r times that of B. The zone of X, ZX , is the subpolyhedron of P \ 3B that contains X. For an apriori chosen constant , the subpolyhedron X is crowded if size (X) >  and @ZX overlaps with more than one obstacle edge. X is a cell if it is not crowded and the subpolyhedron of parent (B) containing X is crowded. In this case, we say that the cell X is created at B and call B the home box of X. See Figure 1. The box B is split if any of its subpolyhedron is crowded. Only the crowded subpolyhedra of B will be split with B. The cells created at B will not be split any further. See Figure 2. Note that more vertices may be put onto the boundary of a cell in the future when an adjacent crowded subpolyhedron is split. We call a

Figure 2: The center box is split by a horizontal plane and two vertical planes through its center. The crowded subpolyhedron on the right is split with it. The cell on the left is not a ected. There are two kinds of facets bounding a cell. We call those with interior on @P solid facets. The others with interior on the boundary of the home box but not on @P are called non-solid facets. SP () enjoys the property that adjacent cells have similar sizes. This resembles the \balance" and \smoothness" properties of other octtree-based decompositions [5, 11]. Notice that unlike the method of [5, 11] this balance property is achieved without any explicit

4 imposition of balance condition. This is motivated by Thus, SQ () has a larger weight and it suces to the decomposition technique in [4]. bound this. We rst need a few geometric properties of triangles and tetrahedra. The height of a triangle from Lemma 3.1. If two cells share a non-solid facet, then an edge e is the smallest distance of the vertex v from their sizes di er by at most a factor of 2. the line supporting e, where v is the vertex opposite to Proof. Assume to the contrary that two cells C1 and C2 e. share a non-solid facet but size (C2) < size (C1)=2. Let Lemma 3.3. A triangle t = abc with a disk of radius at X be the subpolyhedron of the parent of the home box least  inside it satis es the following properties. of C2 which contains C2 . Thus, size (X)  size (C1)=2. Since X is crowded, @ZX overlaps with more than one (i) area (t) = (2 ). obstacle edge. But since ZX  ZC1 , @ZC1 also overlaps (ii) Length of each edge is (). with more than one obstacle edge, contradicting that C1 is a cell. (iii) The height of t from any of its edges is (). Corollary 3.1. For any normal cell, no ve coplanar non-solid facets can lie on the same facet of its home Proof. (i) is obvious. (ii) can be seen by observing that there is a diameter of the disk parallel to any edge of the box. Thus, normal cells have constant complexity.

triangle. This diameter has length 2, and it cannot be

Proof. If a normal cell C has more than four co-planar larger than the edge to which it is parallel. To prove (iii)

non-solid facets on the same facet of its home box, then there is a cell sharing a non-solid facet with C whose size is less than half of C. This violates lemma 3.1. Lemma 3.2. All box facets lie on O(1=) planes. Proof. Initially the unit root cube contains P inside. There can be only O(1=) planes that dissect the unit width of the root cube to reduce it to less than  but more than =2. Thus all the facets of the boxes in the octtree over all levels lie on O(1=) planes. Corollary 3.2. Each obstacle edge can intersect no

more than O(1=) disjoint boxes over all levels.

3.2 Weight of the subdivision. In this section, we show that the weight of SP () approximates the weight of any Steiner triangulation T of P. To ease the analysis, we will bound the weight of a more re ned subdivision de ned as follows. We add all the edges of T to P to produce a new polyhedron Q. That is, Q is basically the same as P with the interior edges of T introduced as degenerate voids. Then we relax the conditions for crowdedness as follows: a subpolyhedron X is crowded if size (X) >  and @ZX overlaps with at least one obstacle edge, where  <  is chosen to be close to zero. This hypothetical decomposition will produce a subdivision SQ () in which all the small cells in SQ () together have small weight. This can be ensured by choosing  arbitrarily close to zero. The important observation is that SQ () is a re nement of SP (). This is because any crowded cell in SP () is also crowded in SQ () due to the presence of edges of T as degenerate voids and the relaxation of crowdedness conditions.

consider any vertex, say c of t and drop a perpendicular on the opposite edge ab. Let this perpendicular intersect the supporting line of ab at p. Either triangle cpb or cpa contains the center of the disk. Without loss of generality, let it be cpb. The diameter of the disk parallel to cp must be smaller than the length of cp which is the height of t from c. Lemma 3.4. Let r > 6 be a constant. Let abcd be a

tetrahedron satisfying the following properties. 1. Edges of abcd avoid box B . 2. An edge of abcd intersects rB . 3. abcd contains a triangle  with edges of length

(size (B)) and heights from each edge (size (B)). Then abcd contains an edge e intersecting 2rB so that a triangle t of abcd incident with e has area (area (B)) and height (size (B)) from e. Proof. Without loss of generality, assume that  = abc.

If any of ab, bc, ac intersects 2rB, then that edge satis es the lemma. This is because abc has area

(area (B)) and the height of abc from any of its edge is (size (B)) by the condition of the lemma on the triangle abc. Suppose this is not the case. Orient abcd so that abc lies on the xy-plane and d lies above the xy-plane. Project d vertically onto the xy-plane. We rst show that there is an edge e incident to d and a triangle t incident to e such that t has area (area (B)) and height (size (B)). Case 1: the projection of a triangle, say abd, contains abc. Then the projection of abd and hence abd clearly has area (area (B)). Consider the projection `

5 of the perpendicular from b to the supporting line of ad. If ` crosses the supporting line of ac, then ` has length at least the height of abc from b. See Figure 3(a). If ` does not cross the supporting line of ac, then bc must lie between the supporting line of ad and the parallel line through b. Thus, when we translate ` to become incident to a, ` will intersect the supporting line of bc implying that ` has length at least the height of abc from a. See Figure 3(b). Hence, we conclude that ` has length (size (B)) and so does the height of abd from ad. b

b l l

c

c

a d

d

a (a)

(b)

Figure 3: Illustration for case 1. Case 2: the projection of an edge crosses an edge of abc. Without loss of generality, assume that the projection of ad crosses bc. Furthermore, assume that the projection of abd contains the midpoint m of bc. Since the projection of ad crosses bc, it has length

(size (B)) and so does ad. Let ` be the projection of the perpendicular from b to the supporting line of ad. Suppose that ` crosses the line h through m parallel to ac. See Figure 4(a). This implies that ` has length at least the distance of b from h. The latter is half the height of abc from b which is (size (B)). Suppose that ` does not cross h. Shoot a ray s from m parallel to ` and into the opposite side of bc containing `. So s will be intercepted by ab and lies inside the projection of abd. See Figure 4(b). Since s lies inside the projection of abd, ` is as long as s. Since m is the midpoint of bc, s has length at least half the height of abc from c which is (size (B)). Thus, ` has length (size (B)) and so does the height of abd from ad. In all, ` has length

(size (B)) and so does the height of abd from ad. Also, clearly, abd contains at least one-fourth the area of abc and hence has area (area (B)). Case 3: d projects to inside abc. Without loss of generality, assume that the projection of abd has the largest area among the projections of triangles incident to d. So the projection of abd has area at least onethird of the area of abc. This implies that abd has area

(area (B)). Observe that the total length of ac and bc is larger than the total length of ad and bd. Assume that the projection of ad is shorter than the projection of bd. Assume that ac is longer than bc. Thus, ad is

b h

b l

d

c

a (a)

h

s

l

d c

a (b)

Figure 4: Illustration for case 2. shorter than ac. This implies that the projection of the height of abd from ad is greater than one-third of the height of abc from ac which is (size (B)). Hence, the height of abd from ad is also (size (B)). The above three cases imply that there is an edge, say ad, and a triangle incident to it, say abd, such that abd has area (area (B)) and height from ad is

(size (B)). If ad intersects 2rB, then we are done. Suppose not. By assumption, bd or cd intersects rB. Assume that it is cd. Consider triangle acd. Since cd intersects rB and c lies outside 2rB, cd has length

(size (B)). Since ac and ad avoid 2rB, the distance from any point in cd \ rB to ac or ad is (size (B)). Thus, acd contains a disk of radius (size (B)) and then the result follows from Lemma 3.3. Lemma 3.5. Let abcd be a tetrahedron containing the center of a box B and with edges avoiding B . Then there is a triangle of abcd that contains a disk of radius

(size (B)). Proof. Let o be the center of B. Consider the ball D of radius size (B)=2 with center o. If there is a triangle of abcd intersecting D and the triangle is at a distance less than size (B)=4 from o, then that triangle satis es the lemma. Otherwise, abcd must contain a ball of radius at least size (B)=4 centering o inside. Choose a direction to project abcd so that d is projected onto the interior of abc. The ball of radius at least size (B)=4 inside abcd is projected onto an ellipse inside abc and the ellipse contains a disk of radius (size (B)). Lemma 3.6. SQ () and hence SP () approximates the weight of T within a constant factor. Proof. The area of solid facets of the small cells can be

charged to the polyhedron boundary. The area of nonsolid facets of a small cell is O(2 ). By Corollary 3.2, each obstacle edge intersects O(1=) boxes and so there are O(n=) small cells. Thus, the total area of non-solid facets of small cells is O(2 (n=)) = O(n). This can be taken as a constant by making  arbitrarily small. So we focus on the normal cells. Notice that the boundaries of normal cells do not overlap with any obstacle edge.

6 Let C be a normal cell which is a box. Let o be the center of C. Let abcd be the tetrahedron in T that contains the center of C. All edges of abcd avoid C. Let r be any constant greater than 6. Case (1): Some edge of abcd intersects rC. Use lemma 3.5 to conclude that there is a triangle of abcd containing a disk of radius (size (C)). Then, apply lemma 3.3 and lemma 3.4 to identify an edge e of abcd intersecting 2rC and charge area (C) to the larger triangle incident with e. Case (2): The edges of abcd avoid rC. Let X be the subpolyhedron of the parent of C that contains C. Thus, @ZX contains a point v on an obstacle edge such that the line segment ov lies inside ZX . It follows from the de nition of ZX that 6C contains v. Visit the tetrahedra in T stabbed by ov in order starting with abcd (Figure 5). Since r > 6, we must eventually reach a tetrahedron xyzw via the triangle xyz such that wx, wy, or wz intersects 6C and edges of xyz avoid rC. We claim that xyz contains a disk of radius (size (C)). Thus, we can again apply Lemma 3.3 and then Lemma 3.4 to identify an edge e of wxyz intersecting 2rC and charge area (C) to the larger triangle incident to e. To see why xyz must have a disk of radius (size (C)) inside observe that xyz is stabbed with ov which lies inside 6C. Hence, xyz intersects 6C and at the same time its edges avoid rC. Since r > 6, there is disk of radius size (C) inside xyz centering the point xyz \ cv. We analyze the total charge accumulated by the larger triangle t incident to an obstacle edge e. When a normal cell C which is a box charges its area to the larger triangle incident to e, 2rC intersects e. Since 2rC intersects e, (2r+1)C either contains an endpoint of e or contains a line segment on e of length (size (C)). There is only a constant number of cells C (of the same size) such that (2r + 1)C contains an endpoint of e and their total surface area is (area (C)) which can be absorbed by O(area (t)). We can express the charge on the triangle t di erently for those cells C where (2r + 1)C contains a line segment on e. Let `C be the length of (2r+1)C \ e. The charge on t for a cell C can be written as O(size (C)`C ) since `C = (size (C)). Each point on e is charged this way no more than constant times per octtree level and so the total charge accumulated by t on an octtree level due to e can be written as O(size (C)  `) where ` is the length of e. Since the height of t from e being charged is

(size (C)) by Lemma 3.4, size (C)  ` is no more than O(area (t)). Now, summing over all the octtree levels, since the surface area of cells drops faster than geometrically, the total charge does not increase by more than a constant factor. Thus, the weight of T can absorb the surface area of all normal cells that are boxes.

b

v

a o d c

Figure 5: The cube is the normal cell C. The larger cube with two corners cut o is the subpolyhedron X of parent (C) containing C. The bold line segment represents an obstacle edge intersecting 6C. The tetrahedron abcd contains the center o of C. The sequence of tetrahedra stabbed by ov is shown. Walking along ov will visit these tetrahedra in order. Consider the surface area of a normal cell C that is not a box. Let  be a triangle in T bounding a solid facet of C. Let B be the home box of C. Since the edges of  must avoid 3B,  \ 3B has area (area (B)) and so we charge the surface area of C to  \ 3B. Each point on  lies in 3B for at most a constant number of boxes B at any octtree level. Thus,  receives a charge of at most its area per octtree level. Again, since surface area of normal cells drops faster than geometrically, we conclude that  accumulates a charge bounded by its area over all octtree levels. Thus, the total surface area of normal cells that are not boxes can be absorbed by the boundary area of Q which is the same as the boundary area of P. In all, we have proved that the weight of SQ () is bounded by the weight of T plus the boundary area of P. Since the boundary area of P is also included in the weight of T , we have the result.

3.3 Triangulating SP (1=n). In this section we con-

centrate on how to generate an appropriate triangulation out of the octtree subdivision. We set  = 1=n for subsequent descriptions.

7 Lemma 3.7. SP (1=n) has complexity O(n2 logn).

Proof. There are O(log n) levels in the hierarchy since

While triangulating small cells we ensure that the new Steiner points are not introduced on shared facets. To achieve this we shrink the triangulations in the cells. Let B be the home box of a small cell C. Shrink B to B where  < 1 is such that the region G = B ? B does not contain any vertex on solid-facets of C. In O(n) time  for all small cells can be determined. Compute T  = T \ B where T is a triangulation of C. This takes time linear in the size of T. The \gap" G is triangulated by joining similar corner edges and vertices of B and B and then triangulating each convex cell in G. Given that this shrinking can be performed, we discuss how to triangulate small cells. From each edge of P intersecting small cells we erect a vertical wall up or down and restrict it within each small cell by its boundary facets. See Figure 6. It is important to note that a single plane is used for all pieces of an edge present in pieces of small cells that are iteratively decomposed. This operation decomposes small cells into convex prisms that can be triangulated straightforwardly without increasing the asymptotic space complexity. Therefore it is sucient to estimate the increase in space complexity while introducing the vertical walls. Let e be an edge from which a vertical wall we has been erected. The new edges introduced by we are created by its intersection with other vertical walls, the facets of the home boxes of the small cells and the boundary of P. Since there are at most O(n) vertical walls erected, the edges created as a result of their intersection with we is no more than O(n). The edge e can intersect at most O(n) small cells and hence we intersects no more than O(n) facets of home boxes. However, these O(n) edges on the facets of the home boxes may further be divided by other walls. But, only O(n) extra pieces may be generated altogether with O(n) such walls. The rest of the edges created by we are on @P which cannot exceed O(n) since at most O(n) edges of we \ @P are further intersected by other vertical planes to produce no more than O(n) extra pieces. Counting over all vertical planes we obtain an O(n2) complexity for the vertical decomposition of the small cells and hence their triangulations. This gives the following lemma immediately.

 = 1=n. We are going to charge normal cells to obstacle edges and show that each edge receives O(n) charges per octtree level. Let C be a normal cell at some octtree level. Let B be the home box of C. If @C overlaps with an obstacle facet  that has a bounding obstacle edge e intersecting 3parent (B), then we charge C to e. Since  overlaps with at most one cell created at B, C is the only cell created at B charged to e. By Corollary 3.2, e intersects O(n) boxes at the octtree level of C. There is at most a constant number of boxes B at the same octtree level such that 3parent (B) contains a particular box intersected by e and so B charges to e. Thus, e receives O(n) charges this way at one octtree level. Suppose that @C does not overlap with any obstacle facet with a bounding obstacle edge intersecting 3parent (B). Let X be the subpolyhedron of parent (B) that contains C. So X is crowded and @ZX must overlap with at least one obstacle edge. @ZX must overlap with an obstacle edge e such that a point on 3parent (B) \ e is visible from some point in the interior of C. We charge C to e. We claim that e does not receive a charge this way from any other cell created at B. Otherwise, if two cells created at B charge to e, then they must be separated by an obstacle facet that cuts across 3parent (B) completely. But this would contradict that some points in the interior of both cells can see some points on 3parent (B) \ e. This asserts the claim. For a cell created at a box B to charge to e, B cannot be more than a constant number of boxes of the same size away from e. Using similar argument as before, we conclude that e receives O(n) charges this way at one octtree level. Hence, summing over all levels, the charges accumulated with all the obstacle edges is O(n2 log n) implying that SP (1=n) has O(n2 logn) normal cells. By Corollary 3.1, normal cells have constant complexity. Small cells that do not have any obstacle edge can be charged in the above manner and there is only a single level of small cells giving a total charge O(n2). Small cells also can be arbitrarily complex having one or more obstacle edges. Nevertheless, each obstacle edge intersects at most O(n) small cells by Corollary 3.2. Therefore, the Lemma 3.8. The extra weight of triangulating small complexities of small cells sum to O(n2). This completes cells is O(1). the proof. Proof. If nC denotes the complexity of the triangulation PC 2nC = of a small cell C, the weight is at most The normal cells have constant complexity. They 2 2 can be triangulated by adding constant number of trian-  n = 1. gles and tetrahedra but without any new Steiner point. This ensures that adjacent cells can be triangulated with 3.4 Time complexity. Subdivision of a box into its the same triangulation on the shared facets. eight children induce a subdivision of its subpolyhedra.

8 than O(n2 ). Therefore triangulating small cells take no more than O(n2 log n) time. Proof of Theorem 2.1: The size of the triangulation is O(n2 log n) since O(n2 logn) normal cells (Lemma 3.7) can be triangulated with constant complexity and the small cells can be triangulated with O(n2 ) complexity as described above. The claim on the weight for normal cells follows from Lemma 3.6 and the fact that each of the constant number of triangles in the normal cell triangulation has an area less than that of the cell itself. e Lemma 3.8 gives the weight of the small cells to be constant. The entire triangulation can be performed Figure 6: Edges in the shaded region are introduced by in O(n2 log3 n) time as argued above. the wall on e. 3.5 Point sets. The algorithm for polyhedra applies to the case of point sets with minor modi cations. ReEach such subdivision involves cutting subpolyhedra call that we are seeking a triangulation of the convex by planes of the box facets and rearrange the data hull H of the point set, which approximates the MWST structure for new subpolyhedra created as a result. within a constant factor. We proceed with the octtree If ni is the complexity of the subpolyhedron to be decomposition as described in the polyhedron case taksubdivided this can be carried out in time O(ni log ni) ing H as P. The condition for crowdedness is modi ed [6]. Since i ni = O(n2 logn) a straightforward bound to take into account the input points that may be in O(n3 log2 n) follows for the total time complexity to the interior of the convex hull. A subpolyhedron X is construct the subdivision. A more careful analysis crowded if size (X) >  and at most one obstacle edge gives a bound O(n2 log3 n) as we argue now. When or vertex intersects ZX . The normal cells again have a subpolyhedron is subdivided, the time complexity constant complexity and can be triangulated straightO(ni logni ) is charged equally to each of its ni faces forwardly as before. Triangulating small cells in this so that each face collects a token charge O(logni ) = case is easier since each small cell is convex with possiO(log n). Thus, a face builds up tokens of value O(logn) ble input points inside. Such a cell can be triangulated each over the entire subdivision process. Whenever a without using any Steiner point with linear number of face is subdivided it distributes its tokens among its tetrahedra. Thus, the question of compatibility does subdivided faces. We say that a face receives a token not arise, and the analysis of the size and weight of the from a home box of size x if the origin of the token is due triangulation for the polyhedron case carries through. to splitting of a subpolyhedron in a home box of size x. Hence, we have theorem 2.2. We count the total token value a face can possess in the nal subdivision. The crucial observation is that no two 4 Triangulating general obstacle set tokens on a face could have been received in the home In this section we sketch the method for triangulating boxes of same size. In other words a new token requires the convex hull H of a general obstacle set. The input that the home box be at least halved. Since there are triangles must appear as the union of the triangles in only O(logn) di erent sizes possible for home boxes, the the triangulation. This is the more general setting total number of tokens collected by a face is at most considered for ray shooting [2, 3]. O(log n) each of value O(log n). An O(n2 log3 n) bound on the total charge follows from counting the charges 4.1 Normal cells. In the octtree subdivision we take the convex hull H as the polyhedron and the edges of over all faces. Each normal cell is triangulated in constant time. the triangles inside the convex hull as degenerate voids. Small cells are triangulated with O(n) vertical walls. Each cell now is convex since they are the intersection The decomposition of small cells due to a vertical wall of convex hull H with the boxes. Of course each normal we can be computed again in O(ni logni ) time where cell can have pieces of input triangles inside them but at ni is the number of new edges introduced by we. We most one edge. This implies that each normal cell C is have already argued that i ni = O(n2 ) which gives almost decomposed into convex pieces by the triangles O(n2 logn) time complexity for small cell triangulation. running through it except possibly one that has the The time complexity for shrinking small cells is no more single edge of the obstacle. Each of these pieces of

9 C including the possible non-convex piece has constant complexity and the cell C has O(n) of them. Let B be the home box of C. To estimate the complexity of all normal cells we charge the complexity of C to the edge that is guaranteed to overlap the extended cell in 3parent(B). But, this time the edge may get an O(n) charge from C since its complexity could be O(n) instead of constant. Thus at each level of the octtree an edge may accumulate a charge of O(n) from each of the O(n) cells whose extended parents it overlaps with. This gives an O(n2 ) charge per edge and hence O(n3) per level giving a total of O(n3 logn) charge over all levels. The weight of normal cells without considering the triangle pieces inside them can be charged to the weight of any steiner triangulation T using same argument as in section 3.2. The areas of the triangular pieces can be charged to themselves since they are part of input obstacle set S. Hence the weight of all normal cells is charged to the weight of T . Also each convex piece and possibly one non-convex piece of a normal cell C can be triangulated with constant number of triangles and hence they can increase the weight of the cell by a constant factor only.

4.2 Small cells. Small cells are triangulated as before

with some modi cations. Let I denote the set of obstacle triangles that lie inside the convex hull H. While erecting vertical walls assume that the interior of the triangles in I are not present. However walls are erected up and down from their edges. This operation decomposes all small cells into convex pieces with O(n2) complexity. Triangulate these convex pieces with O(n2) complexity altogether. Now introduce the obstacle triangles in I that were not considered earlier. Existing tetrahedra are further subdivided into constant size convex pieces by these triangles. Each of these convex piece can be further triangulated without increasing the asymptotic space complexity. At most O(n) planes containing the box facets (Lemma 3.2) and O(n) vertical planes can introduce O(n2 ) new edges in each triangle. Counting over all triangles, we obtain an O(n3) space complexity for small cells. If we estimate the weight of the triangulations of small cells based on their size we get an O(n3  2) weight which is too large when  = 1=n. We estimate the weight di erently. Till we introduce the interior of triangles in I the total weight of the small cell triangulation is O(n2  2). When triangles of I are introduced the new triangles are created either on these obstacle triangles or inside the tetrahedral pieces. The total area of the rst kind is absorbed by the area of the obstacle triangles. The total area of the second kind

is absorbed by the area of the tetrahedral pieces since each of them is triangulated with a constant number of triangles. This weight altogether is no more than the weight of the triangulation before triangles of I were introduced plus the area of triangles in I. Therefore, the total weight contributed by the small cells is O(n2 2 ) plus the area of triangles in I which is bounded by the area of triangles in S.

4.3 Time complexity. The octtree subdivision takes 3

O(n3 log n) time. The charging scheme described in section 3.4 for polyhedron case can be applied here too. Each of O(n3 logn) faces in the nal octtree subdivision collects O(logn) tokens with charge O(log n) each. Adding charges over all faces we obtain the bound O(n3 log3 n). Normal cell triangulations cannot take more time than their size which is O(n3 logn). Small cells can be triangulated in O(n3 ) time. Vertical wall decomposition takes O(n2 log n) time as argued in the polyhedron case. Insertion of obstacle triangles can be carried out by a simple walk through the tetrahedra they pass through. This complexity cannot be more than the total number of new edges created by them, which we already estimated to be O(n3 ). Finally, the shrinking of small cells can again be done in O(n3) time. Proof of theorem 2.3: Combine the results in subsections

4.1, 4.2, and 4.3.

4.4 A bad general obstacle set. Figure 7 shows

a general obstacle set that forces our algorithm to generate (n3 ) tetrahedra. There is a stack of n congruent and parallel right-angled isosceles triangles. The two shorter sides of each triangle have unit lengths. The vertical spacing between two triangles is extremely small. On top of the stack is a column of n needles (i.e., long and thin triangles). Two needles are at distance 1=n apart. Put this con guration at the bottom of a unit cube. The column of needles will force splitting to proceed until the bottom layer of boxes has side length no more than 1=n. Thus, the bottom layer consists of

(n2) boxes. At least one-fourth of them are cut across completely by the stack of triangles producing (n3 ) cells. Hence, our algorithm will produce a triangulation of (n3 ) tetrahedra.

5 Conclusion

We presented in this paper polynomial time algorithms for approximating MWST of polyhedra, point sets and general obstacle sets in 3D within a constant factor. The results are either close to optimal or improve the existing bound considerably. Still, the question of approximating MWT of point sets without Steiner

10 sions for di erent weight functions would be a challenging task. Acknowledgments. The rst author acknowledges the support of RGC CERG HKUST 190/95E. The second author acknowledges the support of DOE through Univ. California under subcontract B341494, DST Govt. of India and Max-Planck Institut fur Informatik, Germany. Figure 7: A bad general obstacle set.

Figure 8: The weight of the MWST of boundary triangles is (logn) times the weight of the MWST of the polyhedron. points remains completely open. The case of general obstacle sets need further investigations. Examples such as in Figure 7 suggest that one cannot improve our analysis to o(n3 ) bounds. Does there exist di erent algorithms with such bounds? Example in Figure 8 points out another signi cant di erence between the polyhedron case and the general obstacle set. The polyhedron has two parts. The upper part is a rectangular box with unit side length and slightly less than unit height. The upper part is connected to a washboard structure with n rows. The height of the washboard structure is negligible. The entire object has unit height. By construction, the weight of the triangulation of the interior of such an object will be dominated by the weight of the triangulation of the rectangular box which is proportional to the area of the top face of the rectangular box. If we treat the boundary triangles as a general obstacle set, then the washboard will force the octtree decomposition to introduce (log n) horizontal planes cutting across the rectangular box. Thus, the resulting approximate MWST has weight (logn) times the area of the top face of the rectangular box, which is the dominating part of the weight of any triangulation of the polyhedron interior. Finally, extending the technique to higher dimen-

References [1] P.K. Agarwal, Range searching, CRC Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke (eds.), CRC Press, Boca Raton, 1997. [2] P.K. Agarwal, B. Aronov, and S. Suri, Stabbing triangulations by lines in 3D, in Proc. 11th ACM Symposium on Computational Geometry, 267{276, 1995. [3] B. Aronov and S. Fortune, Average-case ray shooting and minimum weight triangulation, in Proc. 13th ACM Symposium on Computational Geometry, 204{ 211, 1997. [4] S. Arya, S.W. Cheng and D.M. Mount, Approximation algorithms for multiple-tool milling, in Proc. 14th ACM Symposium on Computational Geometry, 297{ 306, 1998. [5] M. Bern, D. Eppstein, and J. Gilbert, Provably good mesh generation, Journal of Computer and System Sciences, 48 (1994) 384{409. [6] B. Chazelle. Convex partitions of polyhedra: a lower bound and worst-case optimal algorithm. SIAM J. Comput., 13 (1984), 488-507. [7] S.W. Cheng and K.H. Lee, Quadtree decomposition, Steiner triangulation, and ray shooting, in Proc. 9th International Symposium on Algorithms and Computation, 1998. [8] D. Eppstein, Approximating the minimum weight Steiner triangulation, Discrete & Computational Geometry, 11 (1994) 163{191. [9] J. Hershberger and S. Suri, A pedestrian approach to ray shooting: shoot a ray, take a walk, Journal of Algorithms, 18 (1995) 403{431. [10] C. Levcopoulos and D. Krznaric. Quasi-greedy triangulations approximating the minimum weight triangulation. Proc. 7th ACM-SIAM Sympos. Discr. Algorithms, (1996), 392{401. [11] S. C. Mitchell and S. A. Vavasis. Quality mesh generation in three dimensions. Proc. Eighth Sympos. Comput. Geom., (1992) 212{221. [12] E. Schonhardt. U ber die Zerlegung von Dreieckspolyedern in Tetraeder. Math. Annalen 98, (1928), 309{312.

Suggest Documents