Download presentation
Presentation is loading. Please wait.
Published byMaximillian Hancock Modified over 8 years ago
1
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
2
Chapter 6 Arrangements Introduction Combinatorics of Arrangements Incremental Algorithm Three and Higher Dimensions Duality Higher-Order Voronoi Diagrams Applications
3
What is an Arrangement? (2D) ARRANGEMENT: planar partition induced by a collection of lines “arranged” in the plane. vertex edge face
4
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.
5
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)
6
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’
7
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
8
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
9
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
10
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
11
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.
12
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
13
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.)
14
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)
15
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
16
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
17
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
18
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.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.