ORourkeCH6 - UMass Lowell Computer Science 91.504 Advanced...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: UMass Lowell Computer Science 91.504 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. face vertex edge Combinatorics of Arrangements "Simple" arrangement: Not "degenerate" Every pair of lines meets in exactly 1 point no parallel lines No 3 lines meet in a point Forms worst-case for these combinatorial quantities For every simple arrangement of n lines: Establish inductively. E = n2 Each pair of lines intersects once. de Berg or O'Rourke derivation (see next slides) n V = 2 ( n 2 ) n F = + n +1 2 Combinatorics of Arrangements de Berg derivation (upper bound) n F = + n +1 2 (for a simple arrangement) Add lines one by one, bounding the increase in number of faces at each step. Let L = {l1 , , ln } and for 1 i n define Li = {l1 , , li } . Denote the arrangement induced by L as A(L). When adding li, every edge of li splits a face of the arrangement into 2. Number of faces increases by number of edges of A(Li-1) on li. i-1 Upper bounded by i Total number of faces is therefore at most: 1 + i = n2 / 2 + n / 2 + 1 i =1 n Combinatorics of Arrangements O'Rourke derivation (more complex) n F = + n +1 2 (for a simple arrangement) 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 Effects: lose 1 vertex, so (V E + F = 1) flattening stretches all edges incident to v to extend to infinity v How to flatten? Stereographic projection result is topologically equivalent to an arrangement p so V E + F = 1 holds for an arrangement p' Now substitute for known values of V and E Combinatorics of Arrangements Zone Theorem Arrangement A D Cell A A B B C D C zn= maximum of |Z(L)| over all L Zone Z(L)= set of cells intersected by L. L 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) Combinatorics of Arrangements Zone Theorem Arrangement A (rotated) Left-bounding edge L Left-bounding edge 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. Combinatorics of Arrangements Zone Theorem Arrangement A (rotated) r L Proof Goal: Show number of left edges In in zn is 3n. (Right case is symmetric.) Inductive Proof Sketch: Induct on number of lines n -Base Case: Empty arrangement has no left edges. Inductive -Inductive Hypothesis: In-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 In 3n-3+3 = 3n. Reason: r adds one new left edge and splits at most 2 old left edges. - Combinatorics of Arrangements Zone Theorem Arrangement A' (rotated) A A B B C C L r Inductive Proof Sketch (continued): Inductive Step: Show putting r back adds at most 3 left edges so that In 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' Incremental Algorithm Inserting Line Li Li x Structure of arrangement is leveraged to avoid sorting. Algorithm: ARRANGEMENT CONSTRUCTION Construct A0, a data structure for an empty arrangement for each i = 1,...,n do Insert line Li into Ai-1 as follows: Find an intersection point x between Li and some line of Ai-1 Walk forward from x along cells in Z(Li) Walk backard from x along cells in Z(Li) (n2) time and space Three and Higher Dimensions 2D results extend to higher dimensions For an arrangement of hyperplanes in d dimensions number of faces is O(nd) zone of a hyperplane has complexity O(nd-1) construct in O(nd) time and space Duality Key to many arrangement applications 1-1 mapping of (parameters of) collections of geometric entities Desirable mappings preserve characteristics: incidence and/or order y 1(p2) 1(p1) 1(p5) 1 : L : y = mx + b p : (m, b) dual spaces y p4 p2 p3 1(p3) x 1(p4) x p1 p5 y 2(p5) 2(p2) primal space 2(p3) x 2(p1) 2(p4) 2 : L : y = mx - b p : (m, b) (already seen in de Berg et al.) Duality via Parabolic Tangents Convenient in Computational Geometry y = 2ax - a2 is tangent to parabola y=x2 at point (a,a2) (already seen in previous chapter) D : L : y = 2ax - b p : (a, b) y p4 p2 p3 D(p1) D(p4) D(p5) D(p3) y D(p2) 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 x p1 p5 x primal space dual space Duality via Parabolic Tangents Intersection of two adjacent tangents projects to 1D Voronoi diagram of the two 1D points: 2 tangents above x = a, x=b 2ax-a2 = 2bx-b2 2x(a-b)=a2-b2=(a-b)(a+b) x= (a+b)/2 Higher-Order Voronoi Diagrams Points on x-axis D(p1) map to tangents to p2 p3 p1 parabola y=x2 D(p4) 1-D diagram 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 xi'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 Points of intersection of k- and (k+1)-levels in parabola arrangement project to kth-order Voronoi diagram projects to D(p5) D(p3) p4 p5 2-level 1st order diagram projects to 2nd order diagram x 3-level x D(p2) Applications K-Nearest Neighbors kth order Voronoi diagram can be used to find k-nearest neighbors of query point topological sweep of arrangement of objects characteristic views an object can present to viewer (combinatorially equivalent) combinatorial structure of shadow projection changes when viewpoint crosses a plane 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 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 Hidden Surface Removal for Graphics Aspect Graphs for Computer Vision Smallest Polytope Shadow Ham-Sandwich Cuts of a Point Set de Berg et al. Chapter 8 Motivating application: Compute discrepancy to support "supersampling" (many rays per pixel) in graphics ray tracing use random rays to avoid artifacts Discrepancy: of sample set with respect to an object 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) Object behaves like half-plane inside pixel, so define halfplane discrepancy = maximum of discrepancies over all possible half-planes Compute this in O(n2) time by using (for one case) a pointto-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. ...
View Full Document

This note was uploaded on 02/13/2012 for the course CS 91.504 taught by Professor Daniels during the Spring '10 term at UMass Lowell.

Ask a homework question - tutors are online