Line Segment Intersection Computational Geometry, WS 2007/08 Lecture 3 – Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.

Slides:



Advertisements
Similar presentations
Order-k Voronoi Diagram in the Plane
Advertisements

Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Two Segments Intersect?
Spatial Information Systems (SIS) COMP Terrain modeling and geometric problems (part 2)
Computational Geometry
Line Segment Intersection Computational Geometry, WS 2007/08 Lecture 3 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut.
Introduction to Computational Geometry Computational Geometry, WS 2007/08 Lecture 1 – Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut.
Brute-Force Triangulation
Computational Geometry, WS 2007/08 Lecture 17 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften.
2/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries II Carola Wenk.
Lecture 3: Polygon Triangulation Computational Geometry Prof. Dr. Th. Ottmann Triangulation (Naive)
9/12/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries II Carola Wenk.
Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Klee’s Measure Problem Computational Geometry, WS 2007/08 Group Work Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen, Institut.
The Half-Edge Data Structure Computational Geometry, WS 2007/08 Lecture 3, Part III Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen,
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part IV Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 2 Line Segment Intersection Computational Geometry Prof.Dr.Th.Ottmann 1 Line Segment Intersection Motivation: Computing the overlay of several.
The Half-Edge Data Structure
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.
Lecture 3: Polygon Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 l-Monotone Convex polygons are easy to triangulate. Unfortunately the partition.
The Lower Envelope: The Pointwise Minimum of a Set of Functions Computational Geometry, WS 2006/07 Lecture 4 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen,
Lecture 3: Polygon Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Polygon Triangulation Motivation: Guarding art galleries Art gallery theorem.
Lecture 12 : Special Case of Hidden-Line-Elimination Computational Geometry Prof. Dr. Th. Ottmann 1 Special Cases of the Hidden Line Elimination Problem.
Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional.
Computational Geometry, WS 2007/08 Lecture 15 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften.
Lecture 5: Orthogonal Range Searching Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees.
Special Cases of the Hidden Line Elimination Problem Computational Geometry, WS 2007/08 Lecture 16 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen,
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.
Introduction to Computational Geometry Computational Geometry, WS 2007/08 Lecture 1 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Persistent Data Structures Computational Geometry, WS 2007/08 Lecture 12 Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen, Institut.
Linear Programming Computational Geometry, WS 2007/08 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Hidden-Line Elimination Computational Geometry, WS 2006/07 Lecture 14 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Linear Programming Computational Geometry, WS 2007/08 Lecture 7, Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Closest Pair of Points Computational Geometry, WS 2006/07 Lecture 9, Part II Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen,
Polygon Triangulation Computational Geometry, WS 2007/08 Lecture 9 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 - Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
IP-Lookup and Packet Classification Computational Geometry, WS 2007/08 Lecture 14 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 11 : More Geometric Data Structures Computational Geometry Prof. Dr. Th. Ottmann 1 Geometric Data Structures 1.Rectangle Intersection 2.Segment.
Polygon Triangulation Computational Geometry, WS 2006/07 Lecture 8, Part 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 11 Instructor: Paul Beame.
Lecture 2 Line Segment Intersection Computational Geometry Prof.Dr.Th.Ottmann 1 Line Segment Intersection Motivation: Computing the overlay of several.
Art Gallery Theorem Computational Geometry, WS 2006/07 Lecture 8, Part 1 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Duality and Arrangements Computational Geometry, WS 2006/07 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Lecture 2 Line Segment Intersection Computational Geometry Prof.Dr.Th.Ottmann 1 Line Segment Intersection Motivation: Computing the overlay of several.
1 Geometric Intersection Determining if there are intersections between graphical objects Finding all intersecting pairs Brute Force Algorithm Plane Sweep.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
CMPS 3130/6130 Computational Geometry Spring 2015
Computational Geometry: Intersection Search Joseph S. B. Mitchell Stony Brook University.
1/20/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Plane Sweep Algorithms I Carola Wenk.
CMPS 3130/6130 Computational Geometry Spring 2017
Computational Geometry Capter:1-2.1
Greedy Algorithms / Dijkstra’s Algorithm Yin Tat Lee
Dr.Surasak Mungsing CSE 221/ICT221 Analysis and Design of Algorithms Lecture 05-2: Analysis of time Complexity of Priority.
Presentation transcript:

Line Segment Intersection Computational Geometry, WS 2007/08 Lecture 3 – Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann2 Line Segment Intersection Motivation: Computing the overlay of several maps The Sweep-Line-Paradigm: A visibility problem Line Segment Intersection Overlay of planar subdivisions

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann3 Maps

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann4 Motivation Thematic map overlay in Geographical Information Systems road riveroverlaid maps 1. Thematic overlays provide important information. 2. Roads and rivers can both be regarded as networks of line segments.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann5 Problem definition Input: Set S = {s 1...,s n } of n closed line segments s i ={(x i, y i ), (x´ i, y´ i )} Output: All intersection points among the segments in S The intersection of two lines can be computed in time O(1).

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann6 Naive algorithm Goal: Output sensitive algorithm!

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann7 Input: Set of n vertcal line segments Output: All pairs of mutually visible segments A B C D E F G H Naive method : Observation: Two line segments s and s´ are mutually visible iff there is a y such that s and s´are immediate neighbors at y. The Sweep-Line-Paradigm: A visibility problem

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann8 Sweep line algorithm Q is set of the start and end points of the segments in decreasing y-order T is set of the active line segments A B C D E F G H QT.H H.D D!H.A A!DH.F AD!F!H.C A!C!DFH.E ACD!E!FH D.AC!EFH.G ACEF!G!H.B A!B!CEFGH F.ABCE!GH C.AB!EGH :: : : :

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann9 Algorithm Initialise Q as set of start and endpoints of segments in decreasing y-order; Initialise the set of active segments T =  ; while Q   do p = Q.Min; remove p from Q; if (p start point of segment s) T = T  {s}; determine neighbors s´ and s´´ of s; report (s, s´) and (s, s´´) as visible pairs else /* p is end point of segment s */ determine neighbors s´ and s´´ of s; report (s´, s´´) as visible pair; T = T - {s}

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann10 Sweep Line principle Imaginary line moves in y direction. Each point is an event. Input: A set of (iso-oriented objects) Output: Problem-dependent Q: object and problem-dependant queue of event points T: ordered set of the active objects /* status structure */ while Q   do select next event point from Q and remove it from Q; update(T); report problem-dependent result

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann11 Data structures: event queue Operations to be supported: Initialisation, min, deletion of points, Possible implementation: Balanced search tree of points with order p < q  p y < q y or (p y = q y and p x < q x ) Initialisation takes time O(m log m) for m items. Deletion takes time O(log m) with m items in queue. In most cases a priority queue supporting insertion and min- removal (eg. heap, O(m), O(log m), for initialisation and min- removal) is enough.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann12 Data structures: status structure m l i j k Possible implementation: Balanced search tree, O(log n) time Node values (keys) are used for routing k m i i j l l jk Operations to be supported: Insertion, deletion, searching for neighbors

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann13 Initialise Q as set of start and endpoints of segments in decreasing y-order; Initialise the set of active segments T =  ; while Q   do p = Q.Min; remove p from Q; if (p start point of segment s) T = T  {s}; determine neighbors s´ and s´´ of s; report (s, s´) and (s, s´´) as visible pairs else /* p is end point of segment s */ determine neighbors s´ and s´´ of s; report (s´, s´´) as visible pair; T = T - {s} Runtime analysis

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann14 Summary Theorem: For a given set of n vertical line segments all k pairs of mutually visible segments can be reported in time O(n log n). Note: k is O(n)