UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 4: 3D Convex Hulls Monday, 2/23/04.

Slides:



Advertisements
Similar presentations
Geometry Introduction
Advertisements

Polygon Triangulation
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Convex drawing chapter 5 Ingeborg Groeneweg. Summery What is convex drawing What is convex drawing Some definitions Some definitions Testing convexity.
2/9/06CS 3343 Analysis of Algorithms1 Convex Hull  Given a set of pins on a pinboard  And a rubber band around them  How does the rubber band look when.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Brute-Force Triangulation
C o m p u t i n g C O N V E X H U L L S by Kok Lim Low 10 Nov 1998 COMP Presentation.
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Ruslana Mys Delaunay Triangulation Delaunay Triangulation (DT)  Introduction  Delaunay-Voronoi based method  Algorithms to compute the convex hull 
Introduction to Algorithms Rabie A. Ramadan rabieramadan.org 6 Ack : Carola Wenk nad Dr. Thomas Ottmann tutorials.
Convex Hulls May Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
Convex Hulls in 3-space Jason C. Yang.
1 Convex Hull in Two Dimensions Jyun-Ming Chen Refs: deBerg et al. (Chap. 1) O’Rourke (Chap. 3)
Computational Geometry
8/29/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Spring 2006 Convex Hulls Carola Wenk.
What does that mean? To get the taste we will just look only at some sample problems... [Adapted from S.Suri]
By: Andrew Shatz & Michael Baker Chapter 15. Chapter 15 section 1 Key Terms: Skew Lines, Oblique Two lines are skew iff they are not parallel and do not.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 Lecture 2 Polygon Partitioning Thursday,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 O’Rourke Chapter 7 Search & Intersection.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 4 Chapter 6: Arrangements Monday,
UMass Lowell Computer Science Graduate Algorithms Prof. Karen Daniels Spring, 2005 Computational Geometry Overview from Cormen, et al. Chapter 33.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Wednesday,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 3 Chapter 3: 2D Convex Hulls Friday,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 5: Voronoi Diagrams Monday, 2/23/04.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 4: 3D Convex Hulls Friday, 2/9/07.
Polygonal Mesh – Data Structure and Smoothing
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Lecture 2 Chapter 2: Polygon Partitioning.
Computational Geometry Overview from Cormen, et al. Chapter 33
Geometric Modeling Mortenson Chapter 1 (including some material from Farin Ch. 2)
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2002 Tuesday, 5/7/02 Computational Geometry Chapter 33.
Convex Hull Computation ● Applications of Convex Hull Computation ● Definitions ● Basic Math Functions ● Algorithms Algorithm Speed Discovered By Brute.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning.
UMass Lowell Computer Science Graduate Algorithms Prof. Karen Daniels Spring, 2009 Computational Geometry Overview from Cormen, et al. Chapter 33.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 3 Chapter 4: 3D Convex Hulls Chapter.
Complex Model Construction Mortenson Chapter 11 Geometric Modeling
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 2 Chapter 2: Polygon Partitioning.
Chapter 12 Surface Area and Volume. Topics We Will Discuss 3-D Shapes (Solids) Surface Area of solids Volume of Solids.
Chapter 12 Surface Area and Volume. Topics We Will Discuss 3-D Shapes (Solids) Surface Area of solids Volume of Solids.
9-4 Geometry in Three Dimensions  Simple Closed Surfaces  Regular Polyhedra  Cylinders and Cones.
Chapter 15: Geometric Solids Brian BarrDan Logan.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 O’Rourke Chapter 7 Search & Intersection.
C o m p u t i n g C O N V E X H U L L S. Presentation Outline 2D Convex Hulls –Definitions and Properties –Approaches: Brute Force Gift Wrapping QuickHull.
12. Polyhedra
Computational Geometry 2D Convex Hulls Joseph S. B. Mitchell Stony Brook University Chapter 2: Devadoss-O’Rourke.
An Introduction to Computational Geometry: Polyhedra Joseph S. B. Mitchell Stony Brook University Chapter 6: Devadoss-O’Rourke.
Euler’s characteristic and the sphere
Chapter 12.1 Notes Polyhedron – is a solid that is bounded by polygons, called faces, that enclose a single region of space. Edge – of a polygon is a line.
Arrangements and Duality Sanjay Sthapit Comp290 10/6/98.
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
1 / 41 Convex Hulls in 3-space Jason C. Yang. 2 / 41 Problem Statement Given P: set of n points in 3-space Return: –Convex hull of P: CH (P) –Smallest.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness)
Chapter Area, Pythagorean Theorem, and Volume 14 Copyright © 2013, 2010, and 2007, Pearson Education, Inc.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 4: 3D Convex Hulls Thursday,
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
Computational Geometry 2D Convex Hulls
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 6 with some material.
Solid Modeling Prof. Lizhuang Ma Shanghai Jiao Tong University.
Polygon Triangulation

Goal 1: Using Properties of Polyhedra Goal 2: Using Euler’s Theorem
Polyhedra and Prisms.
Convex Hull.
I. The Problem of Molding
Surface Area and Volume
Introduction to Algorithms
14 Chapter Area, Pythagorean Theorem, and Volume
Prof. Lizhuang Ma Shanghai Jiao Tong University
Presentation transcript:

UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 4: 3D Convex Hulls Monday, 2/23/04

Chapter 4 3D Convex Hulls PolyhedraAlgorithmsImplementation Polyhedral Boundary Representations Randomized Incremental Algorithm Higher Dimensions

Polyhedra: What are they? ä Polyhedron generalizes 2D polygon to 3D ä Consists of flat polygonal faces ä Boundary/surface contains ä 0D vertices1D edges2D faces ä Components intersect “properly.” Each face pair: ä disjoint or have vertex in common or have vertex/edge/vertex in common ä Local topology is “proper” ä at every point neighborhood is homeomorphic to disk ä Global topology is “proper” ä connected, closed, bounded ä may have holes not polyhedra! polyhedra for more examples, see

Polyhedra: A Flawed Definition ä Definition of Polyhedron 1 ä A polyhedron 1 is a region of space bounded by a finite set of polygons such that: ä every polygon shares at least one edge with some other polygon ä every edge is shared by exactly two polygons. HW Problem: - What is wrong with this definition? - Find an example of an object that is a polyhedron 1 but is not a polyhedron. polyhedra and polyhedra 1 ? not polyhedra and not polyhedra 1 ?

Polyhedra: A Resource

Polyhedra: Regular Polytopes ä Convex polyhedra are polytopes ä Regular polyhedra are polytopes that have: ä regular faces, = faces, = solid (dihedral) angles ä There are exactly 5 regular polytopes Excellent math references by H.S.M. Coxeter: - Introduction to Geometry (2nd edition), Wiley &Sons, Regular Polytopes, Dover Publications, 1973

Polyhedra: Euler’s Formula Proof has 3 parts: 1) Convert polyhedron surface to planar graph 2) Tree theorem 3) Proof by induction V - E + F = 2

Algorithms: 2D Gift Wrapping ä Use one extreme edge as an anchor for finding the next  O(n 2 ) Algorithm: GIFT WRAPPING i 0 index of the lowest point i i 0 repeat for each j = i for each j = i Compute counterclockwise angle  from previous hull edge Compute counterclockwise angle  from previous hull edge k index of point with smallest  k index of point with smallest  Output (p i, p k ) as a hull edge Output (p i, p k ) as a hull edge i k i k until i = i 0

Algorithms: 3D Gift Wrapping CxHull Animations: O(n 2 ) time [output sensitive: O(nF) for F faces on hull]

Algorithms: 2D Divide-and-Conquer ä Divide-and-Conquer in a geometric setting ä O(n) merge step is the challenge ä Find upper and lower tangents ä Lower tangent: find rightmost pt of A & leftmost pt of B; then “walk it downwards” ä Idea is extended to 3D in Chapter 4. Algorithm: 2D DIVIDE-and-CONQUER Sort points by x coordinate Divide points into 2 sets A and B: A contains left n/2 points B contains right n/2 points Compute ConvexHull(A) and ConvexHull(B) recursively Merge ConvexHull(A) and ConvexHull(B) O(nlgn) A B

Algorithms: 3D Divide and Conquer CxHull Animations: O(n log n) time !

Algorithms: 2D QuickHull ä Concentrate on points close to hull boundary ä Named for similarity to Quicksort a b O(n 2 ) Algorithm: 2D QUICK HULL function QuickHull(a,b,S) if S = 0 return() if S = 0 return() else else c index of point with max distance from ab c index of point with max distance from ab A points strictly right of (a,c) A points strictly right of (a,c) B points strictly right of (c,b) B points strictly right of (c,b) return QuickHull(a,c,A) + (c) + QuickHull(c,b,B) return QuickHull(a,c,A) + (c) + QuickHull(c,b,B)

Algorithms: 3D QuickHull CxHull Animations:

Algorithms: Qhull (>= 2D )

Algorithms: 2D Incremental ä Add points, one at a time ä update hull for each new point ä Key step becomes adding a single point to an existing hull. ä Idea is extended to 3D in Chapter 4. O(n 2 ) Algorithm: 2D INCREMENTAL ALGORITHM Let H 2 ConvexHull{p 0, p 1, p 2 } for k 3 to n - 1 do H k ConvexHull{ H k-1 U p k } H k ConvexHull{ H k-1 U p k } can be improved to O(nlgn)

Algorithms: 3D Incremental ä Add points, one at a time ä Update hull Q for each new point p ä Case 1: p is in existing hull Q ä Discard p ä Case 2: p is not in existing hull Q ä Compute cone tangent to Q whose apex is p ä Cone consists of triangular tangent faces ä Base of each is an edge of Q ä Construct new hull using cone

Algorithms: 3D Incremental O(n 2 ) Algorithm: 3D INCREMENTAL ALGORITHM Let H 3 ConvexHull{ p 0, p 1, p 2, p 3 } = tetrahedron for i 4 to n - 1 do for each face f of H i-1 do for each face f of H i-1 do compute volume of tetrahedron determined by f and p i mark f visible iff volume < 0 if no faces are visible then Discard p i (it is inside H i-1 ) else for each border edge e of H i-1 do for each border edge e of H i-1 do Construct cone face determined by e and p i for each visible face f do for each visible face f do Delete f Update H i Update H i Randomized incremental has expected O(nlgn) time.

Algorithms: 3D Incremental CxHull Animations: O(n 2 ) time

3D Visibility ä To build our 3D visibility intuition: ä T = planar triangle in 3D ä C = closed region bounded by a 3D cube frequent problem in graphics HW Problem: What is the largest number of vertices P can have for any triangle? T C

Polyhedral Boundary Representations winged edge f0f0f0f0 f1f1f1f1 e e1+e1+e1+e1+ e1-e1-e1-e1- e0+e0+e0+e0+ e0-e0-e0-e0- v1v1v1v1 v0v0v0v0 twin edge [ DCEL: doubly connected edge list ] f0f0f0f0 f1f1f1f1 e e 4,0 v1v1v1v1 v0v0v0v0 - focus is on edge - edge orientation is arbitrary - represent edge as 2 halves - lists: vertex, face, edge/twin - more storage space - facilitates face traversal - can represent holes with face inner/outer edge pointer e’s twin v2v2v2v2 v7v7v7v7 v6v6v6v6 v5v5v5v5 v3v3v3v3 v4v4v4v4 e 0,1

Polyhedral Boundary Representations: Quad-Edge - general: subdivision of oriented 2D manifold - edge record is part of: - endpoint 1 list - endpoint 2 list - face A list - face B list e 0,1 f0f0f0f0 f1f1f1f1 e 4,0 v1v1v1v1 v0v0v0v0 v2v2v2v2 v7v7v7v7 v6v6v6v6 v5v5v5v5 v3v3v3v3 v4v4v4v4 e 0,1 twin edge [DCEL: doubly connected edge list] e 0,0 e 1,0 e 2,0 e 3,0 e 5,1 e 6,1 e 7,1 e 1,1 e 5,1 e 6,1 e 7,1 e 1,0 e 0,0 e 2,0 e 3,0 e 4,0 e 1,1