UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 6 with some material.

Slides:



Advertisements
Similar presentations
Polygon Triangulation
Advertisements

Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Applications of Euler’s Formula for Graphs Hannah Stevens.
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Computational Geometry II Brian Chen Rice University Computer Science.
2/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries II Carola Wenk.
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.
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
The Divide-and-Conquer Strategy
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Convex Hulls in 3-space Jason C. Yang.
CHAPTER 5: CONVEX POLYTOPES Anastasiya Yeremenko 1.
Voronoi Diagram Presenter: GI1 11號 蔡逸凡
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 Lecture 2 Polygon Partitioning Thursday,
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
3. Delaunay triangulation
Delaunay Triangulation Computational Geometry, WS 2006/07 Lecture 11 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
Counting and Representing Intersections Among Triangles in R 3 Esther Ezra and Micha Sharir.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 4 Chapter 6: Arrangements Monday,
TU/e computational geometry introduction Mark de Berg.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Wednesday,
Duality and Arrangements Computational Geometry, WS 2007/08 Lecture 6 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
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.
Lecture 10 : Delaunay Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Overview Motivation. Triangulation of Planar Point Sets. Definition.
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
Lecture 8 : Arrangements and Duality Computational Geometry Prof. Dr. Th. Ottmann 1 Duality and Arrangements Duality between lines and points Computing.
Computing the Delaunay Triangulation By Nacha Chavez Math 870 Computational Geometry; Ch.9; de Berg, van Kreveld, Overmars, Schwarzkopf By Nacha Chavez.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 4: 3D Convex Hulls Monday, 2/23/04.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 3 Chapter 4: 3D Convex Hulls Chapter.
Duality and Arrangements Computational Geometry, WS 2006/07 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 2 Chapter 2: Polygon Partitioning.
Efficient Partition Trees Jiri Matousek Presented By Benny Schlesinger Omer Tavori 1.
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Duality.
Line Arrangement Chapter 6. Line Arrangement Problem: Given a set L of n lines in the plane, compute their arrangement which is a planar subdivision.
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.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Splitting a Face Point edge already split new vertex two new faces one new vertex six new half-edges.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Arrangements and Duality Sanjay Sthapit Comp290 10/6/98.
Arrangements and Duality Motivation: Ray-Tracing Fall 2001, Lecture 9 Presented by Darius Jazayeri 10/4/01.
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.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
Arrangements and Duality Supersampling in Ray Tracing.
IntroductionReduction to Arrangements of Hyperplanes We keep the canonical triangulation (bottom, left corner triangulation) of each convex cell of the.
Great Theoretical Ideas in Computer Science for Some.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Line Arrangements.
COMPSCI 102 Introduction to Discrete Mathematics.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
An Introduction to Computational Geometry: Arrangements and Duality Joseph S. B. Mitchell Stony Brook University Some images from [O’Rourke, Computational.
Polygon Triangulation
Arrangements and Duality
CMPS 3130/6130 Computational Geometry Spring 2017
Introduction to Polygons
Polygon Triangulation
Depth Estimation via Sampling
Computational Geometry
Discrete Mathematics for Computer Science
Presentation transcript:

UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 6 with some material from de Berg et al. Chapter 8 Arrangements

Chapter 6 Arrangements Introduction Combinatorics of Arrangements Incremental Algorithm Three and Higher Dimensions Duality Higher-Order Voronoi Diagrams Applications

What is an Arrangement? (2D) ARRANGEMENT: planar partition induced by a collection of lines “arranged” in the plane. vertex edge face

Combinatorics of Arrangements “Simple” arrangement: “Simple” arrangement: Not “degenerate” Not “degenerate” Every pair of lines meets in exactly 1 point Every pair of lines meets in exactly 1 point no parallel lines no parallel lines No 3 lines meet in a point No 3 lines meet in a point Forms worst-case for these combinatorial quantities Forms worst-case for these combinatorial quantities For every simple arrangement of n lines: For every simple arrangement of n lines: de Berg or O’Rourke derivation (see next slides) Each pair of lines intersects once. Establish inductively.

Combinatorics of Arrangements de Berg derivation (upper bound) Add lines one by one, bounding the increase in number of faces at each step. Add lines one by one, bounding the increase in number of faces at each step. Let and for define. Let and for define. Denote the arrangement induced by L as A(L). Denote the arrangement induced by L as A(L). When adding l i, every edge of l i splits a face of the arrangement into 2. When adding l i, every edge of l i splits a face of the arrangement into 2. Number of faces increases by number of edges of A(L i-1 ) on l i. Number of faces increases by number of edges of A(L i-1 ) on l i. Upper bounded by i Upper bounded by i Total number of faces is therefore at most: Total number of faces is therefore at most: (for a simple arrangement)

Combinatorics of Arrangements Reexamine proof of Euler’s formula (V – E + F = 2) Reexamine proof of Euler’s formula (V – E + F = 2) Puncture polytope at a vertex v (instead of interior of a face) and flatten to the plane Puncture polytope at a vertex v (instead of interior of a face) and flatten to the plane Effects: Effects: lose 1 vertex, so (V – E + F = 1) lose 1 vertex, so (V – E + F = 1) flattening stretches all edges incident to v to extend to infinity flattening stretches all edges incident to v to extend to infinity How to flatten? Stereographic projection How to flatten? Stereographic projection result is topologically equivalent to an arrangement result is topologically equivalent to an arrangement so V – E + F = 1 holds for an arrangement so V – E + F = 1 holds for an arrangement Now substitute for known values of V and E Now substitute for known values of V and E O’Rourke derivation (more complex) (for a simple arrangement) vp p’

Combinatorics of Arrangements Zone Theorem The total number of edges in all the cells that intersect one line in an arrangement of n lines is z n ≤ 6n. O(n) O(n) L Arrangement A Zone Z(L)= set of cells intersected by L. z n = maximum of |Z(L)| over all L Cell A A B B C C D D

Combinatorics of Arrangements Zone Theorem L Arrangement A (rotated) Assume: no line parallel to L, L horizontal, no vertical lines Partition edges of each cell of Z(L) into left-bounding and right-bounding edges: - left-bounding edge has interior points of cell immediately to its right. Analogous definition for right-bounding edge. Left-bounding edge

Combinatorics of Arrangements Zone Theorem L Arrangement A (rotated) Inductive Proof Sketch: Induct on number of lines n -Base Case: Empty arrangement has no left edges. -Inductive Hypothesis: I n-1 ≤3(n-1) -Inductive Step: Remove a line r from A to form A’, then put it back. Line whose intersection with L is rightmost is r. Inductive hypothesis gives I n-1 ≤3(n-1). Show putting r back adds at most 3 left edges so that I n ≤3n-3+3 = 3n. Reason: r adds one new left edge and splits at most 2 old left edges. -- see next slide Proof Goal: Show number of left edges I n in z n is ≤ 3n. (Right case is symmetric.) r

Combinatorics of Arrangements Zone Theorem L Arrangement A’ (rotated) Inductive Proof Sketch (continued): Inductive Step: Show putting r back adds at most 3 left edges so that I n ≤3n-3+3 = 3n. Reason: r adds one new left edge and splits at most 2 old left edges. -- r just adds one new left edge to C since r is rightmost -- proof by contradiction shows no other new left zone edges are created; r slopes upwards and has rightmost intersection - r splits at most 2 old left zone edges in convex rightmost cell of A’ A A B B C C r

Incremental Algorithm Algorithm: ARRANGEMENT CONSTRUCTION Construct A 0, a data structure for an empty arrangement for each i = 1,...,n do Insert line L i into A i-1 as follows: Insert line L i into A i-1 as follows: Find an intersection point x between L i and some line of A i-1 Find an intersection point x between L i and some line of A i-1 Walk forward from x along cells in Z(L i ) Walk forward from x along cells in Z(L i ) Walk backard from x along cells in Z(L i ) Walk backard from x along cells in Z(L i ) Update A i-1 to A i Update A i-1 to A i  (n 2 ) time and space LiLiLiLi Inserting Line L i x Structure of arrangement is leveraged to avoid sorting.

Three and Higher Dimensions 2D results extend to higher dimensions 2D results extend to higher dimensions For an arrangement of hyperplanes in d dimensions For an arrangement of hyperplanes in d dimensions number of faces is O(n d ) number of faces is O(n d ) zone of a hyperplane has complexity O(n d-1 ) zone of a hyperplane has complexity O(n d-1 ) construct in O(n d ) time and space construct in O(n d ) time and space

Duality Key to many arrangement applications Key to many arrangement applications 1-1 mapping of (parameters of) collections of geometric entities 1-1 mapping of (parameters of) collections of geometric entities Desirable mappings preserve characteristics: incidence and/or order Desirable mappings preserve characteristics: incidence and/or order x y primal space dual spaces p5p5p5p5 p4p4p4p4 p3p3p3p3 p2p2p2p2 p1p1p1p1 xy 1(p3)1(p3)1(p3)1(p3) 1(p2)1(p2)1(p2)1(p2) 1(p1)1(p1)1(p1)1(p1) 1(p4)1(p4)1(p4)1(p4) 1(p5)1(p5)1(p5)1(p5) x y 2(p3)2(p3)2(p3)2(p3) 2(p2)2(p2)2(p2)2(p2) 2(p1)2(p1)2(p1)2(p1) 2(p4)2(p4)2(p4)2(p4) 2(p5)2(p5)2(p5)2(p5) (already seen in de Berg et al.)

Duality via Parabolic Tangents Convenient in Computational Geometry Convenient in Computational Geometry y = 2ax - a 2 is tangent to parabola y=x 2 at point (a,a 2 ) y = 2ax - a 2 is tangent to parabola y=x 2 at point (a,a 2 ) xy primal space p5p5p5p5 p4p4p4p4 p3p3p3p3 p2p2p2p2 p1p1p1p1 xy D(p3)D(p3)D(p3)D(p3) D(p2)D(p2)D(p2)D(p2) D(p1)D(p1)D(p1)D(p1) D(p4)D(p4)D(p4)D(p4) D(p5)D(p5)D(p5)D(p5) dual space Properties of D: - is its own inverse - preserves point-line incidence - 2 points determine a line 2 lines determine an intersection point - preserves above/below ordering (already seen in previous chapter)

Intersection of two adjacent tangents projects to 1D Voronoi diagram of the two 1D points: Intersection of two adjacent tangents projects to 1D Voronoi diagram of the two 1D points: 2 tangents above x = a, x=b 2 tangents above x = a, x=b 2ax-a 2 = 2bx-b 2 2ax-a 2 = 2bx-b 2 2x(a-b)=a 2 -b 2 =(a-b)(a+b) 2x(a-b)=a 2 -b 2 =(a-b)(a+b) x= (a+b)/2 x= (a+b)/2 Duality via Parabolic Tangents

Higher-Order Voronoi Diagrams Relationship between Voronoi diagrams and arrangements Relationship between Voronoi diagrams and arrangements Order in which tangents are encountered moving down vertical x=b is same as order of closeness of b to the x i ’s that generate the tangents Order in which tangents are encountered moving down vertical x=b is same as order of closeness of b to the x i ’s that generate the tangents k-level of arrangement = set of edges whose points have exactly k-1 lines strictly above them, together with edge endpoints k-level of arrangement = set of edges whose points have exactly k-1 lines strictly above them, together with edge endpoints Points of intersection of k- and (k+1)-levels in parabola arrangement project to kth-order Voronoi diagram Points of intersection of k- and (k+1)-levels in parabola arrangement project to kth-order Voronoi diagram 1-D diagram Points on x-axis map to tangents to parabola y=x 2 x p5p5p5p5 p4p4p4p4 p3p3p3p3 p2p2p2p2 p1p1p1p1 D(p1)D(p1)D(p1)D(p1) D(p2)D(p2)D(p2)D(p2) D(p3)D(p3)D(p3)D(p3) D(p4)D(p4)D(p4)D(p4) D(p5)D(p5)D(p5)D(p5) projects to 2 nd order diagram x 3-level 2-level projects to 1 st order diagram

Applications K-Nearest Neighbors K-Nearest Neighbors kth order Voronoi diagram can be used to find k-nearest neighbors of query point kth order Voronoi diagram can be used to find k-nearest neighbors of query point Hidden Surface Removal for Graphics Hidden Surface Removal for Graphics topological sweep of arrangement of objects topological sweep of arrangement of objects Aspect Graphs for Computer Vision Aspect Graphs for Computer Vision characteristic views an object can present to viewer (combinatorially equivalent) characteristic views an object can present to viewer (combinatorially equivalent) Smallest Polytope Shadow Smallest Polytope Shadow combinatorial structure of shadow projection changes when viewpoint crosses a plane combinatorial structure of shadow projection changes when viewpoint crosses a plane Ham-Sandwich Cuts of a Point Set Ham-Sandwich Cuts of a Point Set bisector of point set is line having at most ½ points strictly to each side bisector of point set is line having at most ½ points strictly to each side bisectors of point set dualize to median level of dual line arrangement bisectors of point set dualize to median level of dual line arrangement all ham-sandwich cuts for sets A, B: intersect median levels of A, B all ham-sandwich cuts for sets A, B: intersect median levels of A, B higher dimensional generalization: for d point sets in d dimensions, there exists a hyperplane simultaneously bisecting each point set higher dimensional generalization: for d point sets in d dimensions, there exists a hyperplane simultaneously bisecting each point set

de Berg et al. Chapter 8 Motivating application: Motivating application: Compute discrepancy to support “supersampling” (many rays per pixel) in graphics ray tracing Compute discrepancy to support “supersampling” (many rays per pixel) in graphics ray tracing use random rays to avoid artifacts use random rays to avoid artifacts Discrepancy: of sample set with respect to an object Discrepancy: of sample set with respect to an object measures quality of set of n random rays measures quality of set of n random rays = difference between % hits for an object and % of pixel area where object is visible (goal is to make difference small) = difference between % hits for an object and % of pixel area where object is visible (goal is to make difference small) Object behaves like half-plane inside pixel, so define half- plane discrepancy = maximum of discrepancies over all possible half-planes Object behaves like half-plane inside pixel, so define half- plane discrepancy = maximum of discrepancies over all possible half-planes Compute this in O(n 2 ) time by using (for one case) a point- to-line duality to create an arrangement, then evaluating levels in the arrangement. Compute this in O(n 2 ) time by using (for one case) a point- to-line duality to create an arrangement, then evaluating levels in the arrangement. Number of lines above, through, and below each vertex of arrangement provide means to compute half-plane discrepancy. Number of lines above, through, and below each vertex of arrangement provide means to compute half-plane discrepancy.