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 Spring O'Rourke Chapter 6 with some material from de Berg et al. Chapter 8 al Arrangements Chapter 6 Arrangements Introduction Combinatorics of Arrangements Incremental Algorithm g Three and Higher Dimensions Duality y HigherHigher-Order Voronoi Diagrams Applications What is an Arrangement? (2D) ARRANGEMENT: planar partition induced ARRANGEMENT: by a collection of lines "arranged" in the plane. face vertex t edge Combinatorics of Arrangements "Simple" arrangement: Simple" 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 worstFor every simple arrangement of n lines: Establish inductively. E = n2 Each i f li E h 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 d i ti d B derivation (upper bound) bound) n F = + n +1 2 (for a simple arrangement) Add lines one by one, bounding the increase in number of faces one at each step. Let L = {l1 ,K, ln } and for 1 i n define Li = {l1 ,K, 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. Total number of faces is therefore at most: Number of faces increases by number of edges of A(Li-1) on li. n Upper bounded by i 1 + i = n2 / 2 + n / 2 + 1 i =1 Combinatorics of Arrangements O'Rourke O'R k derivation (more complex) n F = + n +1 2 (for a simple arrangement) Reexamine proof of Euler's formula (V E + F = 2) (V 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) (V fl tt i flattening stretches all edges incident to v to extend to infinity t t h ll d i id t t t t d t i fi it v How to flatten? Stereographic projection result is topologically equivalent to an arrangement p so V E + F = 1 h ld for an arrangement holds f t 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 Z Z(L) t 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 zn 6n. 6n. O(n) Combinatorics of Arrangements Zone Theorem Arrangement A A (rotated) Left-bounding edge 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 leftright-bounding edges: g g g right- left-bounding edge has interior points of cell immediately to leftits right. Analogous definition for right-bounding edge. right- Combinatorics of Arrangements Zone Theorem Arrangement A A (rotated) r Proof Goal: Goal: Show number of left edges In in zn is 3n 3n. (Right case is symmetric.) Inductive Proof Sketch: Induct on number of lines n Sketch: -Base Case: Empty arrangement has no left edges. -I d ti Hypothesis: In-1 3( -1) Inductive H th i 3(n3(n -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 In-1 3(n-1). 3(nShow putting r b k adds at most 3 left edges so th t In 3n-3 3 = 3 Sh tti back dd t t l ft d that 3n-3+3 3n. 3 Reason: r adds one new left edge and splits at most 2 old left edges. -- see next slide Combinatorics of Arrangements Zone Theorem Arrangement A A A' (rotated) A A B B C C r Inductive Proof Sketch (continued): (continued): Inductive Step: Show putting r back adds at most 3 left edges so that In 3n-3+3 = 3n. Step: 3nReason: r adds one new left edge and splits at most 2 old left edges 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. ti Algorithm: 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 Update Ai-1 to Ai and space Three and Higher Dimensions 2D results extend to higher dimensions For an arrangement of hyperplanes in d dimensions di i number of faces is O(nd) O(n zone of a hyperplane has complexity O(nd-1) construct in O(nd) time and space O(n 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) p primal space p 2(p3) 2 : L : y = mx - b p : ( m, b) (already seen in de Berg et al.) x 2(p1) 2(p4) 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) Properties of D: D: y p4 p2 p3 D(p1) D(p4) y D(p2) - is its own inverse - preserves point-line pointincidence - 2 points determine a line <<> 2 lines determine an p intersection point - preserves above/below ordering x p1 p5 D(p5) D(p3) x primal space dual space Duality via Parabolic Tangents Intersection of two adjacent tangents p j projects to 1D Voronoi diagram of the two g 1D points: 2 tangents above x = a, x b x=b 2ax2ax-a2 = 2bx-b2 2bx2x(a-b)=a 2x(a-b)=a2-b2=(a-b)(a+b) =(a-b)(a+b) x= (a+b)/2 (a+b)/2 Higher Order Higher-Order Voronoi Diagrams 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 k(k+1)project to kth-order Voronoi diagram kth2-level projects to 1st order diagram projects to 2nd order diagram Points on x-axis D(p1) map t to tangents to p2 p3 p1 parabola y=x2 D(p4) 1-D diagram D(p5) D(p3) p4 p5 x 3-level x D(p2) Applications K-Nearest Neighbors kth order Voronoi di d V i diagram can be used to find k-nearest neighbors of b d t fi d kt i hb f query point topological sweep of arrangement of objects t l i l f t f bj t characteristic views an object can present to viewer (combinatorially (combinatorially equivalent) i l t) combinatorial structure of shadow projection changes when viewpoint crosses a plane l bisector of point set is line having at most points strictly to each side bisectors f i t t dualize to di l l f d l li bi t of point set d li t median level of dual line arrangement t all ham-sandwich cuts for sets A, B: intersect median levels of A, B hamhigher 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 HamHam-Sandwich Cuts of a Point Set de Berg et al. Chapter 8 Motivating application: Compute discrepancy to support "supersampling" "supersampling" (many rays per pixel) in graphics ray tracing use random rays to avoid artifacts Discrepancy: of sample set with respect to an object Discrepancy: measures quality of set of n random rays = difference between % hits for an object and % of pixel j p area where object is visible (goal is to make difference small) small) Object behaves like half-plane inside pixel, so define halfhalfhalfplane discrepancy = maximum of discrepancies over all l di i f di i ll possible half-planes half Compute this in O(n2) time by using (for one case) a pointO(n pointy g g toto-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 halfdiscrepancy. ...
View Full Document

Ask a homework question - tutors are online