Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

Computational Geometry - Part II Mohammed Nadeem Ahmed Raghavendra Kyatham.
2/9/06CS 3343 Analysis of Algorithms1 Convex Hull  Given a set of pins on a pinboard  And a rubber band around them  How does the rubber band look when.
Jarvis March Graham Scan Chan’s Algorithm
1/13/15CMPS 3130/6130: Computational Geometry1 CMPS 3130/6130: Computational Geometry Spring 2015 Convex Hulls Carola Wenk.
algorithms and data structures
Brute-Force Triangulation
Computing Convex Hulls CLRS 33.3
Convex Hull obstacle start end Convex Hull Convex Hull
CS16: Introduction to Data Structures & Algorithms
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.
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Convex Hulls May Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
Classes of Polygons Planar polygons Non-planar polygons Simple
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,
Convex Sets & Concave Sets A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R.
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 for the Tablet PC
Informal Definition : Let S is set of nails sticking out from a board. the convex hull can be visualized as the shape formed by a tight rubber band that.
1 Today’s Material Computational Geometry Problems –Closest Pair Problem –Convex Hull Jarvis’s March, Graham’s scan –Farthest Point Problem.
Algorithms and Data Structures Lecture 13. Agenda: Plane Geometry: algorithms on polygons - Verification if point belongs to a polygon - Convex hull.
5/17/2015 1:32 AMConvex Hull1 obstacle start end.
What does that mean? To get the taste we will just look only at some sample problems... [Adapted from S.Suri]
November 4, Algorithms and Data Structures Lecture XIV Simonas Šaltenis Nykredit Center for Database Research Aalborg University
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
6/2/ :35 AMIncremental Convex Hull1 q w u e zt.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 3 Chapter 3: 2D Convex Hulls Friday,
Convex Hull Computation ● Applications of Convex Hull Computation ● Definitions ● Basic Math Functions ● Algorithms Algorithm Speed Discovered By Brute.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
Computational Geometry
Geometric Algorithms1 segment intersection orientation point inclusion simple closed path.
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.
Midpoint and Distance Formulas Goal 1 Find the Midpoint of a Segment Goal 2 Find the Distance Between Two Points on a Coordinate Plane 12.6.
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.
College of Computer and Information Science, Northeastern UniversityMay 27, CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 9 – September.
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
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
Chapter 1-6 (Classify Polygons)  What is a polygon?  A closed plane figure formed by 3 or more line segments, with no two sides being collinear.
A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R. Otherwise, it is called concave.
COMPUTATIONAL GEOMETRY AND MATRIX MULTIPLICATION Mohammed Zeeshan Farooqui Minhaj Uddin.
Convex Hull 2012/10/23. Convex vs. Concave A polygon P is convex if for every pair of points x and y in P, the line xy is also in P; otherwise, it is.
CS6234 Advanced Algorithms - Convex hull. Terminologies – ◦ Convex hull of a set Q of points is the smallest convex polygon P for which each point in.
CLASSIFYING POLYGONS UNIT 1 LESSON 6. Classifying Polygons In geometry, a figure that lies in a plane is called a plane figure. A polygon is a closed.
Convex Sets & Concave Sets A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last time Several convex hull algorithms. Lower bound of O(n log n) –O(n log h) for output sensitive.
Convex Hulls Guo Qi, Chen Zhenghai, Wang Guanhua, Shen Shiqi, Himeshi De Silva.
Convex Hull R.L. Graham’s Algorithm Computer Graphics.
Convex Hull.
Algorithm design techniques Dr. M. Gavrilova
Convex Hull obstacle start end 11/21/2018 4:05 AM Convex Hull
Computational Geometry Capter:1-2.1
Geometry.
Convex Sets & Concave Sets
Computational Geometry for the Tablet PC
I. The Problem of Molding
Convex Hull 1/1/ :28 AM Convex Hull obstacle start end.
Prof. Harriet Fell Fall 2011 Lecture 9 – September 26, 2011
CHAPTER 33 Computational Geometry
CMPS 3130/6130: Computational Geometry Spring 2017
Convex Hulls Given a set of points (x1,y1),(x2,y2),…,(xn,yn), the convex hull is the smallest convex polygon containing all the points.
Computational Geometry Algorithms
Geometry.
Algorithms and Data Structures Lecture XIV
Computational Geometry
Convex Hull - most ubiquitous structure in computational geometry
Presentation transcript:

Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull

Outline and Reading Convex hull (§12.5.2) Orientation (§12.5.1-2) Sorting by angle (§12.5.5) Graham scan (§12.5.5) Analysis (§12.5.5) 4/30/2019 5:21 PM Convex Hull

Convex Polygon A convex polygon is a nonintersecting polygon whose internal angles are all convex (i.e., less than p) In a convex polygon, a segment joining two vertices of the polygon lies entirely inside the polygon convex nonconvex 4/30/2019 5:21 PM Convex Hull

Convex Hull The convex hull of a set of points is the smallest convex polygon containing the points Think of a rubber band snapping around the points 4/30/2019 5:21 PM Convex Hull

Special Cases The convex hull is a segment The convex hull is a point Two points All the points are collinear The convex hull is a point there is one point All the points are coincident 4/30/2019 5:21 PM Convex Hull

Applications Motion planning Geometric algorithms obstacle start end Find an optimal route that avoids obstacles for a robot Geometric algorithms Convex hull is like a two-dimensional sorting obstacle start end 4/30/2019 5:21 PM Convex Hull

Computing the Convex Hull The following method computes the convex hull of a set of points Phase 1: Find the lowest point (anchor point) Phase 2: Form a nonintersecting polygon by sorting the points counterclockwise around the anchor point Phase 3: While the polygon has a nonconvex vertex, remove it 4/30/2019 5:21 PM Convex Hull

Orientation b c CW a c b CCW a c b COLL a The orientation of three points in the plane is clockwise, counterclockwise, or collinear orientation(a, b, c) clockwise (CW, right turn) counterclockwise (CCW, left turn) collinear (COLL, no turn) The orientation of three points is characterized by the sign of the determinant D(a, b, c), whose absolute value is twice the area of the triangle with vertices a, b and c a b c CW c b CCW a c b a COLL 4/30/2019 5:21 PM Convex Hull

Sorting by Angle Computing angles from coordinates is complex and leads to numerical inaccuracy We can sort a set of points by angle with respect to the anchor point a using a comparator based on the orientation function b < c  orientation(a, b, c) = CCW b = c  orientation(a, b, c) = COLL b > c  orientation(a, b, c) = CW CCW COLL CW c c b b b c a a a 4/30/2019 5:21 PM Convex Hull

Removing Nonconvex Vertices Testing whether a vertex is convex can be done using the orientation function Let p, q and r be three consecutive vertices of a polygon, in counterclockwise order q convex  orientation(p, q, r) = CCW q nonconvex  orientation(p, q, r) = CW or COLL r r q q p p 4/30/2019 5:21 PM Convex Hull

Graham Scan p q r H p q r H p q r H for each vertex r of the polygon The Graham scan is a systematic procedure for removing nonconvex vertices from a polygon The polygon is traversed counterclockwise and a sequence H of vertices is maintained for each vertex r of the polygon Let q and p be the last and second last vertex of H while orientation(p, q, r) = CW or COLL remove q from H q  p p  vertex preceding p in H Add r to the end of H p q r H p q r H p q r H 4/30/2019 5:21 PM Convex Hull

Analysis Computing the convex hull of a set of points takes O(n log n) time Finding the anchor point takes O(n) time Sorting the points counterclockwise around the anchor point takes O(n log n) time Use the orientation comparator and any sorting algorithm that runs in O(n log n) time (e.g., heap-sort or merge-sort) The Graham scan takes O(n) time Each point is inserted once in sequence H Each vertex is removed at most once from sequence H 4/30/2019 5:21 PM Convex Hull