Succinct Strip Encoding of Triangle Meshes. Xinyu Xiang

Size: px
Start display at page:

Download "Succinct Strip Encoding of Triangle Meshes. Xinyu Xiang"

Transcription

1 Succinct Strip Encoding of Triangle Meshes BY Xinyu Xiang A DISSERTATION SUBMITTED TO THE GRADUATE SCHOOL IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY IN APPLIED MATHEMATICS AND STATISTICS STATE UNIVERSITY OF NEW YORK AT STONY BROOK MAY 2001

2 STATE UNIVERSITY OF NEW YORK AT STONY BROOK THE GRADUATE SCHOOL Xinyu Xiang We, the dissertation committe for the above candidate for the Doctor of Philosophy degree, hereby recommend acceptance of this dissertation. Joseph S. B. Mitchell, Advisor Applied Mathematics and Statistics Alan Tucker, Chairperson Applied Mathematics and Statistics Michael A. Bender, Outside Member Department of Computer Science Esther M. Arkin, Member Applied Mathematics and Statistics This dissertation is accepted by the Graduate School. Graduate School ii

3 ABSTRACT OF THE DISSERTATION Succinct Strip Encoding of Triangle Meshes BY Xinyu Xiang DOCTOR OF PHILOSOPHY IN APPLIED MATHEMATICS AND STATISTICS STATE UNIVERSITY OF NEW YORK AT STONY BROOK 2001 A fundamental algorithmic problem in computer graphics is that of computing a succinct encoding of a triangulation of a polygonal surface model in order to be able to transmit and render it efficiently. The goal is to take a given polygonal surface model, whose facets are given by (possibly multiply-connected) polygons, triangulate its facets, and then decompose the triangulation into a small number of tristrips, each of which has its connectivity stored implicitly in the ordering of the data points. We develop methods that are effective in solving the stripification problem, both in theory (provably good encodings) and in practice. Our methods are based on carefully constructed search trees in the dual graph, followed by algorithms to decompose dual trees into tristrips. One decomposition algorithm is provably optimal (based on dynamic programming), allowing us a sound basis of comparison among our other (heuristic) algorithms. We demonstrate the speed and effectiveness of our algorithms through a battery of experiments. In comparison with the recently released STRIPE system for stripification, we find that our stripifier, FTSG, produces comparable or better quality encodings, while requiring significantly less computing time on a large variety of datasets. Further, FTSG is carefully engineered and implemented to be robust, even in the face of highly degenerate and corrupted real-world data. In addition to fast and effective practical algorithms, we also develop optimization algorithms to extract a minimum number of tristrips from a given mesh, using both integer programming and branch-and-bound methods. We are able to find optimal solutions for models containing several tens of triangles in a few minutes. We also incorporate our optimization algorithms into FTSG to provide the user the option of spending more CPU time to obtain fewer tristrips. Furthermore, we study the effect of allowing a small on-board vertex cache on computing a succinct encoding of a triangulation. Methods of maximizing cache utility are developed in an attempt to minimize the encoding cost. Keywords: triangulation, triangle mesh, tristrips, connectivity compression. iii

4 Contents Acknowledgment x 1 Introduction Strip Encoding Our Contributions Thesis Overview Preliminaries Polygonal Surface Models Tristrips Generalized Tristrip Encoding Connectivity Compression Related Work Computing Tristrips Connectivity Compression Stripification of Polygonal Surface Models Introduction Theoretical Analysis Stripification Algorithm Improved Stripification Algorithm Taking Care of Orientations Dynamic Programming Optimization Strip Concatenation Results Set-up of Experiments Statistics Conclusion iv

5 5 Optimal Sequential Stripification Introduction Integer Programming IP Formulation Reducibility to Set-Covering Problem Solving with CPLEX Implicit Enumeration Branch and Bound Branch-and-Bound Scheme Experiments Patch Optimization Algorithm Experiments Other Issues Orientation Maximal Sequential Strips Conclusion Strip Encoding Using On-board Vertex Cache Overview Vertex Caching Algorithms Cache Optimization Cache-friendly Tristrips Experiments Conclusion Conclusion Main Results Future Work v

6 List of Tables 4.1 Performance of different heuristics implemented in FTSG: average vertices per triangle ( V/T ) and CPU time (in ms) Performance of different heuristics for the DP algorithm implemented in FTSG: average vertices per triangle ( V/T ) and CPU time (in ms) Performance of the different stripification codes: average vertices per triangle ( V/T ) and CPU time (in ms) The average running times using both CPLEX and the branch-and-bound method on grid models and 10 sphere models, each containing triangles The running times using both CPLEX and the B&B method on some small triangle meshes The number of strips generated by optimization and DP on grid models and sphere models, each containing triangles The number of strips obtained by the truncated branch-and-bound method at the end of time period equal to times the DP running time The running time and the number of nodes visited by the branch-and-bound method and the brute-force method on sphere models, each containing triangles The running time and the number of nodes visited by using various bounding schemes on sphere models, each containing triangles The running time of the optimization algorithm on grid and sphere models The running time of the randomized optimization algorithm on runs of a sphere model The performance of the patch optimization using different patch size bounds Extra bits required to encode each vertex data for the four caching schemes The cache miss rates for different caching schemes using tristrips generated by different methods vi

7 6.3 Bytes per triangle for different caching schemes using tristrips generated by different methods Cache miss rates on selected models obtained by using zigzag tristrips.. 69 vii

8 List of Figures 1.1 The triangulation is encoded using one tristrip: (1,2,3,4,1,5,6,7,8,9,6,10,1,2) Example of a generalized tristrip encoding Hamiltonian triangulations of length and Example of a triangulation and its dual tree for which the algorithm results in an encoding cost of. Right: An alternative breaking into sequential strips yields a cost of Three graph searching algorithms Concatenation that reduces the encoding cost by two Concatenation that reduces the encoding cost by one Encoding quality of heuristics of FTSG relative to using -dfs -alt -seq -zero CPU-time comparison of the stripification codes w.r.t. FTSG -dfs -alt -DP -zero Encoding quality of the stripification codes w.r.t. FTSG -dfs -alt -DP -zero Results of FTSG stripification of the cow. Left: Stripified cow, with different strips having different colors; Right: A zoomed view, with spanning tree edges highlighted on the cow s head Results of FTSG stripification of the shark. Left: Stripified shark, with different strips having different colors; Right: A zoomed view, with spanning tree edges highlighted A local configuration of a triangle mesh and its dual A sequential cycle and its dual Folding a regularly triangulated grid into a prism A small triangle mesh and its dual The dual graph of a sequential stripification The binary decision tree A sequential strip can pass through a triangle in three different ways For the small triangle mesh shown above, we obtain a lower bound of using our fathoming rule. By applying the one-strip test, we obtain a better bound of viii

9 5.9 The average running time grows exponentially with the problem size The number of sequential strips obtained by the branch-and-bound method decreases as running time increases The histogram of running time with step size The expected running time varies with the number of parallel runs on a sphere model The expected running time varies with the number of parallel runs on a grid model The average number of strips varies with the strip cut-off size The number of strips decreases as the patch size bound increases The running time grows exponentially with the patch size bound In the strip, the initial vertex order changes the orientation of the leading triangle from CCW to CW Left: two sequential strips crossing each other. Right: one self-crossing sequential strip Sequential stripifications of a grid model containing triangles. Left: strips are obtained using branch-and-bound method in seconds. Right: strips are obtained using options -dfs -alt -DP in seconds Sequential stripifications of a sphere model containing triangles. Left: strips are obtained using branch-and-bound method in seconds. Right: strips are obtained using options -dfs -alt -DP in seconds Left: patches obtained by grouping sequential strips (generated by DP) of length into connected components of size. Right: the final stripification obtained after optimally decomposing each patch into a minimum number of sequential strips One maximal sequential strip that almost covers the whole cow model, except for a few triangles (in white). Subsequent triangles in the strip are shaded darker and darker Graphics system architecture The variation of average cache miss rate with the value of ix

10 Acknowledgment I would like to thank my advisor, Dr. Joseph S.B. Mitchell, for his patient supervision through my doctorate program. Not only does he always trust and encourage me in doing research, but he also provides crucial advice that helps me through obstacles. We had fruitful discussions that kept me on the right track. I also thank him for helping me in writing up the thesis. Without his help, this dissertation would not have been possible. I would also like to thank Dr. Martin Held for his help in many ways. Aside from useful discussions, he generously offered expert programming advice and provided code that helps enhance my programs. He also helped me in setting up computer experiments and writing up some of the results. I thank my parents Yuqing and Xiangfu, and my wife Ling for their everlasting encouragement and support. Ling also helps me use statistical software to handle some experimental results. I appreciate several faculty members, including Esther Arkin, Alan Tucker, Steve Skiena and Michael Bender for several useful discussions on this research and suggestions on improving my dissertation thesis. I also thank my colleagues, Regina, Ricardo, Nenad, Changkil, Saurabh, Petr, and Piyush for helpful discussions, group meetings and various support. I thank Hrvoje Podnar for helping me with CPLEX. Special thanks go to Michael Deering, Henry Sowizral, and Karel Zikan of Sun Microsystems for their input on this research; Sun also provided a grant and equipment in support of this work. This research is also partially supported by grants from the National Science Foundation (CCR ).

11 Chapter 1 Introduction We consider a problem of importance in graphics and visualization: computing a succinct encoding of a triangulation of a polyhedral model in order to be able to transmit and render it efficiently. CAD/CAM and virtual environments applications often require that very complex datasets be visualized at real-time rates. Current 3D graphics rendering hardware often faces a memory bus bandwidth bottleneck in the processor-to-graphics pipeline. One naturally wants to avoid rendering unnecessary triangles (e.g., through visibility culling). Also, it is common to simplify and approximate complex models. But it is also important to minimize the time needed to transmit triangles that are to be rendered, e.g., by compressing the geometric and topological information in a model, transmitting the compressed data, and decompressing at the rendering stage, hopefully using a very small on-chip cache. 1.1 Strip Encoding Traditional encoding of triangles in a surface triangulation (or triangle mesh) specifies three vertices for each triangle. As neighboring triangles share common edges and vertices, such an encoding may specify a vertex multiple times. According to the Euler s formula, in a typical mesh, the number of triangles is about twice the number of vertices. Thus traditional encoding specifies each vertex about times on average. Strip encoding is based on triangle strips (or simply tristrips ). A tristrip is an ordered sequence (with repetitions) of vertices, "!#!%$, which encodes a set of '&( triangles. 32 A sequential tristrip encodes the set of triangles )"!+*!%*-,.#!%*/,10, 54678&9 ; a 2 fan tristrip encodes the set )"!#!+*-,.#!+*-,10, all of which contain!#. Figure 1.1 gives a sequential tristrip encoding of 12 triangles. In an ideal encoding, by a single tristrip, only ;:< (rather than ) vertices would have to be transmitted for a triangulation with triangles. In general, if we are able to decompose a surface triangulation into tristrips, we will need only =:6 vertices. When 1

12 CHAPTER 1. INTRODUCTION Figure 1.1: The triangulation is encoded using one tristrip: (1,2,3,4,1,5,6,7,8,9,6,10,1,2). is small compared with, roughly vertex specifies triangle on average, so each vertex shows up approximately twice in the encoding. The rendering of tristrips is supported by the widely used OpenGL standard. Thus, it is of practical importance to find a small (ideally minimal) number of tristrips to cover a given mesh. In order to reduce further the vertex data needed to encode a triangle mesh, Deering [9] introduced a new encoding method using generalized tristrips and a -entry vertex cache, namely, the mesh buffer, to store used vertices so that they can be reused in the future. Ideally, given a large enough mesh buffer, each distinctive vertex in a generalized tristrip encoding needs to be specified only once when it first appears and is stored in the buffer. The later occurrences of the same vertex are encoded as references to the one stored in the cache. Given a mesh buffer of (practically small) entries, not all vertices can be stored in the cache at the same time. It is important to study how to maximize references to a small cache and therefore minimize the number of real vertices encoded. 1.2 Our Contributions Fast and effective stripification of polygonal surface models Our results include: (1) An efficient (provably linear-time) robust algorithm for decomposing a polygonal model into a small number of tristrips. The stripification algorithm is a three-phase method, based on (i) computing a spanning tree of the dual graph of a triangulation, using variants of breadth-first and depth-first searching, (ii) partitioning a tree into tristrips, and (iii) performing a concatenation phase, to join small strips into larger strips. (2) A linear-time algorithm, based on dynamic-programming, for optimally performing

13 CHAPTER 1. INTRODUCTION 3 phase (ii), extracting the minimum number of sequential tristrips from a given spanning tree. (3) A theoretical analysis of the number of vertices required, in the worst case, to encode a triangulation using tristrips. (4) Experimental analysis of our algorithms on a wide variety of sample datasets, showing that our methods compare quite favorably with a leading publicly available stripification system (STRIPE) [15]. Using our system, FTSG, we obtain orders of magnitude of speed-up over the published version of STRIPE, and our algorithms remain significantly faster than the newly released (unpublished) STRIPE 2.0. In terms of compression, our methods also improve upon STRIPE, decreasing, on average, the number of vertices required to encode a triangulation. We also compare favorably with the tomesh utility provided by SGI. Furthermore, our algorithm is robust in its ability to handle a wide variety of real-world datasets. (5) Our results are the first to study systematically the effect of allowing both sequential and fan tristrips. Optimal sequential stripification of triangle meshes Our results include: (1) An integer programming formulation for the problem of optimally decomposing a triangle mesh into a minimum number of tristrips. This permits us to use a commercial IP solver, such as CPLEX, to obtain optimal strip encodings of triangle meshes. (2) A branch-and-bound algorithm we have devised and implemented to compute an optimal decomposition into the minimum number of tristrips from a given triangle mesh. (3) An experimental study of a patch optimization algorithm, built on top of our FTSG system and the exact optimization algorithms ((1) and (2) above), which trades running time for fewer strips: The more time a user wishes to spend, the fewer strips one may obtain. Strip encoding using on-board vertex cache We study the problem of computing a succinct encoding of triangle meshes using generalized tristrips and a small vertex cache. Methods of maximizing cache references are developed so as to attempt to minimize the encoding cost.

14 CHAPTER 1. INTRODUCTION Thesis Overview We start in Chapter 2 to introduce most terminologies that will be used throughout the thesis. Then we review the related research work in Chapter 3. Chapter 4 presents our fast and effective stripification algorithm. Based on this algorithm, we designed and implemented FTSG, the Fast Triangle Strip Generator, to find effective strip encodings of triangle meshes. Both theoretical analysis on encoding cost and experimental results are provided. Chapter 5 discusses how to find an optimal tristrip encoding of a given triangle mesh. We study both the integer programming method and the branch-and-bound method. We also discuss how to use the optimization algorithms to enhance FTSG. Chapter 6 addresses the caching problem: Given a small vertex cache storing up to vertices, how does one encode a set of generalized tristrips so as to maximize the references to the cache? We also look at some heuristics to generate tristrips that help to increase cache references. Finally, we conclude our work in Chapter 7 and give suggestions for future research.

15 Chapter 2 Preliminaries 2.1 Polygonal Surface Models We begin with some basic definitions. A polygonal surface model, >, is a set of polygonal faces that represent the boundary of a polyhedral object in 3-space. Each polygonal face is represented by a circular list of vertices that describe the outer boundary of the face, followed by a possibly empty list of holes. A polygonal face with no holes is said to be simply connected, while a face with one or more holes is multiply connected. Each polygonal face is usually expected to lie in a plane and each has an associated outward surface normal. Note, however, that real-world data will often have non-coplanar vertices. The input to our algorithms is a general polygonal surface model >. We use an enhancement of FIST [21] to triangulate (robustly) each face of >. FIST is carefully designed to be able to handle arbitrarily non-planar or corrupted polygonal data in a reasonable manner. Thus, for most of our discussion, we will assume that > is a triangulated model (or a triangulation, or a triangle mesh), meaning that every one of its faces is simply a triangle. In general, > may consist of several connected components; our analysis will apply to each component separately, so we can assume that > is connected from now on. A manifold edge is an edge contained in exactly two incident triangles, which are called adjacent, while a non-manifold edge is contained in more than two incident triangles. A boundary edge only belongs to one triangle. In our implementation, a non-manifold edge will be split and its incident triangles are paired and distributed such that each instance of the edge becomes either a manifold edge or a boundary edge. We define the adjacency graph,?, of a triangulated model > that contains no non-manifold edges, to be the graph whose nodes are the faces (triangles) of > and whose edges link pairs of adjacent faces. We see that the degree of each node of? is at most three. If > is a 2-manifold, meaning that every point of the surface has a neighborhood homeomorphic to a 2-disk, then? is a 3-regular graph (each node has degree exactly three). 5

16 2 CHAPTER 2. PRELIMINARIES Tristrips We adopt some of the definitions from Arkin et al.[2]. A triangulation > is Hamiltonian if the graph? has a Hamiltonian path, meaning that there exists a path in? that visits each node (triangle of > ) exactly once. A triangulation > is sequential if the graph? has a Hamiltonian path such that no three consecutive edges crossed by the path are incident on a common vertex. Equivalently, > is sequential if there exists a vertex "!#!%0 C!+D,10, possibly with repetitions, such that the triangles of > are exactly given by the triples of consecutive vertices in the listing: E!#!0!, "!%0!!+F, "!+D!%D,.#!+D,10. The vertex is called a sequential triangle strip (or sequential tristrip). A triangulation > is fan if the graph? has a Hamiltonian path such that all edges crossed by the path are incident on a common vertex. Similarly, for a fan triangulation >, there also exists a fan such that the triangles in > are exactly given by the triples "!#!%0!, E!#!!%F, "!#!+D,.#!%D,10, each of which contains!#. With a slight abuse of notation, we refer both to the vertex sequence and to the encoded set of triangles as the tristrip (or simply strip). In some cases (e.g., Iris GL), it is useful to define a more general notion of sequential, in which we permit swaps, special marks (bits) within a vertex sequence to indicate an exchange of the two cache vertices. Alternatively (e.g., OpenGL), a swap can be effected by sending a zero-area triangle (transmitting an extra swap vertex instead of a 3I J=K LM swap bit). For example, yields triangles N,, P, Q O which also result from the sequence (having zero-area triangle ). Another way to achieve this result is to allow duplicate triangles to be encoded in the strip: O O, which repeats the triangle (as ). A sequential tristrip is pure if the sequence contains no zero-area or duplicated triangles. On the other hand, a Hamiltonian triangulation can be encoded by a sequential tristrip that may contain zero-area or duplicated triangles. We are interested in partitioning > into a small number,, of tristrips, )+@R# which encode >. Associated with such a partitioning of > into tristrips there is an encoding cost. Typically, we take the encoding cost to be the number of vertices in the encoding (i.e., the sum of the lengths of the tristrips). 2.3 Generalized Tristrip Encoding Encoding a triangle mesh using tristrips potentially results in specifying each vertex twice, on average. Deering [9] introduced the generalized triangle mesh, which adopts a -entry vertex FIFO (First In First Out) cache (also called a mesh buffer ) to facilitate encoding a triangle mesh. Figure 2.1 shows such an encoding, which has the potential of specifying each vertex only once, as the repeated occurrences are encoded as references to the buffer. O N

17 CHAPTER 2. PRELIMINARIES 7 We also call this strip-based encoding method a generalized tristrip encoding using a vertex cache Generalized Tristrip Encoding: R9p,O1,O8p,O2,O3,M7p,O6,M4, O5,M15p,M14p,M13p,M-4, O12p,O-6,O11,O-7,O10,M19, M18,M-1,O-2,M17,O-3,O-4, M16. Legend: R=Restart, O=Replace Oldest, M=Replace Middle, p=push into mesh buffer. Numer represents Vertex. -Number is buffer reference. Figure 2.1: Example of a generalized tristrip encoding. In a generalized tristrip encoding, as shown in Figure 2.1, each vertex or buffer reference (specified by identity bit) is prefixed by bits to indicate how it is used to specify triangle. Each buffer reference uses a UWVYX Z 0 [ -bit index to look into a -entry mesh buffer. Typically, when \A, a -bit index is used for each reference. A push bit per vertex is also used to specify explicitly whether or not this vertex is buffered. Fetching a vertex due to a cache reference results in a cache read while reading a vertex from outside cache results in a cache miss. As the encoding cost of a cache reference is usually much smaller than that of vertex data, one wishes to maximize cache reads and thereby minimize cache misses. We define the cache miss rate, ], as the number of cache misses divided by the number of triangles in the mesh. As the number of vertices is no less than twice the number of triangles in a mesh, ] is bounded below by ^. 2.4 Connectivity Compression Given a set of points (or vertices) in 3D, how they are connected to form triangle meshes is determined by the so-called connectivity information. Apparently, the connectivity has

18 CHAPTER 2. PRELIMINARIES 8 to be encoded in addition to the vertex data, and the encoding size is usually measured by average bits per vertex (bpv). Traditionally, each triangle in a triangulation is specified by three vertices, and therefore each vertex is specified times on average. Assuming that each vertex data is bytes (for position coordinates only), then the connectivity is encoded using bpv. Using tristrips to encode a triangulation potentially repeats each vertex twice on average, and thus results in _ bpv for connectivity. Deering s generalized triangle mesh encoding has the potential to encode each vertex only once. The connectivity is encoded using roughly bpv, i.e. :` bits per triangle and :a bits per vertex data. There exist other encoding methods (Section 3.2) that are not strip-based. While they can compress connectivity using a few bits per vertex, the compressed mesh usually requires a large vertex cache for efficient rendering.

19 Chapter 3 Related Work 3.1 Computing Tristrips There have been several works on constructing tristrips. Arkin et al. [2] study sequential triangulations of point sets and polygons. They show that testing whether a given triangulation of a point set or polygon is sequential can be done in linear time. They also prove that certain non-degenerate point sets in the plane do not admit a sequential triangulation, and that the related problem of computing a Hamiltonian triangulation is bdc -hard for polygons with holes. A program developed at SGI ([1]) produces tristrips allowing swaps. Its heuristic tends to create strips that begin and end on faces with the fewest number of neighbors in the triangulation, so as to reduce the number of isolated triangles. Starting from one of the triangles with fewest neighbors, a greedy algorithm chooses, from its neighbors, the triangle with the fewest number of neighbors as the next triangle. If there is a tie, the program looks ahead one step to check the neighbor s neighbors for the fewest number of neighbors. If a tie occurs again, the strip continues in an arbitrary valid way. Another recently implemented stripifier is STRIPE [14]. It adopts SGI s heuristic described above as its local algorithm. However, for data that contains quadrangles, STRIPE uses a global approach ( patchification ) to construct long strips from large patches of quadrangles. Their implementation claims to handle models containing convex polygonal faces. Other stripifiers include the tristrip generation function in the GNU Triangulated Surface Library (GTS) [19] and Grantham [18] s meshifier. GTS combines a set of useful library functions to handle triangle meshes in one package. However, both of the above stripification methods are similar to SGI s greedy algorithm. Our method is perhaps most closely related to that of Speckmann and Snoeyink [30], who implemented an algorithm specially designed for TIN (Triangulated Irregular Network) terrain models. They employ a unique traversal algorithm to find the spanning trees 9

20 CHAPTER 3. RELATED WORK 10 of the dual graphs of TIN models. The spanning trees need never be explicitly determined, but are traversed in the greedy process of finding sequential strips. They also have a cleanup phase in which leftover single triangles are combined with longer tristrips. SGI s tomesh was initially designed to construct tristrips allowing swaps. It does not hesitate to use swaps to make longer strips. The cost is one bit per swap in Irix GL, but is one vertex per swap in OpenGL. As a result, a tristrip allowing swap vertices containing triangles may be encoded with far more than e:f vertices. STRIPE inherits the same feature. Speckmann and Snoeyink s implementation is fast and memory-efficient; however, it is designed for TIN models, and it usually transmits &g h more vertices than STRIPE does, since it produces a larger number of strips [30]. 3.2 Connectivity Compression There has been recent work leading to impressive results on the compression of both connectivity and geometry of manifold triangular meshes; see, e.g., Taubin et al. [31, 32]. Their compression is not based on stripification, so does not produce the tristrips that we desire; however, their Topological Surgery technique, which employs a spanning tree of the vertices, leads to connectivity compressions approaching less than bits per triangle. Touma and Gotsman [33] developed another method that achieves a substantial improvement, using less than i bits per vertex, on average, for connectivity compression. Rossignac [28] also develops an Edgebreaker compression scheme that theoretically guarantees a -bit per vertex encoding. The corresponding 3D compression software is available on the internet [12]. King and Rossignac [26] further improve the bound to bits per vertex. Isenburg [24] also considers compressing tristrip information with mesh connectivity, using about bits per vertex. We note that these non-tristrip methods of compression do not have the feature that, on average, each vertex is transmitted twice, as we have with tristrips: even if a triangulation can be encoded with a single tristrip (one vertex per triangle), it will require roughly vertices in the encoding, assuming that every triangle has 3 neighboring triangles, since there are %j&' triangles in a triangulated planar graph on vertices. Deering [9] considers generalized triangle meshes, having a FIFO cache for storing vertices, to facilitate geometry compression; particularly efficient algorithms for obtaining such compressions are given by Chow [7]. Their approach explicitly manages the cache by specifying which vertices are buffered and which buffered vertices are fetched. Hoppe [23] develops a method to optimize face ordering in a tristrip encoding, assuming a hardwaremanaged cache. These methods generate strip-based encodings that result in similar cache miss rates. Bar-Yehuda and Gotsman [6] use planar separator theorems to show that a vertex cache of size klnm is sufficient and sometimes necessary to attain optimal transmission (each vertex transmitted only once). Gumhold and Straßer [20] also develop a connectivity compression/decompression method, using a cache that permits each vertex

21 CHAPTER 3. RELATED WORK 11 to be transmitted only once. Denny and Sohler [10] consider a related problem of encoding a triangulation by a permutation of its vertex set, by means of constructing a hierarchical family of decimated triangulations, with the order of the vertices determining the reconstruction of the triangulation; their goal, however, was not to obtain tristrips.

22 Chapter 4 Stripification of Polygonal Surface Models In this chapter, we study a challenging and pratically important problem: computing efficiently a succinct encoding of a triangulation using tristrips (a stripification). 4.1 Introduction As described in Section 3.1, previous stripification methods mostly use greedy algorithms. The global patchification algorithm in STRIPE [14] works only for quads, and Speckmann et al. s spanning tree algorithm [30] is designed for TIN models. As of our knowledge, there are no theoretical bounds provided in previous works. In this chapter, we develop methods that first generate a spanning tree of a given surface triangulation, and then apply either a path peeling algorithm or dynamic programming to optimally extract a set of tristrips. Theoretical analysis is also provided to ensure that our methods generate stripifications with guaranteed quality. In Section 4.2 we prove our main theorem, giving a tight upper bound on the number of vertices required to encode a given triangulation. In Section 4.3, we present our main algorithm in detail, and discuss variations of it. Section 4.4 discusses how we improve our heuristic algorithms. We give our experimental results in Section 4.5, and finally conclude with a summary and directions for future research in Section Theoretical Analysis Our goal in this section is to give guaranteed bounds on the function otpq", which gives the worst-case encoding cost for pure sequential strips as a function of the number of similarly for sequential strips that triangles in a triangulation >. We define the cost orr p " 12

23 A A CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 13 allow zero-area triangles, and otpns t" for encodings using both sequential and fan strips. Using our standard definition of encoding cost in terms of the total number of vertices, we see that we need \:u Öv vertices for a given triangulation >, where Öv denotes the minimum number of tristrips in any partitioning of > into (pure) sequential tristrips. Lemma 1 Any (connected) triangulation > consisting of exactly three triangles is sequential; thus, otpq Aw. Proof. Clearly, if > is connected and has exactly three triangles, it is Hamiltonian and is topologically equivalent to the configuration shown in Figure 4.1(a), which can be encoded Q O with the single sequential strip. xy Lemma 2 Let > be a Hamiltonian triangulation consisting of four triangles. Then > is either sequential or fan; thus, otpns t". Further, o1pce Ad and o pr E Aw. Proof. > must have the structure of either (b) or (c) in Figure 4.1. One (case (b)) can be encoded sequentially, and the other (case (c)) can be encoded as a fan strip. Thus, o1pzs t". If we must use purely sequential strips, then in case (c) we are forced to have two strips, resulting in an encoding cost of 8 (instead of 6, for case (a)). If we allow zeroarea triangles, then case (c) results in an encoding using only 7 vertices: (2,3,1,4,1,5,6). OC 3I J{K L (Alternatively, one can encode it with 6 vertices and a swap: P.) xy (a) (b) (c) 6 Figure 4.1: Hamiltonian triangulations of length and. Consider now a triangulation >, having triangles, that is Hamiltonian, with Hamiltonian path }. We can find the longest prefix subpath, } r, of } for which the corresponding set of triangles is sequential; this is readily done in time ~3 } r, in the same manner that one tests for a triangulation being sequential ([2]). By Lemma 1, we know that } rp O. Thus, using a simple greedy algorithm, in which we iteratively select the longest prefix of } that is sequential, and then remove it, we see that the result is a set of at most UWM [ sequential

24 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 14 tristrips that partition >. (This bound is tight: consider a fan triangulation.) Similarly, if we allow both sequential and fan tristrips, we will need at most U M [ tristrips (and one can again show that the bound is tight). The result is the following lemma: Lemma 3 Using only (pure) sequential tristrips, a Hamiltonian triangulation has encoding cost at most ƒ:d UW [\ % :`. Using both sequential and fan tristrips, the encoding cost is at most :d U M [ ˆ :. Such encodings can be computed in time. ~ E Now consider an arbitrary connected triangulation, >, with each edge belonging to at most two triangles. Let denote a spanning tree of the adjacency graph? for >. Then, since each node of? has degree at most three, we know that we can root in such a way that it is a (rooted) binary tree, simply by rooting it at any node of degree at most two. Lemma 4 Any rooted binary tree can be partitioned in linear time into a set of paths, such that every path in the partition, except for at most one, consists of at least three nodes. Proof. We give a constructive proof, based on the following Path Peeling Algorithm: (1) Let! be a node of maximum depth among nodes that have two children in the tree. If no such! exists, go to step (3). Then, the subtree rooted at! must consist of a path, }TŠ ; otherwise, there exists a node of greater depth than! that has two children, contradicting the choice of!. Further, }TŠ has at least three nodes. (2) Remove }TŠ from the tree. If the tree is empty now, stop; otherwise, go to step (1). (3) (No node of the tree has two children.) In this case, the tree is already a path (possibly consisting of only one or two nodes), so we report it and stop. The algorithm can be implemented in linear time, since each node can be labeled with its depth and degree and each path that is peeled off can be charged to the nodes of the path. xy Corollary 5 The Path Peeling Algorithm, as introduced above, generates a minimal number of paths from a given spanning tree. And the minimal number equals half the number of nodes of odd degree.

25 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 15 Proof. Given a spanning tree,, any path in it consumes at most nodes of degree. For each node of degree the path consumes, it generates at least node of degree in the remaining tree(or forest). Thus by removing any path from, the number of nodes of odd degree decreases by at most two. In Path Peeling Algorithm, the decrement is exactly two for each path removed. xy Theorem 6 For any connected triangulation > of triangles, one can compute in ~" time a pure sequential encoding of > with at most e: vertices. In the case of sequential strips allowing zero-area triangles (resp., sequential and fan strips), one obtains a bound of U % Proof. We let Œ[ : (resp., Ž : i ). be any spanning tree (e.g., a depth-first search tree, which is computable in linear time) for the dual graph? of >. We then apply the Path Peeling Algorithm of Lemma 4 to decompose into paths each of length 3 or more (except, possibly, for one path). Now consider one such path }, and let 4 be the number of its triangles. Obviously, the costs are 3, 4, and 5 for paths of length 4 A and 3. By Lemma 3 we get a cost of %4 :ƒ ` 4 for 4. Summing over all the paths yields the claim. (Note that one path may be of length 4 A, requiring 4.: vertices.) A similar analysis can be applied to the case in which we allow both sequential and fan tristrips, or in which we allow zero-area triangles in the sequential strips. xy Corollary 7 6 o1pce ` : 6 o r p E U otpns t" i : i Œ[ : Proof. The upper bounds come directly from the theorem above. The lower bounds come from a family of examples, one of which is shown in Figure 4.2. The dual tree for the triangulation can be partitioned into paths each having four nodes, as shown in the middle figure; this is the result produced by our Path Peeling Algorithm. One can argue that the optimal partitioning, however, is obtained by breaking the tree into pairs of paths consisting of a 5-node path and a singleton, as shown on the right. xy The above corollary says that the worst-case number of vertices per triangle is between 5/3 and 2 for pure sequential strips, between 5/3 and 7/4 for sequential strips allowing zeroarea triangles, and at most 1.8 for mixed strips. In Section 4.5, we see that, in practice, our heuristics do better than these worst-case bounds, with our best method averaging about 1.21 vertices per triangle (allowing zero-area triangles in sequential strips).

26 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS Figure 4.2: Example of a triangulation and its dual tree for which the algorithm results in an encoding cost of. Right: An alternative breaking into sequential strips yields a cost of P 4.3 Stripification Algorithm Our stripification algorithm consists of five steps: (1) computing a triangulation of faces of the model that are not already triangles; (2) constructing a spanning tree,, in the dual graph? of the triangulation; (3) partitioning into a set of paths, corresponding to Hamiltonian triangulations; (4) greedily decomposing the corresponding Hamiltonian strips into sequential or fan tristrips; and (5) concatenating short tristrips into longer tristrips, using a set of postprocessing heuristics applied to the result of Step (4); see Section For (1), we have integrated and enhanced the FIST [21] system, which robustly triangulates polygonal models, even if highly degenerate or corrupted. Our modification of FIST enables us to output triangulations of convex faces that are pure tri-strips, or to leave convex faces untriangulated (and triangulate only all concave faces). For Step (2), we have implemented standard depth-first search (DFS) and breadth-first search (BFS), and we have also devised a hybrid variant that does DFS, but returns to the highest level node not yet fully explored. For (3), we apply our bottom up Path Peeling Algorithm, from Lemma 4 of the last section. This guarantees that each path (Hamiltonian strip), except possibly for one, will have at least three triangles. We also devised an optimal algorithm, based on dynamic programming, to partition into a minimum number of sequential tristrips; see Section

27 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 17 The overall goal in Step (2) is to build a spanning tree of? that has a small number of nodes of degree two, as this will result in a small number of paths generated in Step (3) of the algorithm. BFS tends to generate trees that resemble balanced binary trees. Therefore, the number of nodes in a BFS-tree that have two children may be large. DFS and the hybrid search both tend to generate more degree-one nodes than BFS, thus reducing the number of paths generated in Step (3). s s s BFS DFS Hybrid Figure 4.3: Three graph searching algorithms. There is a choice of which triangle to visit next during the construction of whenever the graph search has entered a triangle with two unvisited neighbors. Obviously, one can simply perform random marching and pick the next triangle randomly. One heuristic for picking a good next triangle has been implemented by SGI in tomesh: this heuristic picks the triangle with the least number of unvisited neighbors. Using this heuristic in Figure 4.3(b) will find one single path that covers >. Another heuristic is to keep track of the side on which the current triangle has been entered from the previous triangle, and to choose the next triangle such that one alternates the turn. This alternate-turn marching can be expected to help to get longer and therefore fewer sequential strips. We implement and test all three graph search algorithms, BFS, DFS, and hybrid search. For each search algorithm, we generate the following three types of strips: (1) sequential strips only, (2) fan strips only, (3) both sequential and fan strips. If both sequential and fan strips are generated, we favor sequential strips. That is, a fan strip will start only if the greedy decomposition in Step (4) encounters four consecutive triangles that cannot be encoded with a sequential strip. Our algorithm runs in overall linear time in the worst case, after triangulation (Step (1)). In practice, FIST has been shown to take only linear time for Step (1), see [21], especially

28 4 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 18 since most faces tend to be triangles, quadrilaterals, or low-cardinality polygons. (In theory, triangulation can be done in worst-case linear time for faces without holes, and in in general.) ~ E VYX Z 4.4 Improved Stripification Algorithm Taking Care of Orientations In computing tristrips, we take care to respect the orientation of the leading triangle in each tristrip, as this gives the renderer crucial information about the sign (orientation) of the normal vector. Following the convention that normal vectors point to the outside of the object, this means that the vertices of the first triangle have to appear in counter-clockwise (CCW) orientation when viewed from the outside. Taking care of the orientation of the first triangle is no problem for a tristrip of odd length, as we can simply specify its vertices in reverse order. However, it creates a problem for tristrips of even length, if their original vertex order is inappropriate. For instance, the first triangle of the tristrip in Figure 4.1(a) is oriented CW, but specifying the vertices in reverse order, (5,4,3,2,1), changes the orientation of the first triangle to CCW. However, a reversal of the vertex order does not cure the problem for the tristrip in Figure 4.1(b). One may either break it up or add swap vertices to make it a strip of odd length, depending on whether or not swaps are permitted. There are models in which neighboring triangles have different orientations. To avoid generating a tristrip that covers them both, we need to identify hard edges when building adjacency information among triangles. A hard edge is a manifold edge across which triangle orientation flips. The two triangles incident on a hard edge shall not be labelled as neighbors. In doing so, we guarantee that only triangles of the same orientation can be in the same connected component Dynamic Programming Optimization The goal of our Dynamic Programming (DP) algorithm is to minimize the number of sequential strips needed to cover a given spanning tree. We engineered our algorithm to ensure correct orientations of the tristrips, provided that the input model has consistent orientations for all the triangular faces. to be the minimum For each node!, we define the objective function š E! number of sequential strips that can be derived from the subtree rooted at!, in mode 4, Q O where mode 4 has the following meanings, for 4œA : 0: no sequential strip enters! ;

29 4 4 A A 4 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 19 1: a strip enters! with a left turn and an even parity; 2: a strip enters! with a right turn and an even parity; 3: a strip enters! with a left turn and an odd parity; 4: a strip enters! with a right turn and an odd parity. Here, we say a triangle is entered with a left turn by strip I if its vertex encoding in I complies with its orientation. Otherwise, we say it is entered with a right turn. We also say that a triangle is entered by strip I with an even parity if it is an even-numbered triangle does not include in within I ; otherwise, it is entered with an odd parity. Note that š E! its count the strip (if any) that enters node!. Assume that! has two children, left and right, which are denoted by and ]. Then we can establish the following recursive relations. (We note that this also works for models that do not have consistent orientations.) For 4œA : š "! A ž Ÿ Œ) : š P +3 : š "] 32 3 :až ŸY.)š P +3 š P 32 : š "] 3 :až ŸY.)š "] š "] N : š P N2 :wš P or š " :dš E] or š E] Q š E! is computed by optimizing over all possible cases: 1. the node consists of a singleton strip; 2. a strip starts from! and enters its left child with a left (resp., right) turn and an even parity; 3. a strip starts from! and enters its right child with a left (resp., right) turn and an even parity; 4. a strip passes through!, and enters its left child with either a left or right turn and its right child with either a left or right turn, both with an odd parity. Similarly, we can establish the following recursive relations. For 4 A and 4œAw : š "! ž ŸY )š P Q : š "] š " or š P : š E] or Q 32 š E] or š "] : š " For 4 A and 4œÀ : š "! ž ŸY )š P C + : š "] š " or C + š P : š E] 32 š E] or š "] : š " or

30 A A A CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 20 + If š E! A š P : š E] + Q + For a leaf node!, the boundary conditions are š E!, š "! Â, Q š "! š E! A<š E!., where!+ is the root of. To actually build, i.e., if the optimal value is achieved when the strip stops at! with an even parity and with a left turn, then its orientation could not be corrected. Thus, in this case we set š "! to. The optimal value is given by š "!+ sequential strips, one has to store information about the optimum decomposition at every node. The computation can be done in linear time, by traversing the tree in a bottom-up fashion. There are only a constant number of cases per node and each node is visited exactly once. Theorem 8 In ~ E time, one can compute an optimal decomposition of a tree into a minimum number of pure sequential tristrips Strip Concatenation In this section, we discuss how to concatenate tristrips in Step (5) of the Stripification Algorithm in order to reduce both the number of vertices rendered and the number of tristrips. We start with explaining how to concatenate sequential tristrips if both zero-area and duplicate triangles are allowed. (The simple modifications for using only zero-area triangles are omitted here.) A«" # 0 T$ $,.# T$,10 be two sequential tristrips in the triangulation >. Assume that either the first or last triangle is a neighbor of the first or last triangle We will explain strip concatenation for the case that "!+D!+D,.#!%D,10 and " # 0 are neighbors. The result of strip concatenation should be that three consecutive vertices in the new strip specify either a triangle in > or a newly introduced degenerate triangle. We use : to denote the binary operation that combines two sequential strips. We have to consider three cases Figure 4.4: Concatenation that reduces the encoding cost by two.

31 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 21 If!%D,.# À M# and!+d,10 Ad 0 "!#!%D # 0 C $,10. This first case corresponds to only one configuration, as illustrated in Figure 4.4. We have Q O :we If!%D±À Œ0 or!+d,.# Ad 0 or!+d,.# À, and!%d,10²a³ M# "!#!%D!+D,.# M# 0 q T$,10. QO This second case breaks down into three configurations, as illustrated in Figure 4.5. The concatenations corresponding to the three configurations are "!#!%D :wp :wp :wp!+d,.# O O!%D,10 # 0 C Q O Q O Q O Q O T$,10 O O O OO. It can be easily checked that this third case corresponds to four other configurations, in which two strips can only be linked without achieving a reduction in the number of vertices Figure 4.5: Concatenation that reduces the encoding cost by one. The concatenation of two fan strips is simple. Similar to the discussion above, let C # Œ0 T$,10 be two fan strips. Without loss of generality, we assume that the triangles "!#!+D,.#!+D,10 and E # 0 are neighbors. may be linked if and only if!#ƒá # and!%d,10\á Œ0, :<@T06A "!#!+D,.#!+D,10 T$,10 Tristrips of length one (i.e., single triangles) are special. The vertex sequence in the E!#!0! can be permuted in cyclic order. This introduces variations in the basic algorithms for strip concatenation. Our concatenation algorithm achieves only the optimal concatenation for one pair of neighboring However, a strip of length one has three neighboring strips

32 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 22 which may be candidates for concatenation, and a strip of length greater than one has two terminal triangles, i.e., two candidates for concatenation. Thus, the order of concatenation may matter. For a better global optimization, three concatenation stages are performed, C each of which constructs concatenations that reduce the number of vertices by or vertices per concatenation. A direct addressing table can be used to store, for each triangle, the index of its incidental One pass through the table checks each triangle that has a valid strip index. Each such triangle s neighboring triangles are looked up in the table to find their incidental strips, which are neighbors One such strip is chosen to be linked to reduce the most number of vertices. The global optimization as mentioned above may be achieved by multiple passes through the table. A hash table may be used to replace the direct addressing table to save memory and computing time, though our implementation chooses the latter to ease the coding complication and yet the memory consumption and the increase in running time is negligible compared to the other parts of the program. In theory, two tristrips can potentially be concatenated in Step (5) by using either a zero-area triangle or a duplicate triangle. In practice, rendering triangles repeatedly may cause visual artifacts, depending on how the graphics hardware treats duplicates. With our stripification code the user can specify whether to allow no swap vertices, zero-area triangles, or zero-area triangles and duplicate triangles. 4.5 Results Set-up of Experiments We have conducted experiments on various platforms; here we report only on one representative platform: a Sun Ultra 30 with 512MB memory, running Solaris 2.6. The CPU-time consumption of our code, and of the other codes, was obtained by using the C system function getrusage(). We report both the system and the user time. Of course, any file I/O and similar pre- or postprocessing is not included in the timings reported. All CPU times are given in milliseconds. All codes were compiled with GNU s gcc, using the optimization level -O2. We compared FTSG against the leading publicly available system, STRIPE 2.0. (It has been released recently, and is orders of magnitude faster than the published [15] version, STRIPE 1.0.) All subsequent results have been obtained using STRIPE 2.0. For comparison purposes we also tested SGI s tomesh. Making STRIPE report the same type of statistics data as FTSG and tomesh turned out to be a cumbersome task. STRIPE has most I/O operations tightly interwoven with its algorithm, and its accounting is not entirely reliable. We modified STRIPE in order to exclude file I/O from timing. Also, we decided to parse the output generated by STRIPE in order to obtain the statistics data reported here. (Of course, the reliability of STRIPE was tested by running the original code.)

33 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 23 Our datasets included many standard models [3] available on the web, with sizes ranging from 32 vertices to 543,652 vertices (1,087,716 triangles). We tested a variety of 107 models, including models of buildings and crafts (designed on CAD systems), and models of animals and fictional characters that were typically derived from scanned data. We also included a few highly regular polyhedral models of machining tools. Typically, those models required only one or a very small number of sequential strips Statistics We first tried to determine experimentally which combinations of heuristics yielded the best results. Parameters in our tests included µ searching the dual graph by means of depth-first (-dfs), breadth-first (-bfs), or hybrid search (-hyb); µ using random marching (-rnd) or alternate-turn marching (-alt) during the graph search; µ enabling the use of zero-area triangles (-zero) or duplicate triangles (-dup) during the strip concatenation. µ generating sequential strips (-seq), fan strips (-fan), or both sequential and fan strips (-seq -fan). In all our tests FTSG was required to generate tristrips that are consistent with the orientation of the faces of a model (if such a consistent orientation existed). The results of our tests are summarized in Table 4.1, which lists, averaged over all our models, the average numbers of vertices per triangle and the average CPU time (in milliseconds) per triangle. The different heuristics are arranged in sorted order according to their performance. Using the alternate-turn heuristic for depth-first search and allowing zero-area triangles for concatenating purely sequential tristrips yielded the best results, with an average of 1.23 vertices per triangle. (The use of duplicate triangles further decreases this number by about 1%, but duplicate triangles have been ruled out since they might cause visual artifacts on some graphics hardwares.) In general, depth-first search with the alternate-turn heuristic yielded slightly better results than the hybrid search, and both performed by far better than breadth-first search. It is interesting to see that using fan strips in conjunction with sequential strips does not help to decrease the vertex count. This observation is also confirmed by Figure 4.6. It shows the percentage of the models the second-to-fourth best heuristics produced results that were at least times the results achieved by using -dfs -alt -seq -zero, or at most times the results for -dfs -alt -seq -zero (for j ). The combination -dfs -alt -seq -fan

34 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 24 method avg. V/T CPU (ms) -dfs -alt -seq -zero dfs -alt -seq -fan -zero hyb -alt -seq -zero hyb -alt -seq -fan -zero hyb -rnd -seq -zero dfs -alt -seq dfs -rnd -seq -zero hyb -alt -seq hyb -alt -seq -fan bfs -alt -seq -zero hyb -rnd -seq dfs -rnd -seq dfs -alt -fan hyb -alt -fan hyb -alt -fan -zero Table 4.1: Performance of different heuristics implemented in FTSG: average vertices per triangle ( V/T ) and CPU time (in ms). -zero is nearly identical (but slightly worse) than -dfs - alt -seq -zero. We conclude that using fan strips does not seem to pay off. We also determined the best combination of heuristics for the DP algorithm. The results of our tests are summarized in Table 4.2. As above, depth-first search using alternate-turn marching yielded the best result: on average, it needs 1.21 vertices per triangle (if concatenation by means of zero-area triangles is allowed), and consumes about milliseconds per triangle. When using pure sequential strips the average vertex count goes up to We compared FTSG against STRIPE 2.0. Since STRIPE cannot handle models with non-convex polygonal faces, which amounted to about 50% of our models, we used FIST to generate triangulations of our models. (STRIPE crashes or produces garbage when applied to concave faces.) In one series of tests, all convex faces were left untriangulated in order to allow STRIPE to triangulate them according to its own heuristics. STRIPE turned out to be unreliable at times, and we had to restrict our tests to those 88 (out of 107) models that STRIPE could handle. (FTSG has no problem handling any form of polyhedral model as it always uses FIST as a preprocessing tool for triangulating polyhedral faces. Note too that STRIPE becomes more reliable when using FIST as a front end.) For comparison purposes we also tested SGI s tomesh.

35 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS dfs -alt -seq -fan -zero -hyb -alt -seq -zero -hyb -alt -seq -fan -zero 60 Percentage of Models Multiplication Factor Figure 4.6: Encoding quality of heuristics of FTSG relative to using -dfs -alt -seq -zero method avg. V/T CPU (ms) -dfs -alt -DP -zero hyb -alt -DP -zero dfs -alt -DP hyb -rnd -DP -zero hyb -alt -DP dfs -rnd -DP -zero hyb -rnd -DP dfs -rnd -DP Table 4.2: Performance of different heuristics for the DP algorithm implemented in FTSG: average vertices per triangle ( V/T ) and CPU time (in ms). method avg. V/T CPU (ms) -dfs -alt -DP -zero dfs -alt -seq -zero dfs -alt -DP tomesh STRIPE (convex faces) STRIPE (fully triangulated) Table 4.3: Performance of the different stripification codes: average vertices per triangle ( V/T ) and CPU time (in ms).

36 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 26 The results are summarized in Table 4.3, and in Figure 4.7 and Figure 4.8. (We used FTSG s heuristics -dfs -alt -DP -zero for these comparisons.) The plots show the percentage of the models in which the other two codes produced results that were at least times the results of FTSG, or at most times the results for FTSG (for j ) STRIPE 2.0 (convex) STRIPE 2.0 (tris) SGI s tomesh Percentage of Models Multiplication Factor Figure 4.7: CPU-time comparison of the stripification codes w.r.t. FTSG -dfs -alt -DP -zero STRIPE 2.0 (convex) STRIPE 2.0 (tris) SGI s tomesh Percentage of Models Multiplication Factor Figure 4.8: Encoding quality of the stripification codes w.r.t. FTSG -dfs -alt -DP -zero FTSG was always faster than STRIPE or tomesh. On average, FTSG needs milliseconds (ms) per input triangle, tomesh needs 0.027ms, and STRIPE needs 0.071ms for fully triangulated faces respectively 0.263ms for non-triangulated convex faces. For 20% of the models, tomesh needed at least twice as much CPU time as FTSG. STRIPE

37 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 27 needed at least twice as much CPU time as FTSG for all models. For fully triangulated models it was at least five times as slow as FTSG for 18% of the models, and at least 10 times as slow for 6% of the models. For models with convex faces left untriangulated, it was at least five times as slow as FTSG for 45% of the models, 10 times as slow for 33%, and 20 times as slow for 22% of the models. On average, FTSG needs 1.21 vertices per input triangle, tomesh needs 1.36 vertices, and STRIPE needs 1.39 vertices for fully triangulated faces and 1.36 vertices for nontriangulated convex faces. 1 For 80% of the models FTSG performed better than STRIPE (if convex faces are left untriangulated). For fully triangulated models this percentage goes up to 93% for tomesh and 89% for STRIPE. For 38% respectively 55% of the models STRIPE needed at least 10% more vertices than FTSG. (For tomesh, this percentage was 53%.) While tomesh hardly ever generated encodings with fewer vertices than FTSG, STRIPE was better for 11% of the models, if convex faces are left untriangulated. As we have seen, this win for 11% of our models comes at the price of a CPU consumption that is drastically worse than FTSG s CPU consumption. Note that FTSG performs better than STRIPE or tomesh even when it does not use swap vertices, see the entry for -dfs -alt -DP in Table 4.3. STRIPE generates significantly fewer strips than FTSG, but still uses more vertices. We note that the objective of the current DP algorithm is to minimize the number of sequential tristrips. Sometimes this comes at the expense of quite a few singleton strips (i.e., strips of length one). We have started to experiment with modified objective functions that allow us to minimize the number of strips while avoiding the generation of too many singleton strips. We expect that a judiciously modified objective function will decrease the number of vertices per triangle. FTSG shows no significant variation of the main performance parameters. Its cpu-time consumption (per triangle) varies very little, as does the number of vertices per triangle. Summarizing, FTSG is orders of magnitude faster than the published STRIPE 1.0, and performs much more predictably (and typically better) than STRIPE 2.0 and tomesh, while being substantially faster on average. At last, we show tristrips generated by FTSG on two models in Figure 4.9 and Figure There are some cases in which our results for STRIPE differ from what is reported in [15]. There are two reasons for this: (1). STRIPE does not handle concave polygonal faces (thus, we pre-triangulated all concave faces prior to applying STRIPE); and (2). there are some errors and inconsistencies in how STRIPE counts vertices. Thus, our results are based on a careful parsing of the output set of tristrips from STRIPE (run with its default options).

38 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS Conclusion We have presented a detailed study of methods for efficiently encoding the (triangulated) surface of polyhedral models as sequential or fan tristrips. The overall winner as far as the compactness of the encoding is concerned is a method based on dynamic programming. It needs slightly fewer vertices while consuming slightly more CPU time than a method based on scanning a depth-first spanning tree of the dual graph according to the alternatingturn heuristic. In general, both methods need less CPU time and produce more compact encodings than the best published prior art, STRIPE 2.0, and they also compare favorably with SGI s tomesh. We anticipate that an improved objective function for the DP approach will help to improve our results even further. We also plan to optimize over all spanning trees, e.g., by branch and bound or by randomization. This will give the optimum (minimum) encoding of a model, and will allow us to compare our heuristics to the optimum.

39 CHAPTER 4. STRIPIFICATION OF POLYGONAL SURFACE MODELS 29 Figure 4.9: Results of FTSG stripification of the cow. Left: Stripified cow, with different strips having different colors; Right: A zoomed view, with spanning tree edges highlighted on the cow s head. Figure 4.10: Results of FTSG stripification of the shark. Left: Stripified shark, with different strips having different colors; Right: A zoomed view, with spanning tree edges highlighted.

40 Chapter 5 Optimal Sequential Stripification In this chapter, we consider the problem of finding a minimum number of pure sequential strips to partition a given triangle mesh. It has been shown by Estkowski [13] that this problem is NP-hard. Therefore, a polynomial-time algorithm is less likely to exist. We will, however, explore some optimization algorithms that run in exponential time in the worst case. 5.1 Introduction We have established a fast and effective stripification algorithm, namely, the path-peeling algorithm, based on a number of intuitive heuristics. We also built a linear-time dynamic programming algorithm that finds a minimum number of pure sequential strips to partition a spanning tree of the original triangle mesh. Experiments show that these algorithms run fast and find good stripifications. However, it is unknown how the quality of the stripifications can be compared with the optimal. On the other hand, users are often willing to spend more time off-line to obtain better stripifications, which can be compactly stored, along with the compressed original mesh, for repeated uses [24]. The criteria for optimal stripification may differ from application to application. Some interesting criteria are minimum number of tristrips, minimum number of rendering vertices, and minimum number of short strips. In this chapter, however, we focus on the following optimization problem. The Minimum Sequential Stripification Problem Given a 2-manifold triangle mesh, find a minimum number of pure sequential strips that subdivides (partitions) it. In Section 5.2, we reformulate this problem into an integer programming problem. Then in Section 5.3 we explore a branch and bound approach to solve this problem directly. In Section 5.4 we apply our optimization algorithms to improve the path-peeling algorithm. Some other issues are discussed in Section 5.5. We conclude our work in Section

41 I À A À Á À CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION Integer Programming In this section, we convert the minimum sequential stripification problem to an equivalent 0-1 Integer Program (IP). Given a surface triangulation, or triangle mesh,, assume that it is a 2-manifold; then each edge in belongs to at most two triangles. An edge is called an internal edge if it is shared by exactly two triangles. Otherwise, it is a boundary edge. The adjacency graph? of consists of nodes that represent triangles in and edges that connect adjacent triangles (nodes). These edges in? are called dual edges. Obviously, there is a one-to-one N correspondence between edges in? and internal edges in. Let e"? P? be the vertex set and edge set of? respectively. A sequential stripification of, denoted by ¹, is a set of disjoint sequential strips that subdivides (partitions). Each sequential strip corresponds to a simple path in?. These disjoint paths form a subgraph? r of? such that e"? r Ad e"? and º³ P? r Let us assign a 0-1 integer variable» ¼ to each edge ½ in? such that if» ¼¾A ½e P? r otherwise A cost function for the sequential stripification ¹ is then defined as follows, which is simply the cardinality of E¹» ¼ ¼ ÂqÃÄiÅ%Æ Ç P? P? r. Now we show the following theorem. Theorem 9 A sequential stripification of that minimizes the cost function À defined above consists of the minimum number of sequential strips. Proof. Let be the number of triangles in, and È be the number of boundary edges. Given a sequential stripification ¹ of, letfe¹ be the number of strips in ¹. For a strip I+ ¹, let be the number of triangles it covers. The number of edges (repetitions I+ counted separately) that wrap around the boundary of the strip is simply be shown by induction. If we sum over all the strips, we have Á pzâqé I+ E : : %fe¹ P?. :u. This can On the other hand, each wrapping edge that is internal is counted twice and each boundary edge is counted once. Further, the counted internal edges have a one-to-one correspondence with the edges in Ç. Thus, Á pnâcé P? I+ " : P? r A< W¹ :aè

42 À» À» Ì yx CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 32 and therefore W¹ AdfW¹ W¹ :aè À :wej& È : %fe¹ eadfw¹ : Ê Ë+ ICÌ K IP Formulation By Theorem 9, our IP problem is to minimize Í ¼ ÂqÃÄiÅÆ» ¼ under the constraints that the 0-1 assignments to the»t* s correspond to a legal sequential stripification of. x2 x3 x1 x4 x5 Figure 5.1: A local configuration of a triangle mesh and its dual. The constraints can be categorized into local and global ones. The local constraints are illustrated in Figure 5.1. The dashed line segments are the dual edges in the adjacency O graph. Assume that»».»». are the 0-1 integer variables assigned to the dual edges in the figure, they must satisfy the following inequalities,» :'». Î:»» :'» ª:».Ï». ª:'» :» :'» :».Ï

43 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 33 The first two local constraints ensure that the dual of a strip is a path, and the last two ensure that a strip follows the alternating turn pattern in order to be sequential Figure 5.2: A sequential cycle and its dual. There are also global constraints to ensure that any sequential strip has two ends. It is this fact that we used in the proof of Theorem 9 to show that any sequential strip containing triangles has j: bounding edges. Such constraints have to be imposed on sequential cycles, which are self-looping sequential strips. An example of such a strip and its dual is Q O O shown in Figure 5.2. The strip has the coding sequence of. In general, C C given any sequential cycle of triangles, let» #» 0» S be the 0-1 integer variables assigned to the edges in the dual of the cycle, they must satisfy» #M:» 0 : :'» SÐ We present an example to indicate that the global constraints are necessary for obtaining an optimal solution. As shown in Figure 5.3, we triangulate a x regular grid, and fold it to form a prism. It can be verified that one or two sequential strips are not sufficient to partition the whole mesh. However, we can cover each side of the prism by one sequential strip so that three disjoint strips suffice to cover the mesh. The cost function has value. We can also stripify the model by using four sequential cycles that circle around the side of the prism. Without specifying the global constraints, the cost function has a smaller value of _. It contradicts Theorem 9. By applying the global constraints, the cost function has a greater value of.

44 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 34 Figure 5.3: Folding a regularly triangulated grid into a prism. Theorem 10 In the IP formulation indicated above, the number of local constraints, global constraints, total constraints and the number of occurrences of integer variables in all constraints is kle in the worst case. Furthermore, all constraints can be found in linear time. Proof. Without causing confusion, we use»t* to denote both the 0-1 integer variable assigned to an edge in? and the edge itself. As shown in Figure 5.1, in the four local constraints that are primarily associated with edge» #, as listed above, the first two can be seen as determined by the two end points of the edge, while the other two bond with the edge itself. So the total number of local constraints is no more than twice the number of edges, plus the number of vertices in?. It is kl" in the worst case. They can certainly be established in linear time. On the other hand, edge» # may appear in at most two sequential cycles, passing triples E» 0» #» Ñ and E»» #»TF, respectively. Thus each edge in? contributes to at most two global constraints. That implies that the total number of global constraints is also ~ E, as is the number of occurrences of the integer variables in the constraints. There are cases in which the number of global constraints can be Òe". An example, similar to the one shown in Figure 5.3, can easily be constructed by folding a regularly triangulated x grid into a prism. There are sequential cycles that circle around the side of it. To find global constraints avoiding redundancy, we assign each dual edge two flags, one for each pattern that a sequential strip may use to pass the edge. Initially, all flags are marked as unused. As a flag is unused, we use it to generate a sequential strip. All edges along the strip are updated with the proper flags. A global constraint is found if the strip

45 2 yx CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 35 turns out to be a cycle. As each edge flag is checked and updated only once, and the number of global constraints and the integer variables they contain is ~ ", all global constraints can be built in linear time Reducibility to Set-Covering Problem The integer program established above can readily be transformed into a set-covering problem described below. The Set-Covering Problem Given a collection o of subsets of a finite set ¹, find a subcollection o r of o with minimum cardinality, such that each element in ¹ belongs to at least one member in o r. Let ¹ be the set of all constraints. We observe that one constraint is satisfied if any one of the variables it contains equals one. Therefore, we can associate each variable»t* with a subset of ¹, namely Ól*, that consists of all the constraints containing»t*. If»T* equals one, all the constraints in Ól* are satisfied. Then o AH) Ól* is a collection of subsets of ¹ such that Ô Ól* Õ`¹. Thus the problem of minimizing Í ¼ ÂqÃÄiÅ%Æ» ¼ so that all constraints are satisfied turns out to be equivalent to finding a minimum number of members from o to cover ¹. The reduction procedure can be carried out as follows. We initialize an empty set for each integer variable in the IP formulation shown above. Examine the constraints one by one in order, and put them (as elements) in the sets associated with the variables they contain. As the number of occurrences of all of the variables is ~", the process takes linear time. By inspecting Figure 5.1, we also observe that each 0-1 integer variable»t* exists in at most 8 local constraints and 2 global constraints. Therefore, each corresponding set Ól* contains at most 10 elements. Thus we end up with a variation of the set-covering problem, the Minimum 10-Set Cover, in which the cardinality of each set in o is bounded from above by. In summary, we have the following theorem. Theorem 11 The minimum sequential stripification problem can be reduced, in linear time, to the problem Minimum 10-Set Cover Solving with CPLEX ILOG CPLEX [8] is a dedicated commercial optimization software that can solve mixed integer programs. We have its version 6.0 installed on a Sun4c with MB memory, running SunOS U1. Based on the reduction procedure described in Section 5.2.1, we

46 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 36 x11 x10 x13 x12 x8 x7 x9 x2 x6 x5 x4 x1 x3 Figure 5.4: A small triangle mesh and its dual. wrote a program to convert the minimum sequential stripification problems into 0-1 integer programs. As an example, let us revisit the small mesh shown in Figure 5.2. We redraw the mesh in Figure 5.4 and label the dual edges in the way that our IP converter interprets them. The generated optimization problems are stored in standard MPS format. We then run CPLEX to read in the problem, which is displayed as follows. Minimize obj: x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + x12 + x13 Subject To c1: x1 + x2 + x5 >= 1 c2: x1 + x3 + x4 >= 1 c3: x1 + x3 + x5 >= 1 c4: x1 + x4 + x5 >= 1 c5: x2 + x5 + x9 >= 1 c6: x2 + x5 + x13 >= 1 c7: x2 + x12 + x13 >= 1 c8: x3 + x4 + x5 >= 1 c9: x3 + x4 + x6 >= 1 c10: x4 + x5 + x9 >= 1 c11: x4 + x6 + x7 >= 1 c12: x4 + x6 + x9 >= 1 c13: x4 + x8 + x9 >= 1

47 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 37 c14: x5 + x9 + x12 >= 1 c15: x6 + x7 + x8 >= 1 c16: x7 + x8 + x9 >= 1 c17: x7 + x8 + x10 >= 1 c18: x8 + x9 + x12 >= 1 c19: x8 + x10 + x11 >= 1 c20: x8 + x10 + x12 >= 1 c21: x8 + x11 + x12 >= 1 c22: x9 + x12 + x13 >= 1 c23: x10 + x11 + x12 >= 1 c24: x11 + x12 + x13 >= 1 c25: x1 + x2 + x3 + x6 + x7 + x10 + x11 + x13 >= 1 Bounds 0 <= x1 <= 1 0 <= x2 <= 1 0 <= x3 <= 1 0 <= x4 <= 1 0 <= x5 <= 1 0 <= x6 <= 1 0 <= x7 <= 1 0 <= x8 <= 1 0 <= x9 <= 1 0 <= x10 <= 1 0 <= x11 <= 1 0 <= x12 <= 1 0 <= x13 <= 1 Binaries x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 In the constraints shown above, are local ones and the last one is global. CPLEX solves this IP problem in seconds and returns an optimal solution with objective being equal to 5. The variables» #»TF» Ñ» Ö» #"0 equal and all others equal. By removing the dual edges corresponding to the 1-valued variables, we end up with two sequential strips whose dual paths are shown in Figure 5.5. As a well-established optimization software, CPLEX can be expected to perform reasonably well over general IP problems. However, we wish to develop independent programs that directly solve the minimum stripification problem. By doing so, we also explore potential special structure in our specific problems and hopefully derive more efficient algorithms.

48 h CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 38 x11 x10 x13 x12 x8 x7 x9 x2 x6 x5 x4 x1 x3 Figure 5.5: The dual graph of a sequential stripification Implicit Enumeration Implicit enumeration is a commonly used branch-and-bound method that solves 0-1 IPs. Each branch of the tree, as shown in Figure 5.6, will specify, for some edge node 4, that»t* A or»t* A. At each node, after branching, the bounding scheme will then determine whether it is feasible and if feasible, whether the best completion of the current node (not necessarily feasible) beats the best available solution. Branching right is always feasible and increases the cost function by one, while branching left does not increase cost, but can be infeasible. The actual traversal of the tree can be carried out by using either the breadth-first search (BFS) or the depth-first search (DFS) protocol. All the tree nodes, except the leaves, are called incomplete nodes, as they contain unspecified edges. By using BFS, one may need to maintain a priority queue for the incomplete nodes discovered in the search. The queue size can grow exponentially. In a typical triangle mesh, the number of edges, and therefore the corresponding dual edges or variables, is about more than the number of triangles. Thus, system memory can easily run out for models with over triangles. On the contrary, using DFS requires only linear working space. The search always ends up in a complete node (a leaf ) before it jumps. The leaf provides a new feasible solution, which can be compared with the current best solution. Thus, no intermediate node needs to be stored. However, it is less efficient in running time. A mixture of both search schemes may provide a balanced performance. We implemented the DFS version of the method. Our program can be directly applied to triangle meshes for optimal stripification. No constraints need to be explicitly established. However, we suspect that CPLEX, as a more sophisticated IP solver, may run faster than

49 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 39 Edge Edge Edge Edge n Figure 5.6: The binary decision tree. our simple approach. For comparison, we run tests on randomly-generated grid models, each of which contains triangles. (Section will explain how they are generated.) The platform is a Sun4c with MB memory running SunOS U1. We observe that both methods output the same optimal objective value for each tested model, as indeed they should. By using CPLEX, we recored an average running time of ^ seconds per model, while implicit enumeration method consumes an average of O seconds per model. Note that the CPLEX running time does not include the time needed to construct the IP formulation. (It is done by a separate conversion program as described before.) However, the linear conversion time is negligible. Thus, our simple implicit enumeration approach is about orders of magnitude slower than using CPLEX. In the next section, we will try another approach using a branch and bound algorithm. 5.3 Branch and Bound Instead of converting the minimal sequential stripification problem into a 0-1 integer program as described above, in this section, we apply a branch and bound method directly to the original problem Branch-and-Bound Scheme First of all, we describe our procedure of enumerating all of the stripifications.

50 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 40 At any stage of the procedure, when a set of sequential strips has been recovered to consume part of a triangle mesh, choose a free triangle that is not covered by any strip in the set. Lemma 12 There are ~ " remaining mesh. 0 sequential strips that can pass through this triangle in the Proof. As shown in Figure 5.7, there are three different ways in which a sequential strip can pass through a triangle. For each of the three ways, a sequential strip can extend in two directions from the triangle. There are at most ~ E triangles in each direction. Thus, there are at most ~ E 0 different sequential strips passing through the triangle. xy Figure 5.7: A sequential strip can pass through a triangle in three different ways. There are many ways to enumerate these strips. In our implementation, we adopt a method that tends to process the longer strips first. For each one of three ways in which a strip can grow, we start one from the triangle in one of the two directions, say, the left direction, until it hits either the boundary of the mesh or the strip itself. This extremal left hand strip can then be shortened one triangle at a time. For each fixed left hand strip, we can extend it in the other direction from the triangle until it can no longer be grown. Then this right hand strip can be shortened one triangle at a time. Thus, we can enumerate all sequential strips that pass through a given triangle. For each such obtained strip, we add it to the partial solution. If the whole mesh is covered, we have reached a solution; otherwise, we continue the above process. The enumeration procedure above can be seen as traversing a branch and bound (or, in short, B&B) tree of ~" height, each node of which has degree ~" 0. Next we describe

51 À À I I I * CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 41 how to establish some lower bounding schemes to fathom as many nodes of the B&B tree as possible. Consider a vertex,!, of the triangle mesh. It has many triangles incident on it. Some have been used within strips (at some stage of the algorithm), and other triangles are unused (or uncovered ), so far. The unused triangles, in general, form a set of sectors consisting of connected fan strips around!. Let us say they have cardinalities ]# Lemma 13 A sequential tristrip can consume ( cover, or use ) locally at most 3 triangles incident on!. Further, if it consumes less than 3 triangles, then one of the strip s end triangles is incident on!. Proof. The proof is based on a simple local investigation of the cases in the neighborhood of!. xy Thus, each sector on! will contribute to the end triangles of at least one sequential. Let strip if its cardinality is not ž XØ Then we have, *RA if ]q* A otherwise Lemma 14 In any completion of the partial stripification, there must be at least Í * tristrips that have an end triangle incident on!, with! incident on at most 2 of the triangles in the strip. Now, look at a sequential tristrip. It has two end triangles (only one if it is a trivial strip of only 1 triangle). Look at the vertices incident on these 2 end triangles. There are 6 of them, in general. However, we claim that at most 4 of them are vertices that are incident on at most two of the triangles of the strip. (In the case of a 1-triangle strip, the total number of such vertices is simply 3.) Lemma 15 At most 4 vertices of a tristrip are incident on ` triangles of the strip. Let us say that! receives a charge from a strip > if! is incident on at most 2 of the triangles in >. (Necessarily these triangles will be end triangles of > ). Then, we have shown that! is charged at least an amount À Š A<Í * *, so the total amount of charges over all vertices is at least Í Š Š. On the other hand, each strip can result in at most 4 charges, so the total charge is at most RÙ (where RÙ is the number of strips in a completion of the stripification). Thus, Ù Í Š Š. ] 0 ž XØ

52 À CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 42 If we keep track of the quantities À Š, for each vertex!, as we proceed, then any time we get to a node in the B&B tree where Í Š Š, plus the current number of strips (the ones that are already part of the partial solution), is no less than the best (complete) stripification found so far, we know that we do not have to explore the B&B tree below this node we are doomed to obtain a result that is no better than the best solution found so far. Initially, we use the sequential stripification generated by the DP algorithm in FTSG as the best complete stripification found so far. If it is close to the optimal solution, it may help to speed up the optimization process. Implementation Issues A key issue in implementing the algorithm is to efficiently update the strip lower bound when visiting new nodes. From the analysis presented above, one can update the lower bound locally by recalculating À Š for those vertices whose incident faces have changed. The computing time at each of those vertices is expected to be constant. Note that the new lower bound is established as if the remaining triangle mesh is still one connected component. It is certainly better to compute lower bounds componentwise and summing them up. However, maintaining connected components requires higher cost. There are cases for which the above bounding scheme results in trivial lower bounds ( or ). Figure 5.8 shows such an example for which our fathoming rule implies a lower bound of. (It actually requires disjoint sequential strips to cover the example.) To improve the lower bound, one may further conduct a one-strip test (in linear time [2]) to determine whether one sequential strip can cover the whole mesh. If so, no further fathoming is needed on that component. If not, a lower bound of 2 strips is obtained. We implemented all of the schemes discussed above. Experimental results are displayed in However, unless explicitly indicated, only the local algorithm is applied to update lower bounds for its simplicity and efficiency, as will be demonstrated below Experiments To test our branch-and-bound method, we generate some small random grid models and sphere models. The grid models are generated by randomly triangulating every rectangle (by randomly picking one of the two diagonals) in an x regular grid. To build sphere models, we first use the sphere program [27] by O Rourke and Xu to generate random points on or near a sphere, and then apply the qhull program [5] of Barber and Huhdanpaa to obtain the triangulated convex hulls. Comparison with CPLEX As before, we run comparison tests on a Sun4c with MB memory running SunOS U1.

53 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 43 Figure 5.8: For the small triangle mesh shown above, we obtain a lower bound of our fathoming rule. By applying the one-strip test, we obtain a better bound of. using By testing the branch-and-bound method on the same grid models used in Sec- slower than tion 5.2.4, we record an average running time of Ž_ seconds, which is h using CPLEX but is much faster than using implicit enumeration. We also run tests on some larger models: grid ones and sphere ones, each containing triangles. For each of these, we verify that both CPLEX and the branch-andbound method generate the same optimal number of sequential strips. The average running times on the two sets of models are listed in Table 5.1. Note that the CPLEX running time does not include the time required to obtain the IP formulation. Method Time(s) Grid Sphere B&B CPLEX Table 5.1: The average running times using both CPLEX and the branch-and-bound method on grid models and 10 sphere models, each containing triangles. It is interesting to notice that our B&B method runs faster on sphere models than on grid models, and CPLEX behaves contrarily. Indeed, the B&B method is roughly times faster than CPLEX on sphere models. However, it is times slower on grid models. We notice that the IP formulations of these sphere models contains _ h more constraints than that of grid models in average ( vs. ). This may explain why CPLEX

54 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 44 No. of triangles No. of constraints Running CPLEX Time (s) B&B Table 5.2: The running times using both CPLEX and the B&B method on some small triangle meshes. runs slower on the sphere models. On the other hand, fewer strips are required to cover a sphere model than a grid model (Table 5.3). That probably implies a smaller B&B tree for a sphere model than for a grid model. This may explain why the branch-and-bound method runs faster on sphere models. We also run both methods on some small triangle meshes obtained from real-world models, by grouping short strips (obtained using FTSG) into connected components. Table 5.2 shows the running times. Both methods seem to run faster on these small meshes. However, the B&B method exhibits more variation in running time. We will investigate this issue later. Optimization versus Dynamic Programming We now show how the optimal number of sequential strips compares with what is generated by dynamic programming (DP). The following experiments are run on a Sun sparc Ultra- 30, running SunOS 5.6 with 512MB memory. Table 5.3 lists the number of sequential strips generated by the branch-and-bound algorithm and DP, respectively, on the grid models and sphere models tested above. The options used for DP are -dfs -alt -DP. Also listed in the table are the percentages by which DP increases the number of sequential strips over the optimal solutions. To investigate the average performance of our branch-and-bound approach, we generate _ groups of random sphere models. Each group contains models of the same size. The model sizes for different groups range from to _. The average running time (in milliseconds) for each group is computed and is drawn in Figure 5.9. Note that the Ú -axis (for the running time) is log-scaled. Those data points are well fitted by the line whose function is obtained using a least-squares method. The fitting function Ú A<Û3ÜOÝ» & is exponential. One may use it to estimate the expected running time of our optimization algorithm on a sphere model. For example, optimizing a mesh containing triangles can be expected to take two and a half hours. For comparison, the DP algorithm of FTSG runs in a few milliseconds. We also show in Figure 5.10 how the B&B method generates fewer strips as time goes by, on a sphere model of _ triangles. The B&B method starts with a stripification

55 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 45 Grid Sphere OPT DP % OPT DP % Table 5.3: The number of strips generated by optimization and DP on grid models and sphere models, each containing triangles. 1e+008 1e+007 exp(0.18*x-2.05) Average running time 1e+006 Running time (millisecs) Number of triangles Figure 5.9: The average running time grows exponentially with the problem size.

56 Þ CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 46 obtained by DP, containing strips, and eventually finds an optimal solution with strips Number of sequential strips obtained e+006 Time (millisecs) Figure 5.10: The number of sequential strips obtained by the branch-and-bound method decreases as running time increases. Practically, one may wish to spend a reasonable amount of time running the branch-andbound method, and return the best obtained solution at the end of the allocated time. We investigate this issue by running the following experiments on our full suite of models. For each model, we run the B&B method for a time equal to times the DP running time, where la< %, then we record the number of sequential strips obtained at the end of each time period. The results show that for la %, we obtain improvements over DP on h ( _ ) of the models. Table 5.4 shows how the number of strips changes with for a few models. The column for A shows the number of strips obtained by DP. Later, in Section 5.4, we introduce a more effective approach, namely patch optimization, to improve stripifications obtained by DP. We show both optimal and DP-generated stripifications on two small models in Figure 5.19 and Figure Efficacy of Fathoming Rule As demonstrated above, our branch-and-bound method is exponential. However, we will show that it is still a big improvement over brute force. No fathoming rule other than the trivial one ( strip for the remaining mesh) is applied in the brute force method. Both methods were run on random sphere models, each containing triangles. The running time in milliseconds and the number of tree nodes visited are listed in Table 5.5.

57 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 47 Model Verts Tris k compdesk (opt) doors extrude pilot roadarm (opt) tool (opt) Table 5.4: The number of strips obtained by the truncated branch-and-bound method at the end of time period equal to times the DP running time. Model Running Time(ms) Nodes visited B&B Brute Force B&B Brute Force Table 5.5: The running time and the number of nodes visited by the branch-and-bound method and the brute-force method on sphere models, each containing triangles.

58 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 48 The effectiveness of the fathoming rule is apparent, as our branch-and-bound method visits to orders of magnitude fewer nodes and runs about orders of magnitude faster than the brute force. More fathoming In the above experiments, we apply only the local algorithm to update the lower bound in the branch-and-bound method, as described at the end of Section We now compare this simple approach with the scheme that computes lower bounds componentwise. At each new node in the B&B tree, we use a breadth-first research to determine the connected components in the remaining mesh. We calculate a lower bound for each component and sum them up. Further, for each component for which we obtain a trivial bound ( or ), we can apply the one-strip test, as described in the end of Section In Table 5.6, we show the running time in milliseconds and the number of tree nodes visited by using various bounding schemes. Model Running Time(ms) Nodes visited Local Component One-strip test Local Component One-strip test Table 5.6: The running time and the number of nodes visited by using various bounding schemes on sphere models, each containing triangles. It shows that, by computing a lower bound componentwise, we generally obtain tighter lower bounds and thus screen out more nodes than using the local scheme. However, due to the higher cost for deriving component information, the running time goes up by roughly one order of magnitude. By further applying a one-strip test, more nodes may be fathomed. However, the effectiveness of the test varies from model to model. As an example, for model, we obtain trivial lower bounds for _h of components encountered, and only Žh of those are not one-strip coverable. For model, however, h of the components have a trivial lower bound and h are not one-strip coverable.

59 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 49 Randomization Figure 5.9 shows the average performance of our optimization algorithm. However, when inspecting the individual running time of the branch-and-bound method on models of the same size, we notice a variation of up to three orders of magnitude. In Table 5.7, we list the running times on these grid and sphere models used for establishing Table 5.3. It indicates that the performance of our algorithm is highly dependent on input models. More likely, it depends on the structure of the B&B tree generated for the input models. 1. If an optimal or near-optimal solution is found earlier in the search (in the case that a lucky B&B tree is used), it will help greatly to speed up the enumeration. 2. The structure of the B&B tree used may also affect the effectiveness of the lower bounding scheme as introduced in the previous subsection. Grid(s) Sphere(s) Table 5.7: The running time of the optimization algorithm on grid and sphere models. To investigate further how the performance of our optimization algorithm can vary with the B&B tree used, we incorporate randomization into the algorithm. At the start of the branch-and-bound procedure, all triangles are randomly permuted. Also for each triangle, the starting way to grow a sequential strip passing that triangle is also randomly determined. We pick the third sphere model in Table 5.7 to test our randomized algorithm. The running times for consecutive runs are listed in Table 5.8. Run Time(s) Table 5.8: The running time of the randomized optimization algorithm on runs of a sphere model. It shows that randomization can cause dramatic change in the running time on different runs of the same model. The best and worst running times can differ by several orders of magnitude. To see the distribution of the running time, we made a total of runs on the same model. The histogram is shown in Figure While the average running time over runs is seconds, the histogram shows a high probability that the algorithm can finish in a much shorter time. Therefore, we decided

60 ã ç A A A A A ã å S ê ã Ì ã # Ì 0 Ì Ì # Ì Ì S S ä Ì CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION Frequency percentage Running time (seconds) Figure 5.11: The histogram of running time with step size. to test the idea of making parallel runs of our randomized algorithm on a given model in a round-robin fashion. The program stops when some run successfully finds an optimal solution. In such a way, we hope to reduce the expected running time. To simplify the analysis, we ignore the scheduling time for arranging parallel runs. Let Ì * be the running time for the 4 -th run, and ß.S be the running time of the -run approach. Then Ìá Let â and ßRSàAw ž ŸY R áì CáÌ be the cumulative distribution function (CDF) of Ì *, then Ìá C CNÌ Eß.S ä "ž ŸY R * ä *-æ.# A &gâ N S WßRS Ìááë Ì è é Eß.S ä N è ê é &gâ S ë Ì Ìáá è ê é & â S ë Ì

61 ç ì ç ç ç CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 51 Using the histogram shown in Figure 5.11, we numerically evaluated Eß.S for q 'A. The data is drawn in Figure It shows that the -run approach may indeed, Eß.S attains reduce the expected running time to find an optimal solution. When ƒa the minimum Expected running time (seconds) Number of "parallel" runs Figure 5.12: The expected running time varies with the number of parallel runs on a sphere model. We also observe a similar behavior on a grid model of triangles, for which the îí WßRS graph is shown in Figure Eß.S reaches the minimum at A, whereas these expected values are close. 5.4 Patch Optimization The running times of the optimization algorithms discussed above grow exponentially with the model size. Practically these algorithms can only be used to handle models containing several tens of triangles Algorithm In this section, however, we investigate an approach that incorporates the optimization algorithms with the path-peeling algorithm. In such a way, we hope to find better stripifications by consuming a reasonable amount of CPU time. The new approach, which we call patch optimization, is described as follows. Given a triangle mesh, we first apply the path-peeling algorithm to obtain a set of sequential strips. Then, according to a pre-specified cut-off size, we categorize those strips

62 ì CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION Expected running time (seconds) Number of "parallel" runs Figure 5.13: The expected running time varies with the number of parallel runs on a grid model. into two groups. One contains the strips of length no less than the cut-off size, and another contains the remaining short strips, which will be further processed. The triangles in these short strips can be grouped by edge connectivity into connected components, or patches. We define the patch size to be the number of triangles in the patch. Ideally, we wish to optimize all of the resulting triangle patches. However, some patches may contain a large number of triangles, and our optimization algorithm can only handle components of small size practically. Thus, we have to break large patches into smaller ones of bounded size. In other words, short strips are only grouped to form patches of bounded size. Eventually, these triangle patches are optimally stripified. In FTSG, we already implemented an optimal path-peeling algorithm, using DP, to decompose a spanning tree of a triangle mesh into a minimum number of sequential strips. It can be seen as a global optimization on a reduced mesh, as some original connectivity information may be ignored in the spanning tree. By further applying the patch optimization algorithm as described above, some previously ignored connectivity information can be utilized to regroup the short strips into small patches that are to be optimized. We thus improve upon the global optimality by some local optimality. The crucial part in this algorithm is grouping short strips into small patches of bounded size. We say that two strips are adjacent if one contains a triangle that is adjacent to a triangle in the other. We experimented with two different approaches to group strips. The first approach is a simple greedy method. Starting from a strip, we initiate a triangle patch to include all of the triangles in the strip. We then check all of its adjacent strips in

63 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 53 a breadth-first manner, and add a strip to the patch if its new size does not exceed a prespecified bound. We also tried a prioritized approach. In the beginning, all candidate strips are sorted according to their lengths. During the process when some patches may already be established and there are still leftover strips, a strip of shortest length is chosen to initialize a new triangle patch. We add a new strip to the patch if and only if it is the shortest one among all the strips adjacent to the patch and the new size of the patch does not exceed the pre-specified bound. In patch optimization, there are two adjustable parameters, the strip cut-off size and the patch size bound. The former shall not exceed the latter as strips of length no less than the latter are already optimal. Asymptotically, we can expect that the larger the two parameters are, the better the quality of the resulting stripification gets and the slower the algorithm runs Experiments Our tests are carried out on the same Sun sparc Ultra-30 as before. We run experiments on a suite of polygonal models that are mostly downloaded from the web, especially from Viewpoint s Avalon 3D Data Repository [3], Geo-metricks [16] and DIGIGRAPH [11]. These models are first triangulated by Martin Held s FIST [22] program before being stripified by our program. The strip concatenation option is disabled for now so as to exclusively discover the effectiveness of the patch optimization algorithm. We first set the patch size bound to, and measure the average number of sequential strips obtained using various strip cut-off sizes. The FTSG options used are -dfs -alt - DP -patch, with the -patch option to enable the patch optimization algorithm. Both the greedy patching method and the prioritized method are tested and compared. Figure 5.14 shows how the average number of strips varies with the strip cut-off size for the two different patch growing methods. It clearly indicates that the prioritized method has the advantage over the greedy method. For the former method, the average number of strips decreases monotonically as the strip cut-off size increases. When the cut-off size reaches, we obtain the best average number of , which is i h fewer than that obtained by DP. Note that there is virtually no discernible improvement after the cut-off size becomes larger than. However, for the prioritized method, the average running time increases from to seconds per million triangles when the strip cut-off size increases from to. This can be expected, since more strips are processed. Nevertheless, the best and worst average running times are still of the same order. That makes it reasonable to set the strip cutoff size equal to the patch size bound in the future experiments. Next, we show how the performance of our algorithm changes with the patch size bound. We run experiments for various bounds ranging uniformly from to. The strip

64 ï CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION Greedy Prioritized 1050 Average number of strips Strip cut-off size Figure 5.14: The average number of strips varies with the strip cut-off size. Patch size VPT Strips Time(s) DP Table 5.9: The performance of the patch optimization using different patch size bounds.

65 ï CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 55 concatenation option is also disabled. The first two columns in Table 5.9 list the average vertex per triangle ratio (VPT) and the average number of sequential strips, both of which decrease as the patch size increases. The second row in the table lists the results for the original DP. In Figure 5.15 we show how the average number of strips changes with the patch size Average number of strips Patch size Figure 5.15: The number of strips decreases as the patch size bound increases. The third column in Table 5.9 lists the running time of each run in seconds per million triangles. The data points are drawn in Figure 5.16 and connected by line segments. Note that the running time (Ú -axis) is log-scaled. We can see that, as the patch size bound increases, the running time can grow exponentially. We show triangle patches generated by our prioritized method, as well as the final stripification on a cow model in Figure Other Issues Orientation In the above discussions of the optimization algorithms, the orientations of the mesh triangles are not considered in generating strips. Therefore, the leading triangle in a sequential strip may have flipped orientation. One extra bit per strip is needed to specify whether such a flip occurs or not. However, if we take the orientation issue into account in our algorithms, we can prevent such improperly oriented strips from being generated. It is practically important as the

66 ì CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION Average running time (seconds) Patch size Figure 5.16: The running time grows exponentially with the patch size bound. widely used OpenGL requires that a triangle strip respects the original orientation of the initial triangle. First of all, we discuss how to modify the integer programming formulation in order to respect orientations. While all of the constraints we described in Section are kept intact, new constraints are needed to prohibit such improperly oriented strips. As discussed in Section 4.4 of Chapter 4, only strips of even length have to be considered. Note also that a strip containing two triangles can always be fixed by rearranging the vertex order to respect the orientation of the initial triangle. Thus, we only consider strips whose length is even and no less than 4. Figure 5.17 shows such a sequential strip and its dual. All triangles are oriented CCW. However the vertex order in the strip flips the initial triangle s orientation to CW. Such a strip cannot be allowed; on the other hand, it can be part of a longer strip that respects the original orientation of the initial triangle. Thus, we come up with the constraint» #M:» 0 :»» ê»tf+ If both» ê and»tf equal, i.e., the corresponding dual edges are absent from the dual of the stripification, the constraint becomes» #œ:» 0 :». It ensures that the dual edges corresponding to» #» 0» cannot all exist in the stripification dual. However, if either» ê or»tf equals, then the above constraint becomes» #.:G» 0 :G», which allows the four triangles in Figure 5.17 to be part of a longer strip. can be boundary edges, and therefore» ê or»tf may not exist. In Edges and such cases, the missing variables are replaced by the constant. Thus, for each improperly oriented sequential strip of even length ( ), we have a

67 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION x0 x1 x2 x3 x4 1 2 O Q Figure 5.17: In the strip, the initial vertex order changes the orientation of the leading triangle from CCW to CW. constraint like the one shown above. There can be ~ " such strips starting from each triangle, and therefore there can be ~" 0 such constraints in total. The new IP formulation is more complicated due to the quadratic number of constraints and non-linear terms. Next, we will show that it is rather convenient and straightforward to modify the branch-and-bound method to handle the orientation issues. During the enumeration process, when a set of sequential strips is already found to cover part of the mesh, there are uncovered triangles in the remaining mesh. From Figure 5.7, we know that a sequential strip can start from an uncovered triangle in three different ways to respect the triangle s orientation, and there are ~" such strips. Enumerating over all the triangles, we will find ~ " 0 such strips in total. Each of these strips is added in turn to the existing partial solution. If there are still uncovered triangles, we continue the above procedure. The same fathoming rule as introduced in Section can also be applied in this modified enumeration process Maximal Sequential Strips So far, we have considered the problem of partitioning a given triangulation into a set of sequential tristrips so that no triangle is specified more than once. It is also interesting to study the problem in which we allow multiply specified triangles. Not only do we permit two sequential strips to cross each other, but also we allow a sequential strip to selfcross, as shown in Figure Ì3óQôáónõ1ö Let ð be a triangulation containing ñ triangles. For any triangle Ì in ð, we use ò to denote a passing pattern in which a sequential strip can pass through triangle Ì using the ô th and õ th edge of Ì, where ônónõ( ø ó3ùóqú and ô û'õ. Apparently, there are exactly three passing patterns for each triangle.

68 ò CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 58 Figure 5.18: Left: two sequential strips crossing each other. Right: one self-crossing sequential strip. Let ü be the set of all passing patterns in ð, and ý be a relation on ü such that Ì3ø óqôáø ónõtø ö ÌáùóQônùóÿõùö ýþò if there is a sequential strip connecting them. It is easy to verify that ý is an equivalence relation. Therefore, all of the derived equivalence classes form a a maximal (sequential) strip on partition of ü. We call each such equivalence class in ü ð. Note that maximal strip(s) can overlap. Also note that a maximal strip either forms a self-loop or has two hard ends on the boundary. We denote the set of all maximal strips on ð by. A subset of is called a maximalstrip cover of ð if each triangle in ð is covered by a strip in. It is easy to see that any has triangles. As an analogy to the traditional set problems, we can also post the following optimization problems. complexity "ñ since it specifies at most ú ñ Minimum Maximal-Strip Cover: find a subset of with minimum cardinality. Minimum Exact Cover: find a subset of such that the sum of the cardinalities of all sets in is minimum. There exist approximation algorithms to the above problems that obtain solutions with ø objective being within ñ times the optimality [25]. We show in Figure 5.22 a maximal sequential strip that almost covers the whole triangulated surface model.

69 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION Conclusion We have devised an integer programming formulation for the problem of finding a minimum number of (disjoint) sequential strips to cover a given triangulation. We then solve the IP using CPLEX. We also develop a branch-and-bound method to solve this problem. Further, we incorporate the optimization algorithms into the path peeling algorithm and obtain improved stripifications on a large variety of 3D models, while consuming a reasonable amount of CPU time.

70 CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 60 Figure 5.19: Sequential stripifications of a grid model containing triangles. Left: strips are obtained using branch-and-bound method in ù ø ø seconds. Right: strips are obtained using options -dfs -alt -DP in ø seconds. Figure 5.20: Sequential stripifications of a sphere model containing triangles. Left: strips are obtained using branch-and-bound method in ú seconds. Right: ø ø strips are obtained using options -dfs -alt -DP in ø seconds.

71 ú CHAPTER 5. OPTIMAL SEQUENTIAL STRIPIFICATION 61 Figure 5.21: Left: patches obtained by grouping sequential strips (generated by DP) of length ûwø into connected components of size. Right: the final stripification obtained after optimally decomposing each patch into a minimum number of sequential strips. Figure 5.22: One maximal sequential strip that almost covers the whole cow model, except for a few triangles (in white). Subsequent triangles in the strip are shaded darker and darker.

QUADRILATERAL MESHES STRIPIFICATION

QUADRILATERAL MESHES STRIPIFICATION Proceedings of ALGORITMY 2005 pp. 300 308 QUADRILATERAL MESHES STRIPIFICATION PETR VANĚČEK, RADEK SVITÁK, IVANA KOLINGEROVÁ, AND VÁCLAV SKALA CENTRE OF COMPUTER GRAPHICS AND DATA VISUALIZATION DEPARTMENT

More information

Tunneling for Triangle Strips in Continuous Level of Detail Meshes

Tunneling for Triangle Strips in Continuous Level of Detail Meshes Tunneling for Triangle Strips in Continuous Level of Detail Meshes A. James Stewart Dynamic Graphics Project Department of Computer Science University of Toronto Abstract This paper describes a method

More information

Single Triangle Strip and Loop on Manifolds with Boundaries

Single Triangle Strip and Loop on Manifolds with Boundaries Single Triangle Strip and Loop on Manifolds with Boundaries Pablo Diaz-Gutierrez David Eppstein M. Gopi Department of Computer Science, University of California, Irvine. Abstract The single triangle-strip

More information

Spirale Reversi: Reverse decoding of the Edgebreaker encoding

Spirale Reversi: Reverse decoding of the Edgebreaker encoding Spirale Reversi: Reverse decoding of the Edgebreaker encoding Martin Isenburg Jack Snoeyink University of North Carolina at Chapel Hill fisenburg j snoeyinkg@cs.unc.edu Abstract We present a simple linear

More information

Triangle Strip Compression

Triangle Strip Compression Triangle Strip Compression Martin Isenburg University of North Carolina at Chapel Hill isenburg@cs.unc.edu Abstract In this paper we introduce a simple and efficient scheme for encoding the connectivity

More information

Single Triangle Strip and Loop on Manifolds with Boundaries

Single Triangle Strip and Loop on Manifolds with Boundaries Single Triangle Strip and Loop on Manifolds with Boundaries Pablo Diaz-Gutierrez David Eppstein Department of Computer Science University of California, Irvine. M. Gopi Abstract The single triangle-strip

More information

Pebble Sets in Convex Polygons

Pebble Sets in Convex Polygons 2 1 Pebble Sets in Convex Polygons Kevin Iga, Randall Maddox June 15, 2005 Abstract Lukács and András posed the problem of showing the existence of a set of n 2 points in the interior of a convex n-gon

More information

Geometric Compression Through Topological Surgery

Geometric Compression Through Topological Surgery Geometric Compression Through Topological Surgery GABRIEL TAUBIN IBM T. J. Watson Research Center and JAREK ROSSIGNAC GVU, Georgia Institute of Technology The abundance and importance of complex 3-D data

More information

Lecture 3: Art Gallery Problems and Polygon Triangulation

Lecture 3: Art Gallery Problems and Polygon Triangulation EECS 396/496: Computational Geometry Fall 2017 Lecture 3: Art Gallery Problems and Polygon Triangulation Lecturer: Huck Bennett In this lecture, we study the problem of guarding an art gallery (specified

More information

Exercise set 2 Solutions

Exercise set 2 Solutions Exercise set 2 Solutions Let H and H be the two components of T e and let F E(T ) consist of the edges of T with one endpoint in V (H), the other in V (H ) Since T is connected, F Furthermore, since T

More information

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

More information

Planar Graphs with Many Perfect Matchings and Forests

Planar Graphs with Many Perfect Matchings and Forests Planar Graphs with Many Perfect Matchings and Forests Michael Biro Abstract We determine the number of perfect matchings and forests in a family T r,3 of triangulated prism graphs. These results show that

More information

The Traveling Salesman Problem on Grids with Forbidden Neighborhoods

The Traveling Salesman Problem on Grids with Forbidden Neighborhoods The Traveling Salesman Problem on Grids with Forbidden Neighborhoods Anja Fischer Philipp Hungerländer April 0, 06 We introduce the Traveling Salesman Problem with forbidden neighborhoods (TSPFN). This

More information

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems. Problems, Hints, and Solutions

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems. Problems, Hints, and Solutions Dr. Amotz Bar-Noy s Compendium of Algorithms Problems Problems, Hints, and Solutions Chapter 1 Searching and Sorting Problems 1 1.1 Array with One Missing 1.1.1 Problem Let A = A[1],..., A[n] be an array

More information

Theorem 2.9: nearest addition algorithm

Theorem 2.9: nearest addition algorithm There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used

More information

Computational Geometry

Computational Geometry Motivation Motivation Polygons and visibility Visibility in polygons Triangulation Proof of the Art gallery theorem Two points in a simple polygon can see each other if their connecting line segment is

More information

Compression and Progressive Visualization of Geometric Models

Compression and Progressive Visualization of Geometric Models Compression and Progressive Visualization of Geometric Models Frutuoso G. M. Silva IT - Networks and Multimedia Group University of Beira Interior, Portugal fsilva@di.ubi.pt Pranjul Yadav Indian Institute

More information

Matching Theory. Figure 1: Is this graph bipartite?

Matching Theory. Figure 1: Is this graph bipartite? Matching Theory 1 Introduction A matching M of a graph is a subset of E such that no two edges in M share a vertex; edges which have this property are called independent edges. A matching M is said to

More information

Data Structure. IBPS SO (IT- Officer) Exam 2017

Data Structure. IBPS SO (IT- Officer) Exam 2017 Data Structure IBPS SO (IT- Officer) Exam 2017 Data Structure: In computer science, a data structure is a way of storing and organizing data in a computer s memory so that it can be used efficiently. Data

More information

Fixed-Parameter Algorithms, IA166

Fixed-Parameter Algorithms, IA166 Fixed-Parameter Algorithms, IA166 Sebastian Ordyniak Faculty of Informatics Masaryk University Brno Spring Semester 2013 Introduction Outline 1 Introduction Algorithms on Locally Bounded Treewidth Layer

More information

Hamiltonian cycles in bipartite quadrangulations on the torus

Hamiltonian cycles in bipartite quadrangulations on the torus Hamiltonian cycles in bipartite quadrangulations on the torus Atsuhiro Nakamoto and Kenta Ozeki Abstract In this paper, we shall prove that every bipartite quadrangulation G on the torus admits a simple

More information

Compressing Polygon Mesh Connectivity with Degree Duality Prediction

Compressing Polygon Mesh Connectivity with Degree Duality Prediction UNC Technical Report TR-02-08 Compressing Polygon Mesh Connectivity with Degree Duality Prediction Martin Isenburg University of North Carolina at Chapel Hill isenburg@cs.unc.edu Abstract In this paper

More information

FOUR EDGE-INDEPENDENT SPANNING TREES 1

FOUR EDGE-INDEPENDENT SPANNING TREES 1 FOUR EDGE-INDEPENDENT SPANNING TREES 1 Alexander Hoyer and Robin Thomas School of Mathematics Georgia Institute of Technology Atlanta, Georgia 30332-0160, USA ABSTRACT We prove an ear-decomposition theorem

More information

Symmetric Product Graphs

Symmetric Product Graphs Rochester Institute of Technology RIT Scholar Works Theses Thesis/Dissertation Collections 5-20-2015 Symmetric Product Graphs Evan Witz Follow this and additional works at: http://scholarworks.rit.edu/theses

More information

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Greedy Algorithms (continued) The best known application where the greedy algorithm is optimal is surely

More information

Edge-disjoint Spanning Trees in Triangulated Graphs on Surfaces and application to node labeling 1

Edge-disjoint Spanning Trees in Triangulated Graphs on Surfaces and application to node labeling 1 Edge-disjoint Spanning Trees in Triangulated Graphs on Surfaces and application to node labeling 1 Arnaud Labourel a a LaBRI - Universite Bordeaux 1, France Abstract In 1974, Kundu [4] has shown that triangulated

More information

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality Planar Graphs In the first half of this book, we consider mostly planar graphs and their geometric representations, mostly in the plane. We start with a survey of basic results on planar graphs. This chapter

More information

EULER S FORMULA AND THE FIVE COLOR THEOREM

EULER S FORMULA AND THE FIVE COLOR THEOREM EULER S FORMULA AND THE FIVE COLOR THEOREM MIN JAE SONG Abstract. In this paper, we will define the necessary concepts to formulate map coloring problems. Then, we will prove Euler s formula and apply

More information

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) January 11, 2018 Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 In this lecture

More information

arxiv: v3 [cs.dm] 12 Jun 2014

arxiv: v3 [cs.dm] 12 Jun 2014 On Maximum Differential Coloring of Planar Graphs M. A. Bekos 1, M. Kaufmann 1, S. Kobourov, S. Veeramoni 1 Wilhelm-Schickard-Institut für Informatik - Universität Tübingen, Germany Department of Computer

More information

Compression of Tetrahedral Meshes

Compression of Tetrahedral Meshes Compression of Tetrahedral Meshes Geometry Processing CS 7960 Louis Bavoil 01/19/2006 Outline Corner Table Edgebreaker Efficiency Edgebreaker with Boundary Corner Table Two arrays of integers: V and O

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

arxiv: v1 [cs.cc] 30 Jun 2017

arxiv: v1 [cs.cc] 30 Jun 2017 Hamiltonicity is Hard in Thin or Polygonal Grid Graphs, but Easy in Thin Polygonal Grid Graphs Erik D. Demaine Mikhail Rudoy arxiv:1706.10046v1 [cs.cc] 30 Jun 2017 Abstract In 2007, Arkin et al. [3] initiated

More information

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS PAUL BALISTER Abstract It has been shown [Balister, 2001] that if n is odd and m 1,, m t are integers with m i 3 and t i=1 m i = E(K n) then K n can be decomposed

More information

Genus Ranges of 4-Regular Rigid Vertex Graphs

Genus Ranges of 4-Regular Rigid Vertex Graphs Genus Ranges of 4-Regular Rigid Vertex Graphs Dorothy Buck Department of Mathematics Imperial College London London, England, UK d.buck@imperial.ac.uk Nataša Jonoska Egor Dolzhenko Molecular and Computational

More information

Preferred directions for resolving the non-uniqueness of Delaunay triangulations

Preferred directions for resolving the non-uniqueness of Delaunay triangulations Preferred directions for resolving the non-uniqueness of Delaunay triangulations Christopher Dyken and Michael S. Floater Abstract: This note proposes a simple rule to determine a unique triangulation

More information

Minimum-Link Watchman Tours

Minimum-Link Watchman Tours Minimum-Link Watchman Tours Esther M. Arkin Joseph S. B. Mitchell Christine D. Piatko Abstract We consider the problem of computing a watchman route in a polygon with holes. We show that the problem of

More information

11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427

11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427 mcs 2015/5/18 1:43 page 419 #427 11.9 Connectivity Definition 11.9.1. Two vertices are connected in a graph when there is a path that begins at one and ends at the other. By convention, every vertex is

More information

Chapter 11: Graphs and Trees. March 23, 2008

Chapter 11: Graphs and Trees. March 23, 2008 Chapter 11: Graphs and Trees March 23, 2008 Outline 1 11.1 Graphs: An Introduction 2 11.2 Paths and Circuits 3 11.3 Matrix Representations of Graphs 4 11.5 Trees Graphs: Basic Definitions Informally, a

More information

Lecture 8: The Traveling Salesman Problem

Lecture 8: The Traveling Salesman Problem Lecture 8: The Traveling Salesman Problem Let G = (V, E) be an undirected graph. A Hamiltonian cycle of G is a cycle that visits every vertex v V exactly once. Instead of Hamiltonian cycle, we sometimes

More information

Fundamental Properties of Graphs

Fundamental Properties of Graphs Chapter three In many real-life situations we need to know how robust a graph that represents a certain network is, how edges or vertices can be removed without completely destroying the overall connectivity,

More information

4 Fractional Dimension of Posets from Trees

4 Fractional Dimension of Posets from Trees 57 4 Fractional Dimension of Posets from Trees In this last chapter, we switch gears a little bit, and fractionalize the dimension of posets We start with a few simple definitions to develop the language

More information

1. Meshes. D7013E Lecture 14

1. Meshes. D7013E Lecture 14 D7013E Lecture 14 Quadtrees Mesh Generation 1. Meshes Input: Components in the form of disjoint polygonal objects Integer coordinates, 0, 45, 90, or 135 angles Output: A triangular mesh Conforming: A triangle

More information

CSE 548: Analysis of Algorithms. Lecture 13 ( Approximation Algorithms )

CSE 548: Analysis of Algorithms. Lecture 13 ( Approximation Algorithms ) CSE 548: Analysis of Algorithms Lecture 13 ( Approximation Algorithms ) Rezaul A. Chowdhury Department of Computer Science SUNY Stony Brook Fall 2017 Approximation Ratio Consider an optimization problem

More information

Star coloring planar graphs from small lists

Star coloring planar graphs from small lists Star coloring planar graphs from small lists André Kündgen Craig Timmons June 4, 2008 Abstract A star coloring of a graph is a proper vertex-coloring such that no path on four vertices is 2-colored. We

More information

Chapter 6. Planar Orientations. 6.1 Numberings of Digraphs

Chapter 6. Planar Orientations. 6.1 Numberings of Digraphs Chapter 6 Planar Orientations In this chapter we will focus on algorithms and techniques used for drawing planar graphs. The algorithms we will use are based on numbering the vertices and orienting the

More information

Algorithms for Grid Graphs in the MapReduce Model

Algorithms for Grid Graphs in the MapReduce Model University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln Computer Science and Engineering: Theses, Dissertations, and Student Research Computer Science and Engineering, Department

More information

4 Basics of Trees. Petr Hliněný, FI MU Brno 1 FI: MA010: Trees and Forests

4 Basics of Trees. Petr Hliněný, FI MU Brno 1 FI: MA010: Trees and Forests 4 Basics of Trees Trees, actually acyclic connected simple graphs, are among the simplest graph classes. Despite their simplicity, they still have rich structure and many useful application, such as in

More information

Planarity. 1 Introduction. 2 Topological Results

Planarity. 1 Introduction. 2 Topological Results Planarity 1 Introduction A notion of drawing a graph in the plane has led to some of the most deep results in graph theory. Vaguely speaking by a drawing or embedding of a graph G in the plane we mean

More information

6.854J / J Advanced Algorithms Fall 2008

6.854J / J Advanced Algorithms Fall 2008 MIT OpenCourseWare http://ocw.mit.edu 6.854J / 18.415J Advanced Algorithms Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advanced

More information

Bipartite Roots of Graphs

Bipartite Roots of Graphs Bipartite Roots of Graphs Lap Chi Lau Department of Computer Science University of Toronto Graph H is a root of graph G if there exists a positive integer k such that x and y are adjacent in G if and only

More information

Monotone Paths in Geometric Triangulations

Monotone Paths in Geometric Triangulations Monotone Paths in Geometric Triangulations Adrian Dumitrescu Ritankar Mandal Csaba D. Tóth November 19, 2017 Abstract (I) We prove that the (maximum) number of monotone paths in a geometric triangulation

More information

An Introduction to Chromatic Polynomials

An Introduction to Chromatic Polynomials An Introduction to Chromatic Polynomials Julie Zhang May 17, 2018 Abstract This paper will provide an introduction to chromatic polynomials. We will first define chromatic polynomials and related terms,

More information

Clustering Using Graph Connectivity

Clustering Using Graph Connectivity Clustering Using Graph Connectivity Patrick Williams June 3, 010 1 Introduction It is often desirable to group elements of a set into disjoint subsets, based on the similarity between the elements in the

More information

Geometric Steiner Trees

Geometric Steiner Trees Geometric Steiner Trees From the book: Optimal Interconnection Trees in the Plane By Marcus Brazil and Martin Zachariasen Part 2: Global properties of Euclidean Steiner Trees and GeoSteiner Marcus Brazil

More information

Spectral Coding of Three-Dimensional Mesh Geometry Information Using Dual Graph

Spectral Coding of Three-Dimensional Mesh Geometry Information Using Dual Graph Spectral Coding of Three-Dimensional Mesh Geometry Information Using Dual Graph Sung-Yeol Kim, Seung-Uk Yoon, and Yo-Sung Ho Gwangju Institute of Science and Technology (GIST) 1 Oryong-dong, Buk-gu, Gwangju,

More information

Optimization I : Brute force and Greedy strategy

Optimization I : Brute force and Greedy strategy Chapter 3 Optimization I : Brute force and Greedy strategy A generic definition of an optimization problem involves a set of constraints that defines a subset in some underlying space (like the Euclidean

More information

v 1 v 2 r 3 r 4 v 3 v 4 Figure A plane embedding of K 4.

v 1 v 2 r 3 r 4 v 3 v 4 Figure A plane embedding of K 4. Chapter 6 Planarity Section 6.1 Euler s Formula In Chapter 1 we introduced the puzzle of the three houses and the three utilities. The problem was to determine if we could connect each of the three utilities

More information

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2,

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2, List of Theorems Mat 416, Introduction to Graph Theory 1. Ramsey s Theorem for graphs 8.3.11. Theorem 1 The numbers R(p, q) exist and for p, q 2, R(p, q) R(p 1, q) + R(p, q 1). If both summands on the

More information

Assignment 4 Solutions of graph problems

Assignment 4 Solutions of graph problems Assignment 4 Solutions of graph problems 1. Let us assume that G is not a cycle. Consider the maximal path in the graph. Let the end points of the path be denoted as v 1, v k respectively. If either of

More information

Decreasing the Diameter of Bounded Degree Graphs

Decreasing the Diameter of Bounded Degree Graphs Decreasing the Diameter of Bounded Degree Graphs Noga Alon András Gyárfás Miklós Ruszinkó February, 00 To the memory of Paul Erdős Abstract Let f d (G) denote the minimum number of edges that have to be

More information

Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings

Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings Chapter 12 and 11.1 Planar graphs, regular polyhedra, and graph colorings Prof. Tesler Math 184A Fall 2017 Prof. Tesler Ch. 12: Planar Graphs Math 184A / Fall 2017 1 / 45 12.1 12.2. Planar graphs Definition

More information

On the Number of Tilings of a Square by Rectangles

On the Number of Tilings of a Square by Rectangles University of Tennessee, Knoxville Trace: Tennessee Research and Creative Exchange University of Tennessee Honors Thesis Projects University of Tennessee Honors Program 5-2012 On the Number of Tilings

More information

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions Basic Combinatorics Math 40210, Section 01 Fall 2012 Homework 4 Solutions 1.4.2 2: One possible implementation: Start with abcgfjiea From edge cd build, using previously unmarked edges: cdhlponminjkghc

More information

The Geometry of Carpentry and Joinery

The Geometry of Carpentry and Joinery The Geometry of Carpentry and Joinery Pat Morin and Jason Morrison School of Computer Science, Carleton University, 115 Colonel By Drive Ottawa, Ontario, CANADA K1S 5B6 Abstract In this paper we propose

More information

Graphs That Are Randomly Traceable from a Vertex

Graphs That Are Randomly Traceable from a Vertex Graphs That Are Randomly Traceable from a Vertex Daniel C. Isaksen 27 July 1993 Abstract A graph G is randomly traceable from one of its vertices v if every path in G starting at v can be extended to a

More information

Dominating Sets in Triangulations on Surfaces

Dominating Sets in Triangulations on Surfaces Dominating Sets in Triangulations on Surfaces Hong Liu Department of Mathematics University of Illinois This is a joint work with Michael Pelsmajer May 14, 2011 Introduction A dominating set D V of a graph

More information

AtCoder World Tour Finals 2019

AtCoder World Tour Finals 2019 AtCoder World Tour Finals 201 writer: rng 58 February 21st, 2018 A: Magic Suppose that the magician moved the treasure in the order y 1 y 2 y K+1. Here y i y i+1 for each i because it doesn t make sense

More information

Mathematics Masters Examination

Mathematics Masters Examination Mathematics Masters Examination OPTION 4 March 30, 2004 COMPUTER SCIENCE 2 5 PM NOTE: Any student whose answers require clarification may be required to submit to an oral examination. Each of the fourteen

More information

3 No-Wait Job Shops with Variable Processing Times

3 No-Wait Job Shops with Variable Processing Times 3 No-Wait Job Shops with Variable Processing Times In this chapter we assume that, on top of the classical no-wait job shop setting, we are given a set of processing times for each operation. We may select

More information

Simultaneously flippable edges in triangulations

Simultaneously flippable edges in triangulations Simultaneously flippable edges in triangulations Diane L. Souvaine 1, Csaba D. Tóth 2, and Andrew Winslow 1 1 Tufts University, Medford MA 02155, USA, {dls,awinslow}@cs.tufts.edu 2 University of Calgary,

More information

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into 2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into the viewport of the current application window. A pixel

More information

CONSTRUCTIONS OF QUADRILATERAL MESHES: A COMPARATIVE STUDY

CONSTRUCTIONS OF QUADRILATERAL MESHES: A COMPARATIVE STUDY South Bohemia Mathematical Letters Volume 24, (2016), No. 1, 43-48. CONSTRUCTIONS OF QUADRILATERAL MESHES: A COMPARATIVE STUDY PETRA SURYNKOVÁ abstrakt. Polygonal meshes represent important geometric structures

More information

The Geodesic Integral on Medial Graphs

The Geodesic Integral on Medial Graphs The Geodesic Integral on Medial Graphs Kolya Malkin August 013 We define the geodesic integral defined on paths in the duals of medial graphs on surfaces and use it to study lens elimination and connection

More information

Handles. The justification: For a 0 genus triangle mesh we can write the formula as follows:

Handles. The justification: For a 0 genus triangle mesh we can write the formula as follows: Handles A handle in a 3d mesh is a through hole. The number of handles can be extracted of the genus of the 3d mesh. Genus is the number of times we can cut 2k edges without disconnecting the 3d mesh.

More information

Graph Theory. Chapter 4.

Graph Theory. Chapter 4. Graph Theory. Chapter 4. Wandering. Here is an algorithm, due to Tarry, that constructs a walk in a connected graph, starting at any vertex v 0, traversing each edge exactly once in each direction, and

More information

Manipulating the Boundary Mesh

Manipulating the Boundary Mesh Chapter 7. Manipulating the Boundary Mesh The first step in producing an unstructured grid is to define the shape of the domain boundaries. Using a preprocessor (GAMBIT or a third-party CAD package) you

More information

TWO CONTRIBUTIONS OF EULER

TWO CONTRIBUTIONS OF EULER TWO CONTRIBUTIONS OF EULER SIEMION FAJTLOWICZ. MATH 4315 Eulerian Tours. Although some mathematical problems which now can be thought of as graph-theoretical, go back to the times of Euclid, the invention

More information

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph. Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial

More information

Faster parameterized algorithms for Minimum Fill-In

Faster parameterized algorithms for Minimum Fill-In Faster parameterized algorithms for Minimum Fill-In Hans L. Bodlaender Pinar Heggernes Yngve Villanger Abstract We present two parameterized algorithms for the Minimum Fill-In problem, also known as Chordal

More information

Rubber bands. Chapter Rubber band representation

Rubber bands. Chapter Rubber band representation Chapter 1 Rubber bands In the previous chapter, we already used the idea of looking at the graph geometrically, by placing its nodes on the line and replacing the edges by rubber bands. Since, however,

More information

Orthogonal art galleries with holes: a coloring proof of Aggarwal s Theorem

Orthogonal art galleries with holes: a coloring proof of Aggarwal s Theorem Orthogonal art galleries with holes: a coloring proof of Aggarwal s Theorem Pawe l Żyliński Institute of Mathematics University of Gdańsk, 8095 Gdańsk, Poland pz@math.univ.gda.pl Submitted: Sep 9, 005;

More information

CS 532: 3D Computer Vision 14 th Set of Notes

CS 532: 3D Computer Vision 14 th Set of Notes 1 CS 532: 3D Computer Vision 14 th Set of Notes Instructor: Philippos Mordohai Webpage: www.cs.stevens.edu/~mordohai E-mail: Philippos.Mordohai@stevens.edu Office: Lieb 215 Lecture Outline Triangulating

More information

A General Class of Heuristics for Minimum Weight Perfect Matching and Fast Special Cases with Doubly and Triply Logarithmic Errors 1

A General Class of Heuristics for Minimum Weight Perfect Matching and Fast Special Cases with Doubly and Triply Logarithmic Errors 1 Algorithmica (1997) 18: 544 559 Algorithmica 1997 Springer-Verlag New York Inc. A General Class of Heuristics for Minimum Weight Perfect Matching and Fast Special Cases with Doubly and Triply Logarithmic

More information

Ma/CS 6b Class 26: Art Galleries and Politicians

Ma/CS 6b Class 26: Art Galleries and Politicians Ma/CS 6b Class 26: Art Galleries and Politicians By Adam Sheffer The Art Gallery Problem Problem. We wish to place security cameras at a gallery, such that they cover it completely. Every camera can cover

More information

Decision Problems. Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not.

Decision Problems. Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not. Decision Problems Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not. Definition: The class of problems that can be solved by polynomial-time

More information

Notes on Minimum Spanning Trees. Red Rule: Given a cycle containing no red edges, select a maximum uncolored edge on the cycle, and color it red.

Notes on Minimum Spanning Trees. Red Rule: Given a cycle containing no red edges, select a maximum uncolored edge on the cycle, and color it red. COS 521 Fall 2009 Notes on Minimum Spanning Trees 1. The Generic Greedy Algorithm The generic greedy algorithm finds a minimum spanning tree (MST) by an edge-coloring process. Initially all edges are uncolored.

More information

On Covering a Graph Optimally with Induced Subgraphs

On Covering a Graph Optimally with Induced Subgraphs On Covering a Graph Optimally with Induced Subgraphs Shripad Thite April 1, 006 Abstract We consider the problem of covering a graph with a given number of induced subgraphs so that the maximum number

More information

AN ALGORITHM WHICH GENERATES THE HAMILTONIAN CIRCUITS OF A CUBIC PLANAR MAP

AN ALGORITHM WHICH GENERATES THE HAMILTONIAN CIRCUITS OF A CUBIC PLANAR MAP AN ALGORITHM WHICH GENERATES THE HAMILTONIAN CIRCUITS OF A CUBIC PLANAR MAP W. L. PRICE ABSTRACT The paper describes an algorithm which generates those Hamiltonian circuits of a given cubic planar map

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

More information

[8] that this cannot happen on the projective plane (cf. also [2]) and the results of Robertson, Seymour, and Thomas [5] on linkless embeddings of gra

[8] that this cannot happen on the projective plane (cf. also [2]) and the results of Robertson, Seymour, and Thomas [5] on linkless embeddings of gra Apex graphs with embeddings of face-width three Bojan Mohar Department of Mathematics University of Ljubljana Jadranska 19, 61111 Ljubljana Slovenia bojan.mohar@uni-lj.si Abstract Aa apex graph is a graph

More information

V Advanced Data Structures

V Advanced Data Structures V Advanced Data Structures B-Trees Fibonacci Heaps 18 B-Trees B-trees are similar to RBTs, but they are better at minimizing disk I/O operations Many database systems use B-trees, or variants of them,

More information

1 Definition of Reduction

1 Definition of Reduction 1 Definition of Reduction Problem A is reducible, or more technically Turing reducible, to problem B, denoted A B if there a main program M to solve problem A that lacks only a procedure to solve problem

More information

G 6i try. On the Number of Minimal 1-Steiner Trees* Discrete Comput Geom 12:29-34 (1994)

G 6i try. On the Number of Minimal 1-Steiner Trees* Discrete Comput Geom 12:29-34 (1994) Discrete Comput Geom 12:29-34 (1994) G 6i try 9 1994 Springer-Verlag New York Inc. On the Number of Minimal 1-Steiner Trees* B. Aronov, 1 M. Bern, 2 and D. Eppstein 3 Computer Science Department, Polytechnic

More information

Institutionen för datavetenskap Department of Computer and Information Science

Institutionen för datavetenskap Department of Computer and Information Science Institutionen för datavetenskap Department of Computer and Information Science Final thesis K Shortest Path Implementation by RadhaKrishna Nagubadi LIU-IDA/LITH-EX-A--13/41--SE 213-6-27 Linköpings universitet

More information

Matching and Planarity

Matching and Planarity Matching and Planarity Po-Shen Loh June 010 1 Warm-up 1. (Bondy 1.5.9.) There are n points in the plane such that every pair of points has distance 1. Show that there are at most n (unordered) pairs of

More information

c 2011 BRITTANY NICOLE MOTT ALL RIGHTS RESERVED

c 2011 BRITTANY NICOLE MOTT ALL RIGHTS RESERVED c 2011 BRITTANY NICOLE MOTT ALL RIGHTS RESERVED ANALYSIS OF THE GENERALIZED CATALAN ORBITS A Thesis Presented to The Graduate Faculty of The University of Akron In Partial Fulfillment of the Requirements

More information

Universiteit Leiden Computer Science

Universiteit Leiden Computer Science Universiteit Leiden Computer Science Optimizing octree updates for visibility determination on dynamic scenes Name: Hans Wortel Student-no: 0607940 Date: 28/07/2011 1st supervisor: Dr. Michael Lew 2nd

More information

Lofting 3D Shapes. Abstract

Lofting 3D Shapes. Abstract Lofting 3D Shapes Robby Prescott Department of Computer Science University of Wisconsin Eau Claire Eau Claire, Wisconsin 54701 robprescott715@gmail.com Chris Johnson Department of Computer Science University

More information

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1 Graph fundamentals Bipartite graph characterization Lemma. If a graph contains an odd closed walk, then it contains an odd cycle. Proof strategy: Consider a shortest closed odd walk W. If W is not a cycle,

More information