Computational Geometry Piyush Kumar (Lecture 3: Convexity and Convex hulls) Welcome to CIS5930.

Slides:



Advertisements
Similar presentations
Two Segments Intersect?
Advertisements

Geometry Introduction
Polygon Triangulation
Spatial Information Systems (SIS) COMP Terrain modeling and geometric problems (part 2)
Computational Geometry
1/13/15CMPS 3130/6130: Computational Geometry1 CMPS 3130/6130: Computational Geometry Spring 2015 Convex Hulls Carola Wenk.
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.
Computing Convex Hulls CLRS 33.3
Convex Hull obstacle start end Convex Hull Convex Hull
CS16: Introduction to Data Structures & Algorithms
What is Computational Geometry? Study of Data Structures and Algorithms for Geometric Problems 1970 ’ s: Need for Computational Geometry Recognized; Progress.
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.
9/12/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries II Carola Wenk.
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Advanced Topics in Algorithms and Data Structures Lecture 7.1, page 1 An overview of lecture 7 An optimal parallel algorithm for the 2D convex hull problem,
1 Convex Hull in Two Dimensions Jyun-Ming Chen Refs: deBerg et al. (Chap. 1) O’Rourke (Chap. 3)
Computational Geometry
8/29/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Spring 2006 Convex Hulls Carola Wenk.
Computational Geometry
What does that mean? To get the taste we will just look only at some sample problems... [Adapted from S.Suri]
ADA: 16. CG Topics1 Objective o an examination of four important CG topics o just a taster of a very large research area Algorithm Design and Analysis.
Zoo-Keeper’s Problem An O(nlogn) algorithm for the zoo-keeper’s problem Sergei Bespamyatnikh Computational Geometry 24 (2003), pp th CGC Workshop.
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
November 4, Algorithms and Data Structures Lecture XIV Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Query Processing in Databases Dr. M. Gavrilova.  Introduction  I/O algorithms for large databases  Complex geometric operations in graphical querying.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Basic 3D collision detection We want to know if objects have touched Objects are considered to.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
17. Computational Geometry Chapter 7 Voronoi Diagrams.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Lecture 12 : Special Case of Hidden-Line-Elimination Computational Geometry Prof. Dr. Th. Ottmann 1 Special Cases of the Hidden Line Elimination Problem.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 3 Chapter 3: 2D Convex Hulls Friday,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Lecture 2 Chapter 2: Polygon Partitioning.
Computational Geometry Overview from Cormen, et al. Chapter 33
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,
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 2 Chapter 2: Polygon Partitioning.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
Lecture 2 Line Segment Intersection Computational Geometry Prof.Dr.Th.Ottmann 1 Line Segment Intersection Motivation: Computing the overlay of several.
Brute-Force Triangulation
Advanced Algorithm Design and Analysis (Lecture 9) SW5 fall 2004 Simonas Šaltenis E1-215b
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
1 Geometric Intersection Determining if there are intersections between graphical objects Finding all intersecting pairs Brute Force Algorithm Plane Sweep.
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.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
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.
1 Triangulation Supplemental From O’Rourke (Chs. 1&2) Fall 2005.
Computational Geometry Piyush Kumar (Lecture 10: Point Location) Welcome to CIS5930.
Fundamental Data Structures and Algorithms Klaus Sutner April 27, 2004 Computational Geometry.
Fundamental Data Structures and Algorithms Margaret Reid-Miller 27 April 2004 Computational Geometry.
CMPS 3120: Computational Geometry Spring 2013
CMPS 3130/6130 Computational Geometry Spring 2015
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
Computational Geometry: Intersection Search Joseph S. B. Mitchell Stony Brook University.
Computational Geometry 2D Convex Hulls
Lecture 15 Computational Geometry Geometry sweeping Geometric preliminaries Some basics geometry algorithms.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Polygon Triangulation
CMPS 3130/6130 Computational Geometry Spring 2017
3. Polygon Triangulation
CMPS 3130/6130 Computational Geometry Spring 2017
Convex Hull.
Query Processing in Databases Dr. M. Gavrilova
Algorithm design techniques Dr. M. Gavrilova
Computational Geometry Capter:1-2.1
Algorithms and Data Structures Lecture XIV
Computational Geometry
Convex Hull - most ubiquitous structure in computational geometry
Presentation transcript:

Computational Geometry Piyush Kumar (Lecture 3: Convexity and Convex hulls) Welcome to CIS5930

Convexity A set S is convex if for any pair of points p,q  S we have pq  S. p q non-convex q p convex

Convex Hulls : Equivalent definitions The intersection of all covex sets that contains P The intersection of all halfspaces that contains P. The union of all triangles determined by points in P. All convex combinations of points in P. P here is a set of input points

Convex Hulls Applications  Collision Detection  Fitting shapes  Shape Approximation  NN-Searching  Useful as a preprocessing step to many other algorithms in computational geometry.  The most ubiquitous structure in computational geometry.

Convex hulls p0p0 p1p1 p2p2 p4p4 p5p5 p6p6 p7p7 p8p8 p9p9 p 11 p 12 Extreme point Int angle < pi Extreme edge Supports the point set

Convex hull : Representation We will represent the convex hull by an enumeration of the vertices of the CH(P) in counterclockwise order. Naïve Algorithm to compute convex hulls can be implemented in O(n 3 ) in the plane (How?) Anyone with an O(n 2 ) algorithm?

Convex hull has a lower bound equivalent to sorting has many similar algorithms to sorting. We will see today  Graham Scan  Incremental (one point at a time)  D&C  Qhull ( similar to Quick Sort)  Jarvis March  Chan’s Algorithm

Assignments for next week Notes of Dr. Mount: Upto Page 20 D&C notes Assignment2.cpp and ch_2.cpp  Will talk more about it towards the end of class.

Today (Jan 16 th ) Chan’s Algorithm Line Segment intersection Homeworks / Projects

Line Segment Intersection Applications  VLSI (Intel uses it a lot)  Map Overlay  Clipping in Graphics  CSG Problem : Given a set of line segments in the plane, compute all the intersection point.

Line Segment Intersection Lower Bound from EU EU : Given a list of n numbers, are all these numbers unique? [Y / N]?  Lower bound is Ω(nlogn)  How do we use this fact to prove a Ω(nlogn) on Line segment intersection problem?  Does this imply a lower bound of Ω(nlogn+k)? Tell me a naïve algorithm to solve this problem.

Line Segment intersection Naïve O(n^2) Bentley Ottman O((n+k)log n) Edelsbrunner Chazeele 92  O(nlogn +k) : Supercomplicated O(nlogn) space Clarkson and Shor  O(nlogn +k) Randmized O(n) space Balaban : Deterministic O(nlogn + k) in O(n space. Solved a long open problem.

Segment Intersection How do we intersect two segments? How do we implement such a primitive? CG FAQ 1.3 Any special cases?

Today ( Jan 18 th ) Line Segment intersection Algorithm Project discussion Polygons

Line Segment intersection Sweep line paradigm  Main idea is to sweep the entire plane with a line and compute what we want to, as we sweep past the input. Event scheduling and updates  Carefully schedule the computation so that it does not take too much time to compute the output.

Line Segment Intersection A Sorted sequence data structure  Insert  Delete  Successor/Predecessor  All in O(log n) X-structure (or the event queue) Y-structure (or the sweep line)

Plane Sweep Paradigm Initialization:  Add all segment endpoints to the X-structure or event queue (O(n log n)).  Sweep line status is empty. Algorithm proceeds by inserting and deleting discrete events from the queue until it is empty.

Useful lemma Given s1,s2 intersecting in p, there is a placement of the sweepline prior to this event such that s1,s2 are adjacent along the sweepline. Just before an intersection occurs, the two relevant segments are adjacent to each other in the sweep line status.

Plane Sweep Event A: Segment left endpoint  Insert segment in sweep line or the Y-structure.  Test for intersection to the right of the sweep line with the segments immediately above and below it. Insert intersection points (if found) into X-structure or event queue. Complexity: ? Worst case?

Plane Sweep – Algorithm Event B: Segment right endpoint  Delete segment from sweep line status.  Test for intersection to the right of the sweep line between the segments immediately above and below. (can you do any optimization for this case? ) Insert point (if found) into event queue. Complexity: ?

Plane Sweep – Algorithm Event C: Intersection point  Report the point.  Swap the two line relevant segments in the sweep line status.  For the new upper segment – test it against its predecessor for an intersection. Insert point (if found) into event queue.  Similar for new lower segment (with successor). Complexity: O(klogn)

The Simplified Algorithm Construct the X-structure scan thru the X-structure (or the event queue) from left to right processing:  Segment Left endpoint  Segment right endpoint  Intersection points

Polygons Definition of a simple polygon Point containment in simple polygon Area of a simple polygon Triangulation of a simple polygon Convex hull of a simple polygon Fast preprocessing of a convex polygon to do in/out queries.