Fundamentals of computational geometry M. Ramanathan STTP CAD 2011.

Slides:



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

CSE 4101/5101 Prof. Andy Mirzaian. References: Lecture Note 8 [LN8]LN8 [CLRS] chapter 33 Lecture Note 8 [LN8]LN8 [CLRS] chapter 33 Applications:  Proximity.
Problems in curves and surfaces M. Ramanathan Problems in curves and surfaces.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
Proximity graphs: reconstruction of curves and surfaces
Computational Geometry II Brian Chen Rice University Computer Science.
C o m p u t i n g C O N V E X H U L L S by Kok Lim Low 10 Nov 1998 COMP Presentation.
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
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Ruslana Mys Delaunay Triangulation Delaunay Triangulation (DT)  Introduction  Delaunay-Voronoi based method  Algorithms to compute the convex hull 
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.
Computational Geometry
Convex Hull Problem Presented By Erion Lin. Outline Convex Hull Problem Voronoi Diagram Fermat Point.
The Maths of Pylons, Art Galleries and Prisons Under the Spotlight John D. Barrow.
Feb Polygon Triangulation Shmuel Wimer Bar Ilan Univ., School of Engineering.
Algorithms and Data Structures Lecture 13. Agenda: Plane Geometry: algorithms on polygons - Verification if point belongs to a polygon - Convex hull.
What does that mean? To get the taste we will just look only at some sample problems... [Adapted from S.Suri]
1st Meeting Industrial Geometry Computational Geometry ---- Some Basic Structures 1st IG-Meeting.
Voronoi Diagram Presenter: GI1 11號 蔡逸凡
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
Steps in DP: Step 1 Think what decision is the “last piece in the puzzle” –Where to place the outermost parentheses in a matrix chain multiplication (A.
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.
3. Delaunay triangulation
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 Polygon Triangulation Motivation: Guarding art galleries Art gallery theorem.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Wednesday,
Voronoi Diagrams Computational Geometry, WS 2006/07 Lecture 10 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.
Lecture 3: Polygon Triangulation Computational Geometry Prof. Dr. Th. Ottmann Polygon Triangulation Motivation: Guarding art galleries Art gallery theorem.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Delaunay Triangulation.
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.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 2 Chapter 2: Polygon Partitioning.
The Art Gallery Problem
The Art Gallery Problem
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
Delaunay Triangulations Presented by Glenn Eguchi Computational Geometry October 11, 2001.
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
Convex Hull. What is the Convex Hull? Imagine a set of points on a board with a nail hammered into each point. Now stretch a rubber band over all the.
5 -1 Chapter 5 The Divide-and-Conquer Strategy A simple example finding the maximum of a set S of n numbers.
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.
CENG 789 – Digital Geometry Processing 02- Polygons and Triangulations Asst. Prof. Yusuf Sahillioğlu Computer Eng. Dept,, Turkey.
Fundamental Data Structures and Algorithms Margaret Reid-Miller 27 April 2004 Computational Geometry.
Order-k Voronoi diagram in the plane Dominique Schmitt Université de Haute-Alsace.
2/19/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Voronoi Diagrams Carola Wenk Based on: Computational Geometry:
Computational Geometry Polygon Triangulation and The Art Gallery Problem Joachim Gudmundsson NICTA, Sydney.
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.
COMPUTATIONAL GEOMETRY AND MATRIX MULTIPLICATION Mohammed Zeeshan Farooqui Minhaj Uddin.
Contest Algorithms January 2016 Triangulation & the Art Gallery Problem Contest Algorithms1.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
CENG 789 – Digital Geometry Processing 03- Point Sets Asst. Prof. Yusuf Sahillioğlu Computer Eng. Dept,, Turkey.
Polygon Triangulation
CMPS 3130/6130 Computational Geometry Spring 2017
CMPS 3130/6130 Computational Geometry Spring 2017
3. Polygon Triangulation
Image Morphing © Zooface Many slides from Alexei Efros, Berkeley.
Convex Hull.
The Art Gallery Problem
Computational Geometry (35/33)
The Art Gallery Problem
Polygon Triangulation
Convex Sets & Concave Sets
Presentation transcript:

Fundamentals of computational geometry M. Ramanathan STTP CAD 2011

camera How many cameras are needed to guard a gallery and How should they be placed? Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometrySTTP CAD 2011

Model the art gallery as a region bounded by some simple polygon (no self-crossing). Regions with holes are not allowed. convex polygon one camera an arbitrary n-gon (n vertices) Bad news: finding the minimum number of cameras for a given polygon is NP-hard (exponential time). Fundamentals of computational geometrySTTP CAD 2011

There are no holes in a simple polygon. Simple polygon Nonsimple polygons Fundamentals of computational geometrySTTP CAD 2011

How many stationary guards are needed to guard a room? Guards are located at fixed points and have 2π range of visibility. A guard cannot see through walls. A set of guards covers a polygon if every point of the polygon is visible to some guard. Problem: Find the max over all n-vertex polygons of the min number of guards needed to cover the polygons. Fundamentals of computational geometrySTTP CAD 2011

This 12-vertex polygon needs 4 guards to cover it This 12-vertex polygon needs 3 guards to cover it. Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometrySTTP CAD 2011

First Proof of sufficiency is due to Chvátal in 1975 (very complex). We’ll present a simple, four-step proof by Fisk from Necessity follows from the prong’s example. 1.Triangulation of polygon. 2.3-coloring of triangulation graph. 3.Placing guards at a single color guarantees cover. 4.“Pigeon-hole principle”: placing n objects in k holes, one at least contains no more than └ n/k ┘ objects. Fundamentals of computational geometrySTTP CAD 2011

A diagonal of a polygon is a line segment connecting two visible vertices. Triangulation: the partition of a polygon by maximal non crossing diagonals into triangles (not unique!). Fundamentals of computational geometrySTTP CAD 2011

n=14 Interesting, both triangulations have same number of diagonals! Notice that number of diagonals equals n-3. Fundamentals of computational geometrySTTP CAD 2011

G(V,E) is a graph defined on a triangulated polygon P. E consists of P’s edges and the triangulation diagonals, while V consists of P’s vertices. k-coloring is an assignment of k colors to the vertices of V such that no adjacent vertices have same color. We’ll show later that a triangulation graph is 3-colorable. Fundamentals of computational geometrySTTP CAD 2011

The coloring of a triangulation graph is unique! Assigning color to first vertex enforces the rest color assignments. Fundamentals of computational geometrySTTP CAD 2011

It is sufficient to place guards at one color only (say red). This follows since every triangle must have 3 distinct colors at its corners, hence one must be red. Therefore every triangle is covered. But the triangles cover the entire polygon P. Pigeon-hole principle: There must be one color whose number of assigned vertices doesn’t exceed └ n/3 ┘. Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometry An example of a polyhedron with interior points not visible from any vertex. STTP CAD 2011

 Schönhardt polyhedron is the smallest non-convex polyhedron which cannot be triangulated into tetrahedra without adding new vertices.non-convex polyhedrontriangulatedtetrahedra Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometrySTTP CAD 2011

Area of polygons can be found by triangulation and calculation of triangles areas. We’d like to obtain a closed-form formula, independent of triangulation. Fundamentals of computational geometrySTTP CAD 2011

A(P) expression depends on triangulation. We’ll consider first quadrilaterals and show its area is independent of triangulation. Fundamentals of computational geometrySTTP CAD 2011

Diagonal related terms are canceled out! Fundamentals of computational geometrySTTP CAD 2011

What happens for non-convex quadrilateral ? v2v2 v3v3 v1v1 v0v0 Fundamentals of computational geometrySTTP CAD 2011

We’d like to obtain the area of a general simple polygon in terms of its vertices only. Fundamentals of computational geometrySTTP CAD 2011

Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Fundamentals of computational geometrySTTP CAD 2011

 A set S is convex if x  S and y  S implies the segment xy  S x y Fundamentals of computational geometrySTTP CAD 2011

 Convex Hull of a finite set of points S in the plane is the smallest convex polygon P that encloses S which means that there is no other polygon P ’ such that S  P’  P  Intersection of all convex sets containing the points in S Fundamentals of computational geometrySTTP CAD 2011

 The convex hull of a set of points S in the plane is the union of all the triangles determined by points in S  Informal definition: Convex hull of a set of points in plane is the shape taken by a rubber band stretched around the nails pounded into the plane at each point  Now we define the convex hull problem: - The problem is to construct the boundary of a convex hull in two dimensions given a finite set S of n points - Four outputs can be distinguished for the above problem: 1. all the points on the hull, in arbitrary order; 2. the extreme points, in arbitrary order; 3. all the points on the hull, in boundary traversal order; 4. the extreme points, in boundary traversal order; Fundamentals of computational geometrySTTP CAD 2011

 The extreme points of a set S of points in the plane are the vertices of the convex hull at which the interior angle is less than π  Also a point is extreme iff there exists a line through that point that other wise does not touch the convex hull Fundamentals of computational geometrySTTP CAD 2011

A] Using Non Extreme Points  Identifying non extreme points implies identifying extreme points  A point is non extreme iff it is inside some (closed) triangle whose vertices are the points of the set and is not itself a corner of that triangle. Thus given a triangle:  If a point is interior to triangle it is non extreme  Corners of the triangle might be extreme Thus as the output we will get the extreme points in some arbitrary order. Fundamentals of computational geometrySTTP CAD 2011

for each i do for each j ≠ i do for each k ≠ i ≠ j do for each l ≠ k ≠ i ≠ j do if p l  Δ(p i,p j, p k ) then p l is nonextreme There are four nested loops in this algorithm Hence the order is O(n 4 ) For each of the n 3 triangles, the test for extremeness costs n It is important to find a faster algorithm Fundamentals of computational geometrySTTP CAD 2011

 An edge is extreme if every point of S is on or to one side of the line determined by the edge  If we treat the edge as directed and let the left side of edge be inside then – the directed edge is not extreme if there is some point that is not left of it or on it  The output of this algorithm will be all the points on the convex hull in arbitrary order Fundamentals of computational geometrySTTP CAD 2011

for each i do for each j ≠ i do for each k ≠ i ≠ j do if p k is not left or on (p i,p j ) then (p i,p j ) is not extreme There are three nested loops in this algorithm Hence the order is O(n 3 ) For each of the n 2 pair of points, the test for extremeness costs n The vertices that are extreme can now be found Fundamentals of computational geometrySTTP CAD 2011

 A minor variation of Extreme Edge algorithm can accelerate it by factor n as well as output the points in order  The idea is to use one extreme edge as an anchor for finding the next  Suppose the algorithm found an extreme edge whose unlinked endpoint is x θ y x e For each y of set S we compute the angle θ The point that yields the smallest θ must determine an extreme edge The output of this algorithm is all the points on the hull in boundary traversal order Fundamentals of computational geometrySTTP CAD 2011

Idea: Think of wrapping a gift. Put the paper in contact with the gift and continue to wrap around from one surface to the next until you get all the way around. Fundamentals of computational geometrySTTP CAD 2011

Find the lowest point (smallest y coordinate) Let i 0 be its index, and set i ← i 0 repeat for each j ≠ i do compute counterclockwise angle θ from previous hull edge Let k be the index of the point with the smallest θ Output (p i,p k ) as a hull edge i ← k until i = i 0 We use the lowest point as the anchor The order is O(n 2 ) The cost is O(n) for each hull edge The point set is wrapped by a string that bends the that bends with minimum angle from previous to next hull edge Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p 11 p 12 p 10 p9p9 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p 11 p 12 p 10 p9p9 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p 11 p 12 p 10 p9p9 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p 11 p 12 p 10 p9p9 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p 11 p 12 p 10 p9p9 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p 11 p 12 p 10 p9p9 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p 11 p 12 p 10 p9p9 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

p0p0 p1p1 p3p3 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 p 10 Fundamentals of computational geometrySTTP CAD 2011

 Algorithm:  Find a point with a median x coordinate (time: O( n ))  Compute the convex hull of each half (recursive execution)  Combine the two convex hulls by finding common tangents. Can be done in O( n ) Complexity: O(nlogn) Fundamentals of computational geometrySTTP CAD 2011

Voronoi Diagram Fundamentals of computational geometrySTTP CAD 2011

P  A set of n distinct points in the plane. VD(P)  a subdivision of the plane into n cells such that  each cell contains exactly one site,  if a point q lies in a cell containing p i then d(q, p i ) < d(q, p j ) for all p i  P, j  i. In other words, given a set P of points in 2D, VD(P) is a partition of the plane into n convex regions {R 1, R 2, …, R n }, each (R i ) containing exactly one member (p i ) in P such that for each point in R i, its nearest member in P is p i Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometry P1P2 B(P1,P2) P1 P2 P3 B(P1,P3) B(P1,P2) B(P2,P3) Remember that VD is not defined for just points but for any set e.g. curves, surfaces etc. Moreover, the definition is applicable for any dimension. STTP CAD 2011

Each vertex (corner) of VD(P) has degree 3 The circle through the three points defines a vertex of the Voronoi diagram, and it does not contain any other point The locus of the center of a largest empty circles passing through only a pair of points p i, p j  P defines an edge The locus of the center of largest empty circles passing through only one points in P defines a cell The Voronoi region of a point is unbounded if and only if the point is a vertex of the convex hull of the point set. Assumption: No 4 points are co- circular. Fundamentals of computational geometrySTTP CAD 2011

Search for nearest neighbour Input: A fixed (static) set P of n points in the plane, and a query point p Output: Nearest neighbour of p in P Solution Construct the Voronoi diagram for P in time O(n log n) Solve the point location problem in O(log n) time. Fundamentals of computational geometrySTTP CAD 2011

Closest pair of points: Inspect all the edges list of Vor(P) and determine the minimally separated pair Largest empty circle: Each Voronoi vertex represents the center of a maximal empty circle. Find one having maximum radius. Computing Euclidian Minimum Spanning Tree: Compute dual of the Voronoi diagram, and apply Kruskal’s algorithm for computing the minimum Spanning tree. Fundamentals of computational geometrySTTP CAD 2011

V -1 (p i ) : the set of point of the plane farther from p i than from any other site Vor -1 (P) : the partition of the plane formed by the farthest point Voronoi regions, their edges, and vertices Fundamentals of computational geometrySTTP CAD 2011

V(p i,p j ) : the set of points of the plane closer to each of p i and p j than to any other site Property The order-2 Voronoi regions are convex Fundamentals of computational geometrySTTP CAD 2011

S  Set of points in 2D w(p)  weight attached with the point p  S d w (x,p) = d e (x,p)/w(p)  weighted distance of a point x from p  S Weighted Voronoi diagram WVD(S)  the subdivision of the plane such that region(p) = {x : d w (x,p) < d w (x,q)  q  S Thus, a point having large weight will cover bigger space Fundamentals of computational geometrySTTP CAD 2011

Voronoi edges: These are formed with line segments and/or parabolic arcs. Straight line edges are part of either the perpendicular bisector of two segment end-points or the angular bisector or two segments. Curve edges consist of points equidistant from a segment end- point and a segment’s interior. Fundamentals of computational geometrySTTP CAD 2011

Nearest site proximity partitioning of the plane Voronoi Diagram & Delaunay Triangulation Fundamentals of computational geometrySTTP CAD 2011

Voronoi Diagram & Delaunay Triangulation Fundamentals of computational geometrySTTP CAD 2011

Fundamentals of computational geometry The medial axis (MA), or skeleton of the set D, is defined as the locus of points inside which lie at the centers of all closed discs (or balls in 3-D) which are maximal in D. STTP CAD 2011

 Art-gallery problem for orthogonal polygon STTP CAD 2011Fundamentals of computational geometry  smallest circle that completely encloses a set of points  Relation between MA and VD for a) convex and b) non-convex polygons.

 art - gallery. ppt art - gallery. ppt  ppt ppt  in2.csie.ncu.edu.tw/~jrjiang/alg2008/ Voronoi. ppt  o-apps. ppt o-apps. ppt  andy /courses/4101/Slides/ CG - Intro. ppt x andy /courses/4101/Slides/ CG - Intro. ppt x  Joseph O’Rourke, Computational Geometry in C, Second edition, Cambridge university press, 1998  Joseph O’Rourke, Art Gallery theorems and algorithms, Oxford university press, 1987 STTP CAD 2011Fundamentals of computational geometry