Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.

Slides:



Advertisements
Similar presentations
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Advertisements

Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
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.
Brute-Force Triangulation
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.
One of the most important problems is Computational Geometry is to find an efficient way to decide, given a subdivision of E n and a point P, in which.
UNC Chapel Hill M. C. Lin Polygon Triangulation Chapter 3 of the Textbook Driving Applications –Guarding an Art Gallery –3D Morphing.
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.
What does that mean? To get the taste we will just look only at some sample problems... [Adapted from S.Suri]
Incidences and Many Faces via cuttings Sivanne Goldfarb
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
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.
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.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 4 Chapter 6: Arrangements Monday,
Voronoi Diagrams Computational Geometry, WS 2006/07 Lecture 10 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Duality and Arrangements Computational Geometry, WS 2007/08 Lecture 6 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Lecture 10 : Delaunay Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Overview Motivation. Triangulation of Planar Point Sets. Definition.
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Delaunay Triangulation.
Lecture 8 : Arrangements and Duality Computational Geometry Prof. Dr. Th. Ottmann 1 Duality and Arrangements Duality between lines and points Computing.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
Duality and Arrangements Computational Geometry, WS 2006/07 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
The Art Gallery Problem
Brute-Force Triangulation
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.
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Duality.
UNC Chapel Hill M. C. Lin Linear Programming Reading: Chapter 4 of the Textbook Driving Applications –Casting/Metal Molding –Collision Detection Randomized.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
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.
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.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 6 with some material.
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.
An Introduction to Computational Geometry: Arrangements and Duality Joseph S. B. Mitchell Stony Brook University Some images from [O’Rourke, Computational.
Polygon Triangulation
Computational Geometry
Arrangements and Duality
CMPS 3130/6130 Computational Geometry Spring 2017
Outline 1 Properties of Planar Graphs 5/4/2018.
Computational Geometry
The Art Gallery Problem
CMPS 3130/6130 Computational Geometry Spring 2017
Computational Geometry Capter:1-2.1
The Art Gallery Problem
Polygon Triangulation
GRAPH SPANNERS.
Depth Estimation via Sampling
Convex Sets & Concave Sets
CMPS 3130/6130 Computational Geometry Spring 2017
Computational Geometry
Presentation transcript:

Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality

Center for Graphics and Geometric Computing, Technion 1 Minimum-Area Triangle, the problem Given a set of n points, determine the three points that form the triangle of minimum area.

Center for Graphics and Geometric Computing, Technion 3 On the Agenda  Duality  Line Arrangements  Applications

Center for Graphics and Geometric Computing, Technion 4 Duality

5 Order-Preserving Duality Note: Vertical lines (x=C, for a constant C) are not mapped by this duality (or, actually, are mapped to “points at infinity”). We ignore such lines since we can:  Avoid vertical lines by a slight rotation of the plane; or  Handle vertical lines separately. Dual line: P * : y=ax-bPoint: P(a,b) Dual point: ℓ * : (a,-b)Line: ℓ : y=ax+b

Center for Graphics and Geometric Computing, Technion 6 Duality Properties  Self-inverse: (P * ) * = P, (ℓ * ) * = ℓ.  Incidence preserving: P  ℓ  ℓ *  P *.   Order preserving: P above/on/below ℓ  ℓ * above/on/below P * (the point is always below/on/above the line)

Center for Graphics and Geometric Computing, Technion 7 Duality Properties (cont.)  Points P 1,P 2,P 3 collinear on ℓ Lines P 1 *, P 2 *, P 3 * intersect at ℓ *. (Follows directly from property 2.)

Center for Graphics and Geometric Computing, Technion 8 Duality Properties (cont.)  The dual of a line segment s=[P 1 P 2 ] is a double wedge that contains all the dual lines of points P on s. All these points P are collinear, therefore, all their dual lines intersect at one point, the intersection of P 1 * and P 2 *.  Line ℓ intersects segment s  ℓ *  s*. Question: How can ℓ be located so that ℓ * appears in the right side of the double wedge? P1P1 P2P2 P1*P1* P2*P2* ℓ ℓ * P

Center for Graphics and Geometric Computing, Technion 9 The Envelope Problem  Problem: Find the (convex) lower/upper envelope of a set of lines ℓ i – the boundary of the intersection of the halfplanes lying below/above all the lines.   Theorem: Computing the lower (upper) envelope is equivalent to computing the lower (upper) convex hull of the points ℓ i * in the dual plane.   Proof: Using the order-preserving property.

Center for Graphics and Geometric Computing, Technion 10 Parabola: Duality Interpretation  Theorem: The dual line of a point on the parabola y=x 2 /2 is the tangent to the parabola at that point.  Proof: Consider the parabola y=x 2 /2. Its derivative is y’=x. A point on the parabola: P(a,a 2 /2). Its dual: y=ax-a 2 /2. Compute the tangent at P: It is the line y=cx+d passing through (a,a 2 /2) with slope c=a. Therefore, a 2 /2=a∙a+d, that is, d=-a 2 /2, so the line is y=ax-a 2 /2. y=x 2 /2 P(a,a 2 /2) y=ax-a 2 /2

Center for Graphics and Geometric Computing, Technion 11 Parabola: Duality Interpretation (cont.)  And what about points not on the parabola?  The dual lines of two points (a,b 1 ) and (a,b 2 ) have the same slope and the opposite vertical order with vertical distance |b 1 -b 2 |. P1(a,b1)P1(a,b1) P2(a,b2)P2(a,b2) P * 1 : y=ax-b 1 P * 2 : y=ax-b 2 y=x 2 /2

Center for Graphics and Geometric Computing, Technion 12 Yet Another Interpretation Problem: Given a point q, what is q*?  Construct the two tangents ℓ 1, ℓ 2 to the parabola y=x 2 /2 that pass through q. Denote the tangency points by P 1, P 2.  Draw the line joining P 1 and P 2. This is q*!  Reason: q on ℓ 1 → P 1 = ℓ 1 * on q*. q on ℓ 2 → P 2 = ℓ 2 * on q*. Hence, q* = P 1 P 2. q*q* q ℓ1ℓ1 ℓ2ℓ2 P2P2 P1P1

Center for Graphics and Geometric Computing, Technion 13 Minimum-Area Triangle, in the dual plane  For each pair of points p i and p j (assume p i p j is the triangle base): Identify the vertex v of the arrangement, corresponding to the line through these points. Find the line of the arrangement that is closest vertically to v. Remember the best line so far.  Output point corresponding to the best dual line. pipi pjpj pkpk pi*pi* pj*pj* pk*pk* v=(a,b) primal dual y=ax+b y=ax+b’ (a,b’)

Center for Graphics and Geometric Computing, Technion 14 Arrangements

Center for Graphics and Geometric Computing, Technion 15 Line Arrangement  Given a set L of n lines in the plane, their arrangement A(L) is the plane subdivision induced by L.  Theorem: The combinatorial complexity of the arrangement of n lines is  (n 2 ) in the worst case.  Proof: Number of vertices  (each pair of different lines may intersect at most once). Number of edges  n 2 (each line is cut into at most n pieces by at most n-1 other lines). Number of faces  (by Euler’s formula and connecting all rays to a point at infinity). Equalities hold for lines in general position. (Show!)

Center for Graphics and Geometric Computing, Technion 16 Line Arrangement  Goal: Compute this planar map (as a DCEL).  A plane-sweep algorithm would require  (n 2 log n) time (after finding the leftmost event*):  (n 2 ) events,  (log n) time each. (*) Question: How can the leftmost event be found in O(n log n) time instead of O(n 2 ) time?

Center for Graphics and Geometric Computing, Technion 17 An Incremental Algorithm  Input: A set L of n lines in the plane.  Output: The DCEL structure for the arrangement A(L), i.e., the subdivision induced by L in a bounding box B(L) that contains all the intersections of lines in L.  The algorithm: Compute a bounding box B(L), and initialize the DCEL. Insert one line after another. For each line, locate the entry face, and update the arrangement, face by face, along the path of faces (“zone”) traversed by the line.

Center for Graphics and Geometric Computing, Technion 18 Line Arrangement Algorithm (cont.)  After inserting the ith line, the complexity of the map is O(i 2 ). (  (i 2 ) in the worst case—general position.)  The time complexity of each insertion of a line depends on the complexity of its zone.

Center for Graphics and Geometric Computing, Technion 19 Zone of a Line  The zone of a line ℓ in the arrangement A(L) is the set of faces of A(L) intersected by ℓ.  The complexity of a zone is the total complexity of all its faces: the total sum of edges (or vertices) of these faces.

Center for Graphics and Geometric Computing, Technion 20 The Zone Theorem  Theorem: In an arrangement of n lines, the complexity of the zone of a line is O(n).  Proof (sketch): Consider a line ℓ. Assume without loss of generality that ℓ is horizontal. Assume first that there are no horizontal lines. Count the number of left bounding edges in the zone, and prove that this is at most 4n. (Same idea for right bounding edges.) ℓ ℓ3ℓ3 ℓ2ℓ2 ℓ1ℓ1 ℓ4ℓ4

Center for Graphics and Geometric Computing, Technion 21 Zone Complexity: Proof  By induction on n.  For n=1: Trivial.  For n>1: Let ℓ 1 be the rightmost line intersecting ℓ (assume it’s unique). By the induction hypothesis, the zone of ℓ in A(L\{ℓ 1 }) has at most 4(n-1) left bounding edges. When adding ℓ 1, the number of such edges increases: One new edge on ℓ 1. Two old edges split by ℓ 1. ℓ ℓ1ℓ1 w v Hence, the new zone complexity is at most 4(n-1)+3 < 4n.

Center for Graphics and Geometric Computing, Technion 22 Zone Complexity: Proof (cont.)  And what happens if several lines intersect ℓ in the rightmost intersection points (i.e., if ℓ 1 is not unique)? Pick ℓ 1 randomly out of these lines. By the induction hypothesis, the zone of ℓ in A(L\{ℓ 1 }) has at most 4(n-1) left bounding edges. When adding ℓ 1, the number of such edges increases: Two new edges on ℓ 1. Two old edges split by ℓ 1. ℓ ℓ1ℓ1 w Hence, the new zone complexity is at most 4(n-1)+4 = 4n. v

Center for Graphics and Geometric Computing, Technion 23 Zone Complexity: Proof (cont.)  And what if there are horizontal lines?  If these lines are parallel to ℓ, then just (imaginarily) rotate them; this will only increase the complexity of the zone of ℓ.  If there is a line ℓ 0 identical to ℓ, then the complexity of the zone of ℓ is equal to that of the zone of ℓ 0.  If there are several lines identical to ℓ, their multiplicity does not increase the complexity of the zone of ℓ.

Center for Graphics and Geometric Computing, Technion 24 Constructing the Arrangement  The time required to insert a line ℓ i is linear in the complexity of its zone, which is linear in the number of the already existing lines. Therefore, the total time is Finding a Finding According bounding box the entry to the zone (can be done point (bin. theorem in O(n log n)) search)  Note: The bound does not depend on the line-insertion order! (All orders are good.)

Center for Graphics and Geometric Computing, Technion 25 Application 1: Minimum-Area Triangle  Given a set of n points*, determine the three points that form the triangle of minimum area.  Easy to solve in  (n 3 ) time, but not so easy to solve in O(n 2 ) time.  May be solved in  (n 2 ) time using the line arrangement in the dual plane. (*) Finding the specific set of n points that maximizes the area of the minimum-area triangle is the famous Heilbronn’s triangle problem.

Center for Graphics and Geometric Computing, Technion 26 An  (n 2 )-Time Algorithm  Construct the arrangement of dual lines in  (n 2 ) time.  For each pair of points p i and p j (assume p i p j is the triangle base): Identify the vertex v of the arrangement, corresponding to the line through these points. Find the line of the arrangement that is closest vertically to v. Remember the best line so far.  Output point corresponding to the best dual line.  Questions: Why is it easier to find p k * than p k ? Why is it OK to look vertically? Why is the total running time only  (n 2 )? pipi pjpj pkpk pi*pi* pj*pj* pk*pk* v=(a,b) primary dual y=ax+b y=ax+b’ (a,b’)

Center for Graphics and Geometric Computing, Technion 27 Application 2: Discrepancy  Given a set S of n points in the unit square U=[0,1] 2.  For a given line ℓ, how many points lie below ℓ ? Let h be the halfplane below ℓ. If the points are well distributed, this number should be close to  (h)∙n, where  (h) = |U∩h|. Define  S (h) = |S∩h|/|S|. The discrepancy of S with respect to h is:  S (h) = |  (h)-  S (h)|  The halfplane discrepancy of S is  (S) = sup h  S (h) U S ℓ, Observation: To compute  (S), it suffices to consider halfplanes that pass through pairs of points. Naive algorithm:  (n 3 ) time.

Center for Graphics and Geometric Computing, Technion 28 Computing Discrepancy  In the dual plane, this is equivalent to counting the number of dual lines above the dual point. p q q*q* p* S S*

Center for Graphics and Geometric Computing, Technion 29 Computing Discrepancy (cont.)  For every vertex in A(S*), compute the number of lines above it, passing through it (2 in general position), or lying below it.  These three numbers sum up to n, so it suffices to compute only two of them.  From the DCEL structure we know how many lines pass through each vertex.

Center for Graphics and Geometric Computing, Technion 30 Levels of an Arrangement  A point is at level k in an arrangement of n lines if there are at most k-1 lines above this point and at most n-k lines below this point.  There are n levels in an arrangement of n lines.  A vertex can be on multiple levels, depending on the number of lines passing through it.  (Sometimes levels are counted from 0 instead of 1.) L1L1 L3L3 L5L5

Center for Graphics and Geometric Computing, Technion 31 An  (n 2 )-Time Algorithm  Construct the dual arrangement.  For each line, compute the levels of all its vertices:  Compute the levels of the left infinite rays by sorting slopes. O(n log n) time.  Traverse all the lines from left to right, incrementing or decrementing the level, depending on the direction (slope) of the crossing line.  (n) time for each line.  Total:  (n 2 ) time L3L3 L5L5