Line Arrangements. Applications

Similar documents
Line Arrangement. Chapter 6

10. Line Arrangements Lecture on Monday 2 nd November, 2009 by Michael Homann

CS 532: 3D Computer Vision 14 th Set of Notes

The Visibility Problem and Binary Space Partition. (slides by Nati Srebro)

Polygon Triangulation. (slides partially by Daniel Vlasic )

An Introduction to Computational Geometry: Arrangements and Duality

Computational Geometry

Planar Point Location

Polygon Triangulation. (slides partially by Daniel Vlasic )

Chapter 11. Line Arrangements

Computational Geometry Lecture Duality of Points and Lines

Lecture 3: Art Gallery Problems and Polygon Triangulation

CS6100: Topics in Design and Analysis of Algorithms

Forcing Disjoint Segments in the Plane

1. CONVEX POLYGONS. Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D.

8 Colouring Planar Graphs

Lecture 16: Voronoi Diagrams and Fortune s Algorithm

LAMC Advanced Circle October 9, Oleg Gleizer. Warm-up

Line segment intersection. Family of intersection problems

1. Meshes. D7013E Lecture 14

Notes and Answers to Homework Exam 1, Geometric Algorithms, 2017

CMPS 3130/6130 Computational Geometry Spring Voronoi Diagrams. Carola Wenk. Based on: Computational Geometry: Algorithms and Applications

An Implementation of a Near-Linear Polygon Triangulation Algorithm for General Polygons

Scheduling, Map Coloring, and Graph Coloring

Chapter 9. Line Arrangements

Exercise set 2 Solutions

Planar graphs. Math Prof. Kindred - Lecture 16 Page 1

Connected Components of Underlying Graphs of Halving Lines

CS 2336 Discrete Mathematics

Theoretical Computer Science

Planar graphs. Chapter 8

1 Topological sweep. Topological Sweep

Polygon decomposition. Motivation: Art gallery problem

INTRODUCTION TO GRAPH THEORY. 1. Definitions

Chapter 8. Voronoi Diagrams. 8.1 Post Oce Problem

Discrete Mathematics I So Practice Sheet Solutions 1

MISCELLANEOUS SHAPES

Discrete Wiskunde II. Lecture 6: Planar Graphs

GEOMETRIC SEARCHING PART 1: POINT LOCATION

Trapezoidal decomposition:

Randomized incremental construction. Trapezoidal decomposition: Special sampling idea: Sample all except one item

CMSC 754 Computational Geometry 1

Lattice Polygon s and Pick s Theorem From Dana Paquin and Tom Davis 1 Warm-Up to Ponder

Tangencies between disjoint regions in the plane

Week 7 Convex Hulls in 3D

Computational Geometry: Lecture 5

Solutions to problem set 1

Computing intersections in a set of line segments: the Bentley-Ottmann algorithm

Optimal detection of intersections between convex polyhedra

Detecting intersections between convex polyhedra

Math 777 Graph Theory, Spring, 2006 Lecture Note 1 Planar graphs Week 1 Weak 2

Partitioning Orthogonal Polygons by Extension of All Edges Incident to Reflex Vertices: lower and upper bounds on the number of pieces

GEOMETRY R Unit 2: Angles and Parallel Lines

Notes for Recitation 9

January 10-12, NIT Surathkal Introduction to Graph and Geometric Algorithms

.(3, 2) Co-ordinate Geometry Co-ordinates. Every point has two co-ordinates. Plot the following points on the plane. A (4, 1) D (2, 5) G (6, 3)

2 A Plane Sweep Algorithm for Line Segment Intersection

Improved Bounds for Intersecting Triangles and Halving Planes

Ma/CS 6b Class 26: Art Galleries and Politicians

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Voronoi diagram and Delaunay triangulation

Face Width and Graph Embeddings of face-width 2 and 3

4 Linear Programming. Manufacturing with Molds

arxiv: v1 [math.gr] 2 Oct 2013

1 The range query problem

STRAIGHT LINE ORTHOGONAL DRAWINGS OF COMPLETE TERNERY TREES SPUR FINAL PAPER, SUMMER July 29, 2015

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality

CS 372: Computational Geometry Lecture 10 Linear Programming in Fixed Dimension

SAMPLING AND THE MOMENT TECHNIQUE. By Sveta Oksen

Simple Graph. General Graph

7. The Gauss-Bonnet theorem

Convex Hulls in Three Dimensions. Polyhedra

Convex Hulls in 3D. Definitions. Size of a Convex Hull in 3D. Collision detection: The smallest volume polyhedral that contains a set of points in 3D.

Figure 1: Two polygonal loops

Computational Geometry Exercise Duality

6.854J / J Advanced Algorithms Fall 2008

Notes in Computational Geometry Voronoi Diagrams

Midpoint and Distance Formulas

The following is a summary, hand-waving certain things which actually should be proven.

Motorcycle Graphs and Straight Skeletons

Art Gallery, Triangulation, and Voronoi Regions

2 Geometry Solutions

Ma/CS 6b Class 11: Kuratowski and Coloring

Matching and Planarity

CMSC 754 Computational Geometry 1

Computational Geometry

2. CONNECTIVITY Connectivity

Grids Geometry Computational Geometry

Lecture 6: Graph Properties

Undirected Network Summary

arxiv: v1 [math.gt] 11 May 2018

Discrete mathematics

1.8 Coordinate Geometry. Copyright Cengage Learning. All rights reserved.

Binary Space Partitions for Orthogonal Segments and Hyperrectangles Adrian Dumitrescu Joe Mitchell Micha Sharir

CMSC 425: Lecture 9 Geometric Data Structures for Games: Geometric Graphs Thursday, Feb 21, 2013

8.2 Paths and Cycles

I can position figures in the coordinate plane for use in coordinate proofs. I can prove geometric concepts by using coordinate proof.

The Touring Polygons Problem (TPP)

Trig Functions, Equations & Identities May a. [2 marks] Let. For what values of x does Markscheme (M1)

Some Open Problems in Graph Theory and Computational Geometry

Transcription:

Computational Geometry Chapter 9 Line Arrangements 1 Line Arrangements Applications On the Agenda 2 1

Complexity of a 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: 2 n n n Number of vertices (each pair of different lines 2 2 2 may intersect at most once). Number of edges n 2 (each line is cut into at most n pieces by at most n-1 1 other lines). Number of faces n 2 n 1 (by Euler s formula and 2 2 connecting all rays to a point at infinity). Equalities hold for lines in general position. (Show!) 3 Computing a 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? 4 2

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. 5 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. 6 3

Zone of a Line The zone of a line l in the arrangement A(L) is the set of faces of A(L) intersected by l. The complexity of a zone is the total complexity of all its faces: the total number of edges (or vertices) of these faces. 7 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 l. Assume without loss of generality that l 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.) l 2 l 3 l 1 l 4 8 l 4

Zone Complexity: Proof By induction on n. For n=1: Trivial. For n>1: Let l 1 be the rightmost line intersecting l (assume it s unique). By the induction hypothesis, the zone of l in A(L\{l 1 }) has at most 4(n-1) left bounding edges. When adding l 1, the number of such edges increases: One new edge on l 1. l 1 Two old edges split by l 1. v l 1 l Hence, the new zone complexity is at most 4(n-1)+3 < 4n. w 9 Zone Complexity: Proof (cont.) What happens if several (>2) lines intersect l in the rightmost intersection points (i.e., if l 1 is not unique)? Pick l 1 randomly out of these lines. By the induction hypothesis, the zone of l in A(L\{l 1 }) has at most 4(n-1) left bounding edges. When adding l 1, the number of such edges increases: Two new edges on l 1. Two old edges split by l 1. l 1 v l Hence, the new zone complexity is at most 4(n-1)+4 = 4n. w 10 5

Zone Complexity: Proof (cont.) And what happens if exactly 2 lines, l 1 and l 2, intersect l in the rightmost intersection points? Discard both lines. By the induction hypothesis, the zone of l in A(L\{l 1,l 2 }) has at most 4(n-2) left bounding edges. When adding l 1, the number of such edges increases by 3. When adding l 2, the number of such edges increases by 5. One new edge on l 1. Two old edges split by l 1. Two new edges on l 2. Three old edges split by l 2. (Two are seen; where is the third?) Hence, the new zone complexity is at most 4(n-2)+8 = 4n. 11 l 1 l 2 l Zone Complexity: Proof (cont.) And what if there are horizontal lines? If these lines are parallel to l, then just (imaginarily) rotate them; this will only increase the complexity of the zone of l. If there is a line l 0 identical to l, then the complexity of the zone of l is equal to that of the zone of l 0. If there are several lines identical to l, their multiplicity does not increase the complexity of the zone of l. 12 6

Constructing the Arrangement The time required to insert a line l i is linear in the complexity of its zone, which is linear in the number of the already existing lines. Therefore, the total t time is n 2 2 O( n ) ( O(log i) O( i) ) O( n ). i 1 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.) 13 Application 1: Minimum-Area Triangle Given a set of n points, determine the three points that form the triangle of minimum m 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, or, at least, determining what this area is, is the famous Heilbronn s triangle problem. 14 7

An (n 2 )-Time Algorithm Construct the arrangement of dual lines in (n 2 ) time. p j For each pair of points p and p i p i j (assume p i p j is the triangle base): y=ax+b Identify the vertex v in the dual y=ax+b arrangement, corresponding to the line through these points. Find the line of the arrangement that is vertically closest to v. Remember the best line so far. p Output point corresponding to the i * v=(a (a,b) best dual line. Questions: p k * (a,b ) 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 )? p j * 15 primary p k dual Application 2: Discrepancy Given a set S of n points in the unit square U=[0,1] 2. For a given line l, how many points lie below l? Let h be the halfplane below l. 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) S The halfplane discrepancy of S is (S) = sup h S (h) U l Observation: To compute (S), it suffices to consider halfplanes that pass through pairs of points. Naive algorithm (all pairs): (n 3 ) time. 16 8

Computing Discrepancy In the dual plane, this is equivalent to counting the number of dual lines above the dual point. p q q * p* S S* 17 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. 18 9

Levels of an Arrangement A point is at level k in an arrangement of n lines if L there are at most k-1 lines 1 above this point and at most n-k lines below this point. L 3 There are n levels in an arrangement of n lines. L A vertex can be on multiple 5 levels, depending on the number of lines passing through it. (Sometimes levels are counted from 0 instead of 1.) 19 An (n 2 )-Time Algorithm Construct the dual arrangement. For each line, compute the levels of all its vertices: 1. Compute the levels of the left infinite rays by sorting slopes. O(n log n) time. L 3 2. Traverse all the lines from left to right, incrementing L 5 or decrementing the level, depending on the direction (slope) of the crossing line. (n) time for each line. Total: (n 2 ) time. 4 5 4 3 2 20 3 10