CS348a: Computer Graphics Handout #36 Geometric Modeling Original Handout #29 Stanford University Thursday, 10 December 1992

Similar documents
Computational Geometry. Lecture 1: Introduction and Convex Hulls

Arrangements And Duality

Actually Doing It! 6. Prove that the regular unit cube (say 1cm=unit) of sufficiently high dimension can fit inside it the whole city of New York.

Topological Treatment of Platonic, Archimedean, and Related Polyhedra

ME 111: Engineering Drawing

Solving Geometric Problems with the Rotating Calipers *

SPERNER S LEMMA AND BROUWER S FIXED POINT THEOREM

Shortest Inspection-Path. Queries in Simple Polygons

Angles that are between parallel lines, but on opposite sides of a transversal.

Graph Theory Lecture 3: Sum of Degrees Formulas, Planar Graphs, and Euler s Theorem Spring 2014 Morgan Schreffler Office: POT 902

Analysis of Algorithms, I

Intersection of a Line and a Convex. Hull of Points Cloud

alternate interior angles

Selected practice exam solutions (part 5, item 2) (MAT 360)

Comments on Quotient Spaces and Quotient Maps

Fast approximation of the maximum area convex. subset for star-shaped polygons

The Essentials of CAGD

Triangulation by Ear Clipping

Planar Graphs. Complement to Chapter 2, The Villas of the Bellevue

Midterm Practice Problems

1 Symmetries of regular polyhedra

8.1 Min Degree Spanning Tree

Linear Programming I

n 2 + 4n + 3. The answer in decimal form (for the Blitz): 0, 75. Solution. (n + 1)(n + 3) = n lim m 2 1

Disjoint Compatible Geometric Matchings

Approximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs

Final Review Geometry A Fall Semester

Star and convex regular polyhedra by Origami.

5.1 Bipartite Matching

Largest Fixed-Aspect, Axis-Aligned Rectangle

Sum of Degrees of Vertices Theorem

Figure 1.1 Vector A and Vector F

INCIDENCE-BETWEENNESS GEOMETRY

arxiv: v1 [math.co] 7 Mar 2012

The number of generalized balanced lines

Shortcut sets for plane Euclidean networks (Extended abstract) 1

Linear Programming Problems

Applied Algorithm Design Lecture 5

CMPSCI611: Approximating MAX-CUT Lecture 20

Chapter 18 Symmetry. Symmetry of Shapes in a Plane then unfold

56 questions (multiple choice, check all that apply, and fill in the blank) The exam is worth 224 points.

Lecture 2: August 29. Linear Programming (part I)

BOĞAZİÇİ UNIVERSITY COMPUTER ENGINEERING

Class One: Degree Sequences

arxiv: v1 [cs.cg] 15 Sep 2014

Chapter 8 Geometry We will discuss following concepts in this chapter.

Triangle deletion. Ernie Croot. February 3, 2010

Volumetric Meshes for Real Time Medical Simulations

3D shapes. Level A. 1. Which of the following is a 3-D shape? A) Cylinder B) Octagon C) Kite. 2. What is another name for 3-D shapes?

Removing Even Crossings

Geometry Chapter Point (pt) 1.1 Coplanar (1.1) 1.1 Space (1.1) 1.2 Line Segment (seg) 1.2 Measure of a Segment

Approximation Algorithms

International Doctoral School Algorithmic Decision Theory: MCDA and MOO

1 The Line vs Point Test

Max-Min Representation of Piecewise Linear Functions

Intersection of Convex Objects: The Method of Separating Axes

3. Linear Programming and Polyhedral Combinatorics

Solutions to Exercises, Section 5.1

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina

Persistent Data Structures

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Geometric Transformations

Shape Dictionary YR to Y6

Grade 7/8 Math Circles November 3/4, M.C. Escher and Tessellations

Solutions to Homework 10

Computational Geometry Lab: FEM BASIS FUNCTIONS FOR A TETRAHEDRON

Tilings of the sphere with right triangles III: the asymptotically obtuse families

HOLES 5.1. INTRODUCTION

Extremal Wiener Index of Trees with All Degrees Odd

Linear Programming. Solving LP Models Using MS Excel, 18

GEOMETRY CONCEPT MAP. Suggested Sequence:

. P. 4.3 Basic feasible solutions and vertices of polyhedra. x 1. x 2

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

GEOMETRY. Constructions OBJECTIVE #: G.CO.12

Angle - a figure formed by two rays or two line segments with a common endpoint called the vertex of the angle; angles are measured in degrees

Objectives After completing this section, you should be able to:

Network (Tree) Topology Inference Based on Prüfer Sequence

Introduction to Graph Theory

1. Abstract 2. Introduction 3. Algorithms and Techniques

Collision Detection Algorithms for Motion Planning

Line Segments, Rays, and Lines

Geometric Modelling & Curves

Geometry of Vectors. 1 Cartesian Coordinates. Carlo Tomasi

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

Removing even crossings

Free Inductive/Logical Test Questions

Geometry Notes PERIMETER AND AREA

Smooth functions statistics

MATH STUDENT BOOK. 8th Grade Unit 6

Warning! Construction Zone: Building Solids from Nets

Solving Simultaneous Equations and Matrices

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

4.1 Learning algorithms for neural networks

Chapter 6. Cuboids. and. vol(conv(p ))

Lecture 4 DISCRETE SUBGROUPS OF THE ISOMETRY GROUP OF THE PLANE AND TILINGS

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

with functions, expressions and equations which follow in units 3 and 4.

In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data.

Angles and Quadrants. Angle Relationships and Degree Measurement. Chapter 7: Trigonometry

E XPLORING QUADRILATERALS

Transcription:

CS348a: Computer Graphics Handout #36 Geometric Modeling Original Handout #29 Stanford University Thursday, 10 December 1992 Original Lecture #14: December 1, 1992 Topics: Hierarchical Structures for Convex Polygons and Polyhedra Scribe: Radu Tutos In the previous lecture we discussed the method of approximating a convex polygon with a series of incrementally simpler polygons. We d now like to extend the method to convex polyhedra. Our goal is to build a series of incrementally coarsened polyhedra, where each member in the series has a fewer number of vertices than the preceding one. To achieve that, we take the original polyhedron P 0 and remove a large set of low degree vertices which are independent (non-adjacent), and then remove their incident edges. Each removed vertex leaves a small well defined hole, which we retriangulate by computing the three dimensional convex hull of its boundary. Since the number of edges and faces in a polyhedron decreases linearly with its number of vertices, the resulting polyhedron will be less complex than the original one. We then repeat this coarsening process until we build a polyhedron P k with at most p number of vertices. This gives us a sequence of convex polyhedra on which we can build a hierarchical representation of the original one: P 0 P 2...... P k We now need to determine the degree of the vertices that we remove at each coarsening iteration. If the degree of the these vertices is too high, we end up replacing a large number of existing edges with new ones needed to retriangulate holes with complex shapes. This is an undesirable result, since we want to capture in the coarsened polyhedron as many features as we can as from the original one. On the other hand, if we set the degree of the vertices we want to remove too low, we may discover that no vertices meet our criteria. The following lemma helps us find the optimum upper bound on the degree of these vertices, and it shows the way to build the hierarchical set of convex polyhedra: Lemma 1. Let P be a convex polytope with m vertices; then there exists an independent set I of vertices, such that 1. I m/18, 2. deg(v) 8 for all v I, 3. I can be found in O(m) time. Proof: We construct I using a greedy algorithm. The first section is partly based on the 1991 notes of Brian Rogoff

2 CS348a: Handout #36 light source Figure 1: A projection mapping a polytope to a straight-line planar arrangement. Begin Set I = φ For each vertex v in P do If v has not been marked and degree(v) 8 Then add v to I and mark the neighbors of v End The algorithm produces a maximal independent set I of vertices each of which has degree at most eight. We first prove that at least half of the vertices in P will have degree less equal than 8. It is easily shown that a convex polytope is topologically equivalent to a planar graph. If we put a light source just outside one face f of a convex polytope, and then project the polytope onto a plane parallel to f on the opposite side of the polytope (see figure 1), we get a straightline planar subdivision which we have already studied quite a bit. The face f corresponds to the exterior face in this projection, and every other face of the polytope corresponds to an interior face of the subdivision. From Euler s theorem on planar graphs, we have degree(v) 6m 12 v P

CS348a: Handout #36 3 If half of the vertices had degree 9, then the total degree would be at least m m 9 + 3 6m 3 2 2 which already exceeds Euler s bound. Thus less than half the vertices have degree 9; in other words, more than half the vertices have degree 8. During the marking process, one vertex being included in I marks at most eight other vertices. Even if those 8 vertices all have low degree, we still can include one out of every 9 low degree vertices. Since the total number of low degree vertices is at least m 2 we can find an independent set of size at least 18 m. During the algorithm each edge is checked twice: once from each end, thus the running time is linear. The size of the polyhedra in the hierarchy decreases geometrically, so the sequence will stop at P k with k = O(logm), and the total time and storage to compute the sequence is linear. In order to walk up the hierarchy from P k to P 0, we need a a hierarchy pointer hp from every new edge e created in P i+1 to the vertex v of P i whose removal generated e. The value of the hierarchy pointer for each edge e in P i+1 is obtained as follows: If e is not in P i then hp(e) = v else if e is in P i but its left face is different than in P i then hp(e) = v else if e is in P i and it has the same left face as in P i then hp(e) = null The resulting hierarchy of polyhedra allows us to construct efficient algorithms to answer queries on the original polyhedron P 0. We will go over some of these algorithms shortly. Computing the Convex Hull When we coarsen a convex polyhedron with the method described above, we have retriangulate each hole that is created when a vertex is removed. To do that, we compute the convex hull of the adjoint vertices. We define the convex hull of a set of points in space as the smallest convex polyhedron which embodies all the points. We will now describe two algorithms to do this computation. As a note, there are other more efficient algorithms to compute the convex hull, but they are more complex as well. The Incremental Algorithm Let p 1... p n be the set of points for which we want to compute the convex hull, where the points are sorted in the X direction. We now incrementally compute the convex hull for the sets of points p 1... p 3, p 1... p 4, up to p 1... p n. For each set p 1... p i+1 in this sequence, we

4 CS348a: Handout #36 P3 P1 P5 P 7 P6 P2 P4 X Figure 2: Computing the 2-D convex hull using the incremental algorithm. calculate the convex hull based on the p 1... p i convex hull that we just computed, and the point p i+1, which is on the right side of all previous points on the X direction. takev We will first describe the algorithm in the 2-D case. To calculate the the convex hull for p 1... p i+1, we take the following steps: Begin 1. draw an edge from p i+1 to the closest point 2. Go up, add edges to each consecutive point on the hull while the triangles that we construct have a positive area in the clockwise direction 3. Go down, add edges to each consecutive point on the hull while the triangles that we construct have a positive area in the counterclockwise direction 4. Keep the last two edges added in steps 2 and 3, and remove all edges that left inside the newly created convex hull The sign test for the area of triangle with vertices at p, q, and r is done by calculating the determinant

CS348a: Handout #36 5 p x p y 1 q x q y 1 r x r y 1 The algorithm is illustrated in Fig. 2 for i = 6. Going up from from the edge p 7 p 6 which we have drawn at step 1, we add the edges p 7 p 5 and p 7 p 3. Since the signed area of the triangle p 7 p 3 p 1 is negative, we do not add the edge p 7 p 1, and we stop. Similarly, going down we add the edge p 7 p 4. At step 4, we remove the edges p 4 p 6, p 6 p 5, and p 5 p 3 >from the p 1... p 6 convex hull, which we will replace with the newly created edges p 7 p 3 and p 7 p 4. The algorithm can be extended to calculate the convex hull for a set of points in 3-D. To do the calculation for p 1... p i+1, we draw an edge from p i+1 to the closest vertex on the p 1... p i convex hull, and then we add new edges by doing sign tests on the volumes of the tetrahedras defined by these edges. The sign test for a tetrahedron with vertices at p, q, and r is done by calculating the determinant p x p y p z 1 q x q y q z 1 r x r y r z 1 s x s y s z 1 The incremental algorithm is relatively simple, but it is not efficient and and is not easy to implement in 3-D. The Gift Wrapping Algorithm Again, we will first describe the algorithm for a set of points in 2-D. Intuitively, the basic idea is to proceed from a vertex and wrap the set of points with a rope. Let p 1... p n be the set of points for which we want to compute the convex hull, where the points are sorted in the X direction. Proceeding from the first point in the set p 1, we rotate a line on the point in a counterclockwise direction until we hit another point p a. The edge p 1 p a is then added to the convex hull. We then repeat the rotation of the line on p a until we made a complete circle. Note that for every edge that we add to the convex hull, all the points in the set are on the left side of the half space defined by that edge. This process is illustrated in Fig. 3. The method can be extended of compute the convex hull for a set of points in 3-D. The basic idea is to proceed from a face on the convex hull to the adjacent faces, in the manner in which one where wiwraps a sheet around a plane-bounded object. The adjacent faces are determined by rotating a plane on the line defined by the edge of an existing face of the convex hull. The first point that the plane hits will be part of the convex hull as well. The method is illustrated in Fig. 4, where a new face p d p b p c is determined from an existing face p a p b p c. The first step is to find a face defined by three points on the convex hull. As in the planar case, the first of these points can be picked as the one with the least x coordinate. The second point is found by rotating a plane on the line parallel to the y or z axis, and the third point is found by rotating a plane on the line determined by the first two points.

6 CS348a: Handout #36 Pb P1 Pa Figure 3: Computing the 2-D convex hull using the gift wrapping algorithm. Query Problems Where Will a Plane Hit a Polyhedron? Given a polyhedron P 0 and a plane which rotates on a line, we want to find the vertex v 0 where the plane first touches P 0. We use an incremental algorithm on the hierarchy of polyhedra P 0,P 1...P k which we constructed in the first section. We first determine the vertex v k where the plane touches P k, and based on this we determine the corresponding vertex for P k 1, P k 2...P 0. Suppose the plane first touches P i+1 at vertex v i+1. Then, the plane will first touch P i either at v i+1 itself, or at an adjacent vertex that was removed in P i+1 (which can be found using the hierarchy pointer). Since at each iteration P i+1 P i the computation is local around vertex pi, this is an O(logn) algorithm. Is a Point inside a polyhedron? Given a polyhedron P 0, we want to determine if a point q is inside it. As before, we use an incremental algorithm on the hierarchy of polyhedra P 0...P k, starting at P k. The search stops if q is inside a polyhedron P i, since obviously it will be inside P 0 as well. Assume we determined that q is not inside P i+1, and we want to determine if it is inside P i. To do that, we grow a sphere centered at q, which will hit P i+1 on some face f. If f belongs to P i as well, then the sphere will also hit P i at f, and q is not inside P i. If f is not in P i, then P i has a vertex v outside f which is inside the sphere. Doing a local computation on the tetrahedron determined by f and v, it can be determined if q is inside P i or not. The algorithm is illustrated in Fig. 5. Since this algorithm also implies a local computation at each iteration, it is O(logn).

CS348a: Handout #36 7 b a c d Figure 4: Determining a facet on the 3-D convex hull using the gift wrapping algorithm. q Pi+1 f v Figure 5: Determining if point q is inside a polyhedron (2-D view).