controllable single-strip generation for triangulated surfacesgopi/papers/pg04.pdf · est gradient...

9
Controllable Single-Strip Generation for Triangulated Surfaces M. Gopi Department of Computer Science, University of California, Irvine [email protected] Abstract In this paper we introduce a method to represent a given triangular model using a single triangle strip. Since this problem is NP-complete, we break the limitation by split- ting adjacent triangles when necessary. The common edge is split at the mid-point, and the newly formed triangles are coplanar with their parent triangles. Hence the resulting ge- ometry of the model is visually and topologically identical to the original triangular model. Our method can develop any edge-connected oriented 2-manifold of arbitrary topol- ogy, with or without boundary, into a single strip. Our strip- ification method can be controlled to start and end at tri- angles incident on specific vertices. Further, an acyclic set of edges of the input model can be marked as “constraint edges” and our method can generate a single strip that does not cross over these edges, but still cover the whole model. Keywords:Triangulation, Stripification, Hamiltonian paths and cycles, Path planning, Constrained path planning, Fun- damental cycles. 1. Introduction Constructing strips from the input set of triangles has been an active field of research in computer graphics and compu- tational geometry, primarily motivated by the need for effi- cient rendering in the former and by traveling salesman and Hamiltonian path problems in the latter. Traditionally, tri- angle stripification research has been pursued along two ex- treme problem statements. At one end, the input triangula- tion is considered to be unchangeable and algorithms have been designed to analyze if there is a Hamiltonian path in the triangulation or to get as few number of strips as possi- ble from the given triangulation (for example, [6, 4]). At the other end, the input triangulation is completely ignored, and a new triangulation is imposed on the input set of vertices in order to arrive at a single strip triangulation even if it re- quires addition of new vertices (for example, [10, 2]). The work presented in this paper tries to bridge the gap by com- bining the strengths of both extremes. It finds a single strip triangulation from the input triangulation by splitting the in- put triangles if necessary. At the same time, the geometry Figure 1. We can find a single strip, and using that fundamental cycles of surfaces with arbitrary topology and boundaries. Left: A double torus tra- versed in a single strip. Right: Its four fundamen- tal cycles. of the input model is also retained. Our motivation goes be- yond the rendering requirement and theoretical aspects of Hamiltonian path. The advantages of having a single tri- angle strip representation of a model enables a plethora of other geometric and topological algorithms to be applied on the model. In this paper, we show a by-product of our algo- rithm to compute fundamental cycles using discrete steep- est gradient method on the single strip on manifolds of ar- bitrary topology using total linear ordering of the triangula- tion. Main Contributions: The following are the main contribu- tions of the paper. We present a method to convert an edge-connected tri- angulated model into a single edge-connected triangle strip, without any preprocessing. We present a variation of the above method to con- trol the stripification process to avoid crossing over

Upload: others

Post on 20-Aug-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

Controllable Single-Strip Generation for Triangulated Surfaces

M. GopiDepartment of Computer Science,

University of California, [email protected]

Abstract

In this paper we introduce a method to represent a giventriangular model using a single triangle strip. Since thisproblem is NP-complete, we break the limitation by split-ting adjacent triangles when necessary. The common edgeis split at the mid-point, and the newly formed triangles arecoplanar with their parent triangles. Hence the resulting ge-ometry of the model is visually and topologically identicalto the original triangular model. Our method can developany edge-connected oriented 2-manifold of arbitrary topol-ogy, with or without boundary, into a single strip. Our strip-ification method can be controlled to start and end at tri-angles incident on specific vertices. Further, an acyclic setof edges of the input model can be marked as “constraintedges” and our method can generate a single strip that doesnot cross over these edges, but still cover the whole model.Keywords:Triangulation, Stripification, Hamiltonian pathsand cycles, Path planning, Constrained path planning, Fun-damental cycles.

1. IntroductionConstructing strips from the input set of triangles has beenan active field of research in computer graphics and compu-tational geometry, primarily motivated by the need for effi-cient rendering in the former and by traveling salesman andHamiltonian path problems in the latter. Traditionally, tri-angle stripification research has been pursued along two ex-treme problem statements. At one end, the input triangula-tion is considered to be unchangeable and algorithms havebeen designed to analyze if there is a Hamiltonian path inthe triangulation or to get as few number of strips as possi-ble from the given triangulation (for example, [6, 4]). At theother end, the input triangulation is completely ignored, anda new triangulation is imposed on the input set of verticesin order to arrive at a single strip triangulation even if it re-quires addition of new vertices (for example, [10, 2]). Thework presented in this paper tries to bridge the gap by com-bining the strengths of both extremes. It finds a single striptriangulation from the input triangulation by splitting the in-put triangles if necessary. At the same time, the geometry

Figure 1. We can find a single strip, and usingthat fundamental cycles of surfaces with arbitrarytopology and boundaries. Left: A double torus tra-versed in a single strip. Right: Its four fundamen-tal cycles.

of the input model is also retained. Our motivation goes be-yond the rendering requirement and theoretical aspects ofHamiltonian path. The advantages of having a single tri-angle strip representation of a model enables a plethora ofother geometric and topological algorithms to be applied onthe model. In this paper, we show a by-product of our algo-rithm to compute fundamental cycles using discrete steep-est gradient method on the single strip on manifolds of ar-bitrary topology using total linear ordering of the triangula-tion.

Main Contributions: The following are the main contribu-tions of the paper.

• We present a method to convert an edge-connected tri-angulated model into a single edge-connected trianglestrip, without any preprocessing.

• We present a variation of the above method to con-trol the stripification process to avoid crossing over

Page 2: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

given acyclic edge sequences. This has applications inconstrained path planning problems, in which edge se-quences are given as constraints that robots cannot passthrough.

• We extend our algorithm to control the stripificationprocess by forcing the strip to start at a triangle inci-dent on a given start vertex, cover the entire model,and end at another triangle incident on a given destina-tion vertex.

• We present a method to find fundamental cycles of thegiven model using the single strip representation.

In the following sections we briefly describe the relatedwork in this field (Section 2), explain our algorithm for sin-gle strip generation (Section 3) and finding fundamental cy-cles (Section 4). We also improve on our stripification al-gorithm to include constraints based on edges and source-destinations (Section 5).

2. Related WorkThere has been a phenomenal interest in the stripificationalgorithms trying to find longer and longer triangle stripsfrom the given model, primarily motivated by the need forefficient rendering. These stripification algorithms can becategorized based on their input requirements. The first cat-egory of algorithms takes only the vertices of the model asinput and finds a triangulation that would generate a sin-gle strip (e.g. [2]). The second category takes edges of apolygon as input and triangulates the interior of the poly-gon, with or without the addition of Steiner vertices, to cre-ate triangle strip(s) that covers the polygon (e.g. [10]). Typ-ically, these two categories work only with data sets on aplane or a height field. The third category takes triangles ofthe model as input and tries to build long triangle strips, notnecessarily a single strip, only using the input set of trian-gles (e.g. [6]). The third category works with 2D surfacesembedded in 3D.

The algorithm presented in this paper is a combination ofall the above three categories and create a single trianglestrip from the model. In the triangle strip generated by ourmethod, all the input vertices are used as in the first cate-gory, Steiner vertices and hence more triangles are added asin the second category, and finally, the geometry of the in-put triangulation is retained as in the third category.

Dillencourt [5] showed that finding Hamiltonian cycles inDelaunay triangulation is NP-complete. Since finding a sin-gle strip is equivalent to finding a Hamiltonian path, con-ceding to the hardness of the problem, many algorithms justtry to find as few a strips as possible from the input trian-gulation. A program that SGI developed [1] produces gen-eralized triangle strips. Its heuristic tends to create strips

that begin and end on faces with fewest number of neigh-bors in the triangulation, so as to reduce the number of iso-lated triangles. The classic STRIPE algorithm [6] makes aglobal analysis of the input triangle mesh, trying to findpatches that can be efficiently striped. Velho et al. [17] buildand maintain their triangle strips incrementally while creat-ing the triangle mesh simultaneously. [4] builds strips byreusing the points added to previous strips as often as pos-sible. Snoeyink and Speckmann [14] propose a stripifica-tion algorithm specially designed for triangulated irregularnetwork (TIN) models using the spanning trees of the dualgraphs of TIN models. [18] decompose spanning trees ofthe dual graph into triangle strips. Tunneling method for tri-angle strips in continuous level of detail meshes is proposedby [13]. Taking this a step further, [12] propose dynamic tri-angle strip management for view-dependent mesh simplifi-cation and rendering algorithms. Hoppe [8], and Bogom-jakov and Gotsman [3] investigate the ordering of trianglesin order to reduce the number of vertex cache misses and de-velop methods to find triangle sequences that preserves theproperty of locality. Triangle strips are also important in ge-ometric compression and transmission and is a by-productof these algorithms [11, 16]. Here again, the input triangu-lation is usually not modified.The hardness of the problem of finding a Hamiltonian pathcan be eased with minor variations of the problem state-ment. For example, algorithms presented in [2] avoid De-launay triangulation of the planar point set and create aHamiltonian path triangulation. Further, they also take a(planar) simple polygon, check using visibility graph ifthere exists a single strip triangulation of the interior ofthe polygon. If not, such a triangulation is produced usingSteiner vertices. They also prove that computing a Hamil-tonian triangulation for planar polygons with holes is NP-hard. The QuadTIN method [10] triangulates an irregularterrain point data set by adding Steiner vertices at the quad-tree corners to produce a dynamic view-dependent terraintriangulation that can be traversed as a single strip. Given aquadrilateral mesh of a manifold, Taubin [15] splits eachquadrilateral into triangles and orders them into a singlestrip. Gopi and Eppstein [7] construct single strip from atriangulated manifold by adding new vertices and trianglesusing perfect matching graph algorithm. But this algorithmworks for only manifold surfaces without boundaries andthe stripification is not controllable. Unlike the above meth-ods that take points on a plane or a height field or a quadrag-ulation as input, our method uses the triangulation, not justthe point set, of manifolds of arbitrary topology includingthe ones with boundaries. Further, even by adding new tri-angles, our algorithm does not change the input geometry(in terms of visual fidelity); whereas the above methods pre-scribe a completely new triangulation that includes the in-put point set. Our stripification is completely controllable

Page 3: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

Figure 2. Left turn and right turn.

and can follow the prescribed direction that satisfies certainconditions.3. Single StripIn this section we describe a few terms we use in this paperfollowed by a detailed description of our algorithm to createa single strip out of the input model.

3.1. DefinitionsTriangle Strip: A triangle strip is a linear sequence ofuniquetriangles each of which share a common edge withits neighbor in the sequence. During rendering, after issuingthe first three vertices to render the first triangle of the strip,rendering of every subsequent triangle in a specific orienta-tion requires just one additional vertex information. “Swap”commands are used to change this orientation. A sequentialtriangle strip is one that does not require a “swap” operationduring the traversal of vertices for rendering; non-sequentialstrips might need “swap” operations. In this paper, the tri-angle strips we generate might be non-sequential.Adjacent triangle: We consider two triangles to be adja-cent if they share a common edge, not just a common ver-tex.Striped triangle: A stripedtriangle is one that has alreadybeen included in the triangle strip; otherwise it isunstriped.Boundary edge:Since we consider only manifolds with orwithout boundary, every edge has either one or two trianglesincident on it. A boundary edge is one that has only one in-cident triangle, or has two incident triangles out of whichone is striped and the other is unstriped.Boundary triangle: A boundary triangle is anunstripedtri-angle with at least one boundary edge.Third vertex of an edge: The vertex that is opposite to anedge of a triangle is called the third vertex of that edge.Right and left turns: Inedgeof a triangle in a triangle

strip sequence is the edge shared by the previous neigh-bor in the sequence;outedgeis the one that is shared by thenext neighbor. In the counter-clockwise ordering of edgeswith respect to the normal of the triangle, if theoutedgeisthe next edge toinedgethen the triangle strip is said to havetaken aright turn; otherwise aleft turn (refer Figure 2). Thecorresponding adjacent triangles are called right neighborand left neighbor. The edge of a triangle that is neither itsinedge nor its outedge is referred to as thethird edge.Triangle-Split Operation: The fundamental and the only

Figure 3. The triangle split operation. Figureshows left and right splits. A split operation isused to isolate a vertex. To ensure such isolation,the strip grows in the same direction as the splitdirection.

geometric operation we do is atriangle-split. Given two ad-jacent triangles, we split these triangles by connecting thethird vertices of the common edge to the mid-point of thecommon edge (refer Figure 3). The rest of the stripifica-tion algorithm is about when the triangle-split operation isused.Split-candidate: An unstripedtriangle is a candidate forsplitting if exactly one of its edges is a boundary edge andthe third vertex of the boundary edge is also in a boundary(refer Figure 4). If a triangle is a split-candidate then a de-cision to split it or not is made based on the following clas-sification of split-candidates.Bridge triangle: (Figure 4) A split-candidateT is said to

be a bridge triangle if any path through the unstriped trian-gles from the left neighbor ofT to the right neighbor hasto pass throughT. In other words, removal ofT splits theunstriped region into two disconnected islands and henceT forms a bridge between these islands. Bridge triangles,when encountered while strip-growth, have to be split. Notsplitting a bridge triangle would leave a portion of the modelunstriped.Fundamental triangle: If a split-candidate is not a bridgetriangle, it is called a fundamental triangle. In other words,from the left neighbor ofT to its right neighbor, there ex-ists a path, which we call aparallel path, that does not passthroughT (refer Figure 4). We call these triangles as funda-mental triangles since they are the seed triangle to trace fun-damental cycles of the model; and theparallel path is ho-motopic to the fundamental cycle of the model. Presence ofa fundamental cycle implies presence of fundamental trian-gles; although, the converse need not be true. Fundamen-tal triangles, when considered to be included in the strip,shouldnot be split. Consistently splitting fundamental tri-angles would lead to infinitely long triangle strips. Moredetails are given in the following sections.3.2. Algorithm for Single Strip RepresentationHere we describe the basic algorithm for single strip genera-tion, followed by the cases in which it will not work and the

Page 4: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

Figure 4. Top Left: The template of the lo-cal neighborhood of a split-candidate triangle:only one edge and its third vertex are on theboundary. Split candidate is further classifiedinto bridge-triangle (bottom-left) and fundamental-triangle (right) depending on whether the un-striped region (white) is connected around thetriangle or not. Notice the identical local neigh-borhood (denoted by dashed lines) but differentglobal topologies of bridge and fundamental tri-angles. The unstriped (white) path connecting ei-ther side of the fundamental triangle is the par-allel path . Notice that the triangle connecting theboundaries of an one annulus (top-right) is a fun-damental triangle.

amendments to this basic algorithm to handle these cases.

Basic algorithm: The basic stripification algorithm choosesthe first triangle and collects a non-empty and unstriped ad-jacent neighbor as the next triangle in the sequence. Wehave two choices for the next triangle in the sequence – rightneighbor and left neighbor. If trianglei in the strip sequenceis the right neighbor of trianglei −1, then the right neigh-bor of i is chosen as the next triangle (i +1) of the sequence;otherwise left neighbor is chosen. If the edge in the direc-tion of the strip is a boundary edge then the direction is re-versed. This process continues till all triangles are striped.

Handling islands: Refer to Figure 5. Consider a bridge tri-angle T. Striping T might create two islands out of whichonly one island can be possibly traversed by the strip. Tri-angle split operation is applied on T and one of its right orleft adjacent neighbors toisolate V. The triangle split oper-ation creates two paths, one to enter and the other to exit anisland once the stripification of that island is complete. Thestripification continues in the same direction as the split ad-jacent neighbor of T. Note that going in the opposite direc-tion would create infinite triangle split operations.

Figure 5. T is a bridge triangle and is split to iso-late the third vertex V which is also on a bound-ary. T forms the bridge between two islands ofunstriped regions. After the split, one of the chil-dren of T acts as an entry to the island and theother acts as an exit. The stripification grows inthe same direction of the split to effectively iso-late V.

Handling non-zero genus models:There are situationswhen a split-candidateT need not create islands. Such split-candidates, as defined earlier, are called fundamental trian-gles. Fundamental triangles exist under one of the two cases– first, if the model is not a genus zero model; second, if themodel is a manifold with boundaries and the three verticesof a triangle belong to two or more different boundary loopsas shown in bottom-left of Figure 4. If T is a fundamen-tal triangle then it is included in the strip without any splitand the stripification continues in the same direction as be-fore. If the fundamental triangleT is split and the strip fol-lows theparallel pathto reach the other side ofT, this willtrigger another split ofT eventually leading to infinite num-ber of splits.

The actual pseudo-code of our algorithm is presented in Al-gorithm 1. This algorithm is guaranteed to generate singlestrip surfaces. There are no other special cases to handleother than that is described above. In Algorithm 1, thethirdedgeof a triangle is the edge that is neither an inedge or anoutedge (refer to Section 3.1).

Greedy turns: Every split adds two new triangles. If whilegrowing the strip, the right neighbor requires a split and theleft neighbor does not require a split, or vice-versa, we cantake a greedy turn to choose the appropriate neighbor andavoid the split. Such greedy turns have proved useful in han-dling triangulations where two islands of triangles are con-nected by a single strip of triangles. Greedy turns are usedonly to reduce the number of splits and not required for the

Page 5: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

Boundary Edges

Rest of the model

Cavity

Figure 6. The split-candidate has to be classifiedas a bridge or fundamental triangle. If the searchfor the left neighbor starts at the right neighbor,the search would end immediately. On the otherhand, if the search starts in the left neigbor, thenthe time taken is proportional to the complexity ofthe unstriped model region. So a local search forcavities is encouraged to improve the efficiency ofthe stripfication.

Algorithm 1 Generate Single StripChoose a seed triangleT.T.SetStriped()Set T.outedge to be a non-boundary edge.Set default direction.while there exists an unstriped triangledo

if IsBoundaryEdge(T.outedge)thenT.outedge = T.thirdedge;

elseGreedyTurnCheck(T){Optional}

end ifif IsBridgeTriangle(T.neighbor(outedge)then

splitNeighbor = T.neighbor(outedge).neighbor(outedge).Split(T, splitNeighbor)

end ifT = T.neighbor(outedge)T.SetStriped()

end while

correctness of the stripification algorithm. Pseudo-code ofthis algorithm is given in Algorithm 2.

Implementation insights: In the above algorithm, the im-plementation to check if the given triangle is a bridge trian-gle is the important step. We have implemented this usingdepth first search among only the unstriped triangles withthe left neighbor as the root and the right neighbor as thesearch target. In certain straight forward cases, this searchcan be avoided by a local search for “cavities” formed byboundary edges (Figure 6).

Algorithm 2 GreedyTurnCheck(T)if IsBridgeTriangle(T.neighbor(outedge))andnot IsBoundaryEdge(T.thirdedge)andnot IsBridgeTriangle(T.neighbor(thirdedge))then

T.outedge = T.thirdedge;end if

Figure 7. Single Strip Surfaces: Fandisk is genus0 with 12946 input and 16630 output triangles;Face is a three boundary, genus 0 object with 2918input and 3668 output triangles; Goblet is genus 0with 1000 input and output triangles; Shell is a oneboundary, genus 0 object with 1680 input and 1710output triangles. The double torus used in Figure1 has genus 2 with 1536 input and 1642 output tri-angles.

Though we do not take any clues about the topology ofthe object as input in our implementation, we suggest us-ing such information to avoid the above search in the fol-lowing cases:(a) The search is not necessary for an object with genuszero, since all split-candidate triangles are bridge trian-gles. In other words, there are no fundamental triangles andhence no fundamental cycles for a genus zero object.(b) This search is also not necessary for a mesh homeomor-phic to a disk if the first seed triangle of the strip is a bound-ary triangle. On the other hand, if the seed triangle is an in-

Page 6: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

Algorithm 3 InitiateFundCycle(Triangle T){ T is a funda-mental triangle}

Add T to cycle C.Let D be the adjacent neighbor of T with the largest indexin the linear ordering.Let S be the adjacent neighbor of T with the secondlargest index in the linear ordering.{S is the source ofthe fundamental path and D is the destination}Add S to cycle C.SteepestGradientAscent(S, D, C)return C;

terior triangle, the edges of this triangle form a boundaryedge cycle in addition to the original boundary cycle of thegiven model (a case similar to one-annulus in Figure 4 ex-cept that the interior of the annulus is “striped” instead ofempty). This is one case when there might be fundamen-tal triangles but need not translate to the presence of funda-mental cycles.

3.3. Analysis of the algorithmThe algorithm presented in the paper has time complexity ofO(nlogn) average time complexity andO(n2) in the worstcase. If the topology of the object is a sphere topology andis known apriori, then the complexity of the method can bebrought down toO(n).

A triangle is split only if it is a bridge triangle. Once a bridgetriangle is split, none of the new triangles is a bridge trian-gle. Every split creates two new triangles. If the number ofinput triangles isn then at mostn triangles can be bridgetriangles and the number of new triangles is at most 2n.This analysis assumes algorithm with the greedy approachin strip traversal.

Our implementation takes less than half a second for thefandisk model which has 12946 input triangles and 16630output triangles, a 28% increase in the number of triangles.The genus two double torus model has a 6% increase intriangle count, genus one torus has 19% increase, and thegenus zero head model with three boundaries has 25% in-crease in the triangle count (Figure 7). All these modelshave less than 4000 output triangles and took less than 0.3seconds each. The timing measurements were taken on a667MHz PowerPC G4 with 512MB memory. Though ourmotivation for generating a single strip is not just render-ing, [12] have shown that anything less than 33% increase inthe triangle count can be compensated by the improvementin the rendering performance achieved by a single strip.4. Computing the Fundamental CyclesAn interesting application of our basic single stripificationalgorithm is computing the fundamental cycles. Fundamen-tal cycles are used in finding the topology of the object. Fun-damental cycles are generators of any closed loop on the

Algorithm 4 SteepestGradientAscent(Triangle S, TriangleD, Cycle C)

if S==D thenreturn;{Reached the destination}

end ifLet M be the adjacent neighbor of S with the largest in-dex but less than that of D’s index.Add M to C{Steepest gradient ascent to reach D}SteepestGradientAscent(M, D, C)return;

surface. Hence an algebraic combination of these loops canbe “morphed” without cutting the cycle to any closed loopon the surface. Finding fundamental cycles have many ap-plications in graphics including texture synthesis on mani-folds, conformal texture mapping, 3D morphing, geometryimages, etc.

As mentioned in Section 3.1, the fundamental triangles thatare identified during the stripification process are chosen asseed triangles to find the fundamental cycles. The only con-straint that we impose on the stripification algorithm in or-der to find the correct fundamental triangles is to start thestripification with a boundary triangle, if any, as the seedtriangle. The most important aspect of single strip represen-tation is that there is a total linear ordering of triangles. Weuse this linear ordering to find the shortest path along thestrip to get the fundamental cycle. We number all the trian-gles in the order of their appearance in the single strip rep-resentation. Any triangle in the strip will have the index onemore than that of its adjacent triangle along theinedgeandone less than that of its neighbor along itsoutedge.

By definition, for every fundamental triangleT there is apath from one of its side to the other not passing throughT. Hence the single strip representation of the model con-sists of a strip segment from theoutedgeneighbor ofT tothethird-edgeneighbor ofT and this segment does not con-tain T. Along with T, this strip segment becomes a cycle,the fundamental cycle. We use the linear ordering of trian-gles to follow a steepest gradient ascent approach to reachthe destination quickly. This cuts off unnecessary portionsof the strip resulting in a “cleaner” fundamental cycle. Thepseudo-code of this algorithm is given in Algorithm 3.

For a manifold with genusg and for a manifold with bound-ary derived from that, there are 2g and 2g+h−1 fundamen-tal cycles respectively, whereh is the number of connectedboundary loops on the manifold. For a double torus withgenus two, there are four cycles and for the “head” modelwhich is derived from a sphere (g = 0) by creatingh = 3boundaries, there are two fundamental cycles as shown inFigures 1 and 8.

Page 7: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

Figure 8. Fundamental cycles of torus (genusone) and face (genus 0 and three boundaries).They have two fundamental cycles each. Noticethe effect of the steepest gradient ascent methodby which fundamental path “jumps” across stripboundaries (highlighted in the torus) thus cuttingoff unnecessary strip triangles to find a shorterpath to complete the loop.

5. Constrained Single StripificationThe stripification algorithm presented in Section 3.2 can bemodified to take into account different constraints imposedon the required strip. Here we describe two such constraintsand appropriate changes that has to be done to the input andalgorithm to handle these constraints.5.1. Edge Constrained StripificationIn robotic path planning applications, a single strip repre-sentation of the space that the robot has to cover can beused to plan the path. Further, there might be obstacles inthe space that the robots have to avoid. These obstaclescan be represented as a two dimensional region or a one-dimensional edge sequence. If the obstacles are regions,these regions have to be cut out from the input space sothat they are not traversed by the strip. This makes the in-put space manifolds with boundaries. Since our stripifica-tion algorithm can handle surfaces with boundaries, we canavoid two dimensional “prohibited” regions during stripi-fication. However, in the case of one dimensional obsta-

Figure 9. Top Left: Single strip without the edgeconstraint. Top Right: Single strip of the same in-put mesh with the edge constraint (blue). The stripdoes not cross over this edge. Bottom Left: Singlestrip of the same input mesh with constraint ondestination vertex. Bottom Right: Result with bothedge and source-destination constraints.

cles, we mark those edges as boundary edges and the trian-gles incident on them as non-adjacent triangles. This makessure that the crossover of these marked edges by the strip isavoided. An example of the result of imposing such an edgeconstraint and the resulting stripification is shown in Fig-ure 9.5.2. Source-Destination Constrained StripificationGiven a source and a destination vertex, the strip can be con-trolled to start and end in triangles incident on the given ver-tices. Since we use the triangle split operation, in the courseof strip generation, uniqueness of triangles is lost. So toavoid ambiguity, we define source and destination verticesrather than triangles. It is easy to start the strip at any ver-tex, and our stripification algorithm can take any seed tri-angle, including a triangle incident on the start vertex. Butit is difficult to end the strip at a given vertex and appro-priate modifications have to be done to our algorithm to ac-commodate this change. The idea is to carve out a path fromthe destination vertex and when the growing strip from thestart vertex reaches the “mouth” of this pathafter cover-ing all the other triangles, the strip grows into the path andfinally reaches the destination vertex. In other words, thestrip can enter the “mouth” of the path only if both the stripand the path have no other adjacent triangle to grow. Let uscall the triangles that carve out the path from the destina-tion aspath-triangles. In every triangle along the path fromthe destination vertex, we maintain fields to point to the pre-

Page 8: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

Figure 10. Illustration of the source-destinationconstrained algorithm: Marked vertex is the cho-sen destination vertex. Triangles 1 and 2 are firstpath triangles. Strip starts from 9, goes to the restof the mesh and stripes 4. This makes 2 a bound-ary triangle, and hence 3 becomes the path trian-gle. Continuing, when 3 becomes the boundary tri-angle 8 becomes a path triangle. Since 7 does nothave any other triangle to grow the strip, 3 and 8and split. Note 8, and not 2, is chosen for the splitsince 3’s to-triangle is 8 and hence is farther fromthe destination. Once the strip reaches the last tri-angle 8 both the strip and the path do not haveany more triangle to grow and hence the strip en-ters the path striping the triangles on its way tothe destination.

vious triangle in the path, thefrom-trianglefield, and thenext triangle in the path, theto-triangle field. The first tri-angle in the path will have a NULLfrom-trianglefield andthe last triangle will have a NULLto-triangle field. In thefollowing description, we refer to the path from the desti-nation as justpath. Here we describe our algorithm to growthe path and the strip. We suggest referring to Figures 10and 11 whenever necessary. Choose a triangleT1 incidenton the destination vertex that has an adjacent triangleT2that is not incident on the destination vertex. The trianglesT1 andT2 are our first twopath-trianglesand they are as-signed as the first and last triangle of thepath respectively.When thepath grows, a triangleTn+1, adjacent to the lasttriangleTn of the path, is added to the path ifTn is a bound-ary triangle andTn+1 is unstriped. In other words,Tn+1 is theonly way for the strip to reachTn and hence, by induction,to the destination vertex. In Figure 10, Triangles 3 and 8 areadded to the path when Triangles 2 and 3 become boundarytriangles respectively. Thus, after the inclusion of first twotriangles, the path from the destination vertex grows onlywhen the strip from the source grows and comes in con-tact with the last triangle of the path and makes it a bound-

Figure 11. Triangle on the bottom-left is a stripedtriangle and the dark triangles are in the pathcarved from the chosen destination. The dashedarrows show the direction away from the destina-tion. When the strip has no where to grow, theadjacent path triangle and the path-triangle thatis farther from the destination are split, and thepath is re-routed. Two cases of path-rerouting isshown. The newly formed white triangles are un-striped triangles.

Algorithm 5 PropagatePath(Triangle T)if T is not apath-trianglethen

returnend ifif T is the last triangle of the paththen

if T is a boundary trianglethenif there exists an unstriped neighborN not in thepaththen

AddToPath(N) {This should also set to- andfrom-triangle fields ofT andN appropriately}PropagatePath(N){Call this function recur-sively}

end ifelse

return;{ T is the last triangle, but not a boundary tri-angle}

end ifelse

PropagatePath(T.to-triangle){T is a path triangle, butnot the last triangle}

end ifreturn;

ary triangle. The pseudo-code of the above propagation al-gorithm is given in Algorithm 5. Now we have to deal withthe situation when a growing strip comes in contact with thepath-triangles. A triangle strip grows when a new triangle isstriped. Striping a new triangle might make its adjacent tri-angles, boundary triangles. If one of its adjacent neighborsis apath-triangle, then it would trigger propagation of path(Algorithm 5). In the next round of strip growing, the strip-ification algorithm has to always choose a non-path trian-gle to grow. But there is a possibility that the strip has noother triangle adjacent to the last striped triangle, but onlyits path-triangleneighbors, as in the case of Triangle 7 inFigure 10. If both the neighbors of the last triangle in the

Page 9: Controllable Single-Strip Generation for Triangulated Surfacesgopi/PAPERS/PG04.pdf · est gradient method on the single strip on manifolds of ar-bitrary topology using total linear

strip arepath-triangles, then the one closer to the last tri-angle of the path is chosen as a candidate for growing thestrip.

There are two cases based on whether this chosenpath tri-angle is the last triangle of the path or not. If this chosenpath-triangle has no adjacent triangle to grow thepath thenit means that the strip has reached the “mouth” of the path,and the only direction to grow the strip is through this pathto reach the destination vertex (refer to the point when thestrip enters the path in Figure 10). If the adjacent triangleis not the last path-triangle, then the strip has to find the“mouth” of the path searching in the direction of to-triangleof this chosen path-triangle (refer to the point when Trian-gles 3 and 8 are split in Figure 10). In this case, we usethe triangle split operation as shown in Figure 11, and wecall this apath-splitoperation since it has to adjust the pathafter the split. Further, after a path-split operation, the laststriped triangle will always have a non-path-triangle neigh-bor, leaving room for the strip to grow. The above algorithmcontinues till the strip reaches the last triangle and eventu-ally the destination vertex. This algorithm is guaranteed tocover all the triangles in the model and reach the destina-tion vertex. Results of this algorithm for different destina-tion vertices are shown in Figure 9.

6. ConclusionWe have presented algorithms to develop a single trianglestrip from the given triangulation by edge split operationswhen necessary. The resulting triangulation includes orig-inal vertices and a few vertices inserted in edge-midpointsduring the split operation. Hence the geometry of the sin-gle strip surface is exactly the same as the original surface.Our algorithm can also be constrained such that the stripdoes not cross over the constraint edges and the strip startsand ends at triangles incident on chosen vertices.

Applications of single strip transcends beyond its use in ef-ficient rendering. We showed one of the by-products of ouralgorithm, the fundamental cycle computation and it usedthe total linear ordering of all the triangles in a triangle stripof the model. Mesh compression of triangle strips [9] haveproved to be more effective than traditional mesh compres-sion techniques. Such techniques can be helped by singlestrip surfaces, in spite of modest increase in triangle count.

Our stripification is completely controllable to producestrips that satisfy certain properties. The need for a particu-lar type of strip depends on the application. The only invari-ant that has to be maintained during strip growth process isthat the number of boundary edge loops of the striped tri-angles, that is not a boundary loop of the given model,is exactly one at any time during the stripification pro-cess. Any striping pattern that respects this invariant can beachieved using this method.

References

[1] K. Akeley, P. Haeberli, and D. Burns. The tomesh.c pro-gram. Technical Report SGI Developer’s Toolbox CD, Sili-con Graphics, 1990.

[2] E. Arkin, M. Held, J. S. B. Mitchell, and S. Skiena. Hamilto-nian triangulations for fast rendering.The Visual Computer,12(9):429–444, 1996.

[3] A. Bogomjakov and C. Gotsman. Universal renderingsequences for transparent vertex caching of progressivemeshes.Computer Graphics Forum, 21(2):137–148, 2002.

[4] M. M. Chow. Optimized geometry compression for real-time rendering. InProc. IEEE Visualization, pages 347–354,1997.

[5] M. Dillencourt. Finding hamiltonian cycles in delaunay tri-angulations is np-complete. InProc. Canadian Conferenceon Computational Geometry, pages 223–228, 1992.

[6] F. Evans, S. Skiena, and A. Varshney. Optimizing trianglestrips for fast rendering. InProceedings IEEE Visualization96, pages 319–326. Computer Society Press, 1996.

[7] M. Gopi and D. Eppstein. Single strip triangulation of mani-folds with arbitrary topology. InProc. of EUROGRAPHICS,2004.

[8] H. Hoppe. Optimization of mesh locality for transparent ver-tex caching. InProc. SIGGRAPH, pages 269–276, 1999.

[9] M. Isenburg. Triangle strip compression. InProceedingsGraphics Interface 2000, pages 197–204, 2000.

[10] R. Pajarola, M. Antonijuan, and R. Lario. QuadTIN:Quadtree based triangulated irregular networks. InProc.IEEE Visualization, pages 395–402, 2002.

[11] J. Rossignac. Edgebreaker: Compressing the incidence graphof triangle meshes.IEEE Transactions on Visualization andComputer Graphics, 5(1):47–61, January-March 1999.

[12] M. Shafae and R. Pajarola. DStrips: Dynamic triangle stripsfor real-time mesh simplification and rendering. InProc. Pa-cific Graphics, pages 271–280, 2003.

[13] A. J. Stewart. Tunneling for triangle strips in continuouslevel-of-detail meshes. InProceedings Graphics Interface,pages 91–100, 2001.

[14] R. Szeliski and H.-Y. Shum. Creating full view panoramicimage mosaics and environment maps. InProc. SIGGRAPH,pages 251–258, 1997.

[15] G. Taubin. Constructing hamiltonian triangle strips onquadrilateral meshes. InInt. Workshop on Visualizationand Mathematics and IBM Research Tech. Rep. RC-22295.,2002.

[16] C. Touma and C. Gotsman. Triangle mesh compression. InProceedings Graphics Interface 98, pages 26–34, 1998.

[17] L. Velho, L. H. de Figueiredo, and J. Gomes. Hierarchicalgeneralized triangle strips.The Visual Computer, 15(1):21–35, 1999.

[18] X. Xiang, M. Held, and J. S. B. Mitchell. Fast and effectivestripification of polygonal surface models. InProc. Symp. onInteractive 3D Graphics, pages 71–78. ACM Press, 1999.