Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness)

Slides:



Advertisements
Similar presentations
Planar Subdivision Induced by planar embedding of a graph. Connected if the underlying graph is. edge vertex hole in f face f disconnected subdivision.
Advertisements

Planar straight line graph A planar straight line graph (PSLG) is a planar embedding of a planar graph G = (V, E) with: 1.each vertex v  V mapped to a.
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Convex drawing chapter 5 Ingeborg Groeneweg. Summery What is convex drawing What is convex drawing Some definitions Some definitions Testing convexity.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Brute-Force Triangulation
2/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries II Carola Wenk.
9/12/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries II Carola Wenk.
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.
Overlay of Two Subdivisions
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
The Half-Edge Data Structure Computational Geometry, WS 2007/08 Lecture 3, Part III Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen,
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
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
By Dor Lahav. Overview Straight Skeletons Convex Polygons Constrained Voronoi diagrams and Delauney triangulations.
Duality and Arrangements Computational Geometry, WS 2007/08 Lecture 6 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 4: 3D Convex Hulls Friday, 2/9/07.
Lecture 8 : Arrangements and Duality Computational Geometry Prof. Dr. Th. Ottmann 1 Duality and Arrangements Duality between lines and points Computing.
Computing the Delaunay Triangulation By Nacha Chavez Math 870 Computational Geometry; Ch.9; de Berg, van Kreveld, Overmars, Schwarzkopf By Nacha Chavez.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 4: 3D Convex Hulls Monday, 2/23/04.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 3 Chapter 4: 3D Convex Hulls Chapter.
Complex Model Construction Mortenson Chapter 11 Geometric Modeling
Duality and Arrangements Computational Geometry, WS 2006/07 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Curve Curve: The image of a continous map from [0,1] to R 2. Polygonal curve: A curve composed of finitely many line segments. Polygonal u,v-curve: A polygonal.
The Art Gallery Problem
Brute-Force Triangulation
The Art Gallery Problem
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.
Subdivision of Edge In a graph G, subdivision of an edge uv is the operation of replacing uv with a path u,w,v through a new vertex w.
Planar Graphs: Euler's Formula and Coloring Graphs & Algorithms Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
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.
Planar Subdivision Induced by planar embedding of a graph. Connected if the underlying graph is. edge vertex disconnected subdivision Complexity = #vertices.
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Arrangements and Duality Sanjay Sthapit Comp290 10/6/98.
Planar Graphs Graph Coloring
Arrangements and Duality Motivation: Ray-Tracing Fall 2001, Lecture 9 Presented by Darius Jazayeri 10/4/01.
Computational Geometry: Intersection Search Joseph S. B. Mitchell Stony Brook University.
1/29/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries Carola Wenk.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
Great Theoretical Ideas in Computer Science for Some.
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.
COMPSCI 102 Introduction to Discrete Mathematics.
Planar Graphs prepared and Instructed by Arie Girshson Semester B, 2014 June 2014Planar Graphs1.
Polygon Triangulation
CMPS 3130/6130 Computational Geometry Spring 2017
Great Theoretical Ideas In Computer Science
Great Theoretical Ideas In Computer Science
The Art Gallery Problem
Computational Geometry 2
CMPS 3130/6130 Computational Geometry Spring 2017
Computational Geometry Capter:1-2.1
The Art Gallery Problem
Polygon Triangulation
I. The Problem of Molding
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Computational Geometry
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 8th ed., by Kenneth H.
Discrete Mathematics for Computer Science
Overlay of Two Subdivisions
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Presentation transcript:

Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness)

Robert Pless, CS 546: Computational Geometry Lecture #3 This time: Planar Subdivisions Eventually, get to problems such as intersection of planar subdivisions, and show that these algorithms are easier (more efficient) than general segment intersection. Some slides in this lecture come from Carola Wenk, Univ. Texas, San Antonio

Robert Pless, CS 546: Computational Geometry Lecture #3 Don’t usually have “n segments” Common inputs represent something more interesting than n segments… perhaps a “subdivision” of the plane into regions. Today we won’t look at algorithms, rather we will define “planar subdivisions”, and look at: –A data structure to represent them, and –Relationships between edges, vertices and faces.

Robert Pless, CS 546: Computational Geometry Lecture #3 Planar subdivisions include: –Voronoi Diagrams –Polygon/Delaunay triangulations Representation to reason about and manipulate the subdivision should, at least: –be able to list the edges that bound each face of the subdivision in cyclic order, and –be able to list the edges that surround each vertex.

Robert Pless, CS 546: Computational Geometry Lecture #3 Planar Graph: –Graph which can be drawn with edges intersecting only at endpoints. Planar Straight Line Graph (PSLG): –Embedded on the plane, and edges are all straight. PSLG subdivides the plane into different types of regions. –0 dimensional vertices, –1 dimensional edges, and –2 dimensional faces. These regions are disjoint, –each edge is topologically open (it does not include it endpoints) –each face is open (it does not include its boundary). Fun Facts: –There is always one unbounded face, that stretches to infinity. –The underlying planar graph need not be a connected graph. faces may contain holes (and these holes may contain other holes. –Can completely specify the embedding by giving the connectivity of the graph, and the cyclic order of edges around each vertex.

Robert Pless, CS 546: Computational Geometry Lecture #3 Counting elements of a PSLG Variables: –V number of vertices, –E number of edgs, –F number of faces Euler's formula: V - E + F = 2. If graph is disconnected, with C connected components: V - E + F - C = 1: Example: –V = 13 –E = 12 –F = 4 –C = 4. Can add new vertex and new edge without adding a face Adding a new edge between existing vertices adds a face (or connects two components.

Robert Pless, CS 546: Computational Geometry Lecture #3 Euler and Complexity Theorem: A planar graph with V vertices has at most 3(V - 2) edges and at most 2(V - 2) faces. Idea: add extra edges and faces to make resulting graph easier to reason about. Proof: First, make new graph G(V,E’) Triangulate the graph. For each face that is bounded by more than three edges (or whose boundary is not connected) add new edge. Repeat until every face in the graph is bounded by exactly three edges. New graph has E’ edges and F’ faces. E' >= E and F' >= F

Robert Pless, CS 546: Computational Geometry Lecture #3 Resulting graph G(V,E’) has: –one connected component, –every face is bounded by exactly three edges, –each edge has a different face on either side of it. Every face has 3 edges –So the number of “face bounding edges” is 3F’ Every edge is part of 2 faces. –So number of “face bounding edges” is 2E’ So 3F’ = 2E’, or… E’ = 3F’/2 Euler's formula –Using: E' = 3F’/2 we have V + E' - F' = 2, V - 3F'/2 + F' = 2, F’ = 2(V-2) F <= F' = 2(V - 2); F <= 2(V-2) –Using: F' = 2E' / 3 we have V + E' - F' = 2, V - E' + 2E'/3 = 2, so E <= E' = 3(V - 2): E <= 3(V - 2)

Robert Pless, CS 546: Computational Geometry Lecture #3 “A planar graph with V vertices has at most 3(V - 2) edges and at most 2(V - 2) faces” Why do we care? For planar graph, doing something a constant number of times for each edge, or a constant number of times for each face remains O(n).

Robert Pless, CS 546: Computational Geometry Lecture #3 Enough Theory… We require a convenient and efficient way to represent a planar subdivision. Components in the planar subdivision: –Vertices, edges, faces Data structure focus on preserving adjacency relationships between components, (but each could have a pointer to additional information).

Robert Pless, CS 546: Computational Geometry Lecture #3 Crazy Names Winged Edge Data Structure. Quad Edge Data Structure. Our focus on “Doubly Connected Edge List”. [ DCEL: doubly connected edge list ] f0f0f0f0 f1f1f1f1 e e 4,0 v1v1v1v1 v0v0v0v0 - represent edge as 2 halves - lists: vertex, face, edge/twin -facilitates face traversal e’s twin v2v2v2v2 v7v7v7v7 v6v6v6v6 v5v5v5v5 v3v3v3v3 v4v4v4v4 e 0,1 Every edge e is struct: –e.org, e.dest: pointer to origin and dest vertices. –e.face is face on left of edge –e.twin is the same edge, oriented the other direction. –e.next is next edge along the face

Robert Pless, CS 546: Computational Geometry Lecture #3 Crazy Names f0f0 f1f1 e e 4,0 v1v1 v0v0 Pop quiz. -How to enumerate all edges of a face? -How to enumerate all edges incident on a node? e’s twin v2v2 v7v7 v6v6 v5v5 v3v3 v4v4 e 0,1 Every edge e is struct: –e.org, e.dest: pointer to origin and dest vertices. –e.face is face on left of edge –e.twin is the same edge, oriented the other direction. Each Face has a pointer to one edge of that face. Each vertex has pointer to one edge away from that vertex.

Robert Pless, CS 546: Computational Geometry Lecture #3 Given two planar subdivisions, S 1 and S 2, and we want to compute their overlay. Overlay is a subdivision whose vertices are the union of the vertices + intersection of edges in S 1 and S 2. S 1 and S 2 are planar, so all intersections are one edge from S 1 and one edge from S 2 If each subdivision is represented using a DCEL, can we adapt the plane sweep algorithm update the DCEL (rather than just report intersections?) First, build the edge and vertex records for the new subdivision. Then fix up the faces. Faces are harder because we don’t know what faces there are without looking ``into the future'‘.

Robert Pless, CS 546: Computational Geometry Lecture #3 b1 b1.twin a1 a1.twin Given two intersecting segments, select edge pointers to a 1 and b 1 that go “forward” across the sweep line. V Create: V Important case is when sweep processes an intersection event.

Robert Pless, CS 546: Computational Geometry Lecture #3 a1 a1.twin Given two intersecting segments, select edge pointers to a 1 and b 1 that go “forward” across the sweep line. V Create: V Split edge a1 at V to create a1 and a2: a2.dest = a1.dest a2.org = V a1.dest = V a1.twin.org = V a2.twin.dest = V a2.twin.org = a2.dest a2.twin a2 Every edge e is struct: –e.org, e.dest: pointer to origin and dest vertices. –e.face is face on left of edge –e.twin is the same edge, oriented the other direction. –e.next is next edge along the face

Robert Pless, CS 546: Computational Geometry Lecture #3 b1 b1.twin a1 a1.twin Given two intersecting segments, select edge pointers to a 1 and b 1 that go “forward” across the sweep line. V Create: V Split edge a1 at V to create a1 and a2: a2.dest = a1.dest a2.org = V a1.dest = V a1.twin.org = V a2.twin.dest = V a2.twin.org = a2.dest a2.twin a2 b2 b2.twin Every edge e is struct: –e.org, e.dest: pointer to origin and dest vertices. –e.face is face on left of edge –e.twin is the same edge, oriented the other direction. –e.next is next edge along the face

Robert Pless, CS 546: Computational Geometry Lecture #3 b1 b1.twin a1 a1.twin V Fix up the “next” pointers. A1.next = ? a2.twin a2 b2 b2.twin Every edge e is struct: –e.org, e.dest: pointer to origin and dest vertices. –e.face is face on left of edge –e.twin is the same edge, oriented the other direction. –e.next is next edge along the face

Robert Pless, CS 546: Computational Geometry Lecture #3 Hints. –If line is always left turning, and the initial point “p” is (and always has been) on the left of the current segment, then there is no possible intersection. –Keep track of “ranges of vulnerability” Inside vulnerability Outside vulnerability –Calculate work in terms of how often each edge is tested, not how much work is done when looking at next segment. p0p0 Inside vulnerable Outside vulnerable

Robert Pless, CS 546: Computational Geometry Lecture #3 Hints 2 –Can have a circular sweep line. –Need to define what the sweep line keeps and what are events. –Need to show how to process each event. Do this processing lead to a new event?

Robert Pless, CS 546: Computational Geometry Lecture #3 Next class Read Chapter 3! Art gallery theorem.