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.

Slides:



Advertisements
Similar presentations
Why Graham-Scan Needs to Sort Vertices Before Scanning
Advertisements

Advanced Topics in Algorithms and Data Structures Lecture 7.2, page 1 Merging two upper hulls Suppose, UH ( S 2 ) has s points given in an array according.
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.
Lecture 3: Parallel Algorithm Design
Jarvis March Graham Scan Chan’s Algorithm
Chan’s algorithm CS504 Presentation.
Planar Convex Hull 2013 / 5 / 9 Group 4 Sungheon Park Jeongho Son CS504 Presentation [CS504 Presentation]
1/13/15CMPS 3130/6130: Computational Geometry1 CMPS 3130/6130: Computational Geometry Spring 2015 Convex Hulls Carola Wenk.
Advanced Algorithms Piyush Kumar (Lecture 12: Parallel Algorithms) Welcome to COT5405 Courtesy Baker 05.
The Divide-and-Conquer Strategy
Convex Hull obstacle start end Convex Hull Convex Hull
CS16: Introduction to Data Structures & Algorithms
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.
CS4413 Divide-and-Conquer
The Divide-and-Conquer Strategy
Data Structures and Algorithms (AT70.02) Comp. Sc. and Inf. Mgmt. Asian Institute of Technology Instructor: Dr. Sumanta Guha Slide Sources: CLRS “Intro.
Introduction to Algorithms Rabie A. Ramadan rabieramadan.org 6 Ack : Carola Wenk nad Dr. Thomas Ottmann tutorials.
Convex Hulls May Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
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.
Convex Hull Problem Presented By Erion Lin. Outline Convex Hull Problem Voronoi Diagram Fermat Point.
Advanced Algorithm Design and Analysis (Lecture 10) SW5 fall 2004 Simonas Šaltenis E1-215b
Polygons – Concave and Convex Turning Point Quiz Copyright © 2010 Kelly Mott.
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]
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.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 3 Chapter 3: 2D Convex Hulls Friday,
Chapter 4: Divide and Conquer The Design and Analysis of Algorithms.
Computational Geometry Overview from Cormen, et al. Chapter 33
5 - 1 § 5 The Divide-and-Conquer Strategy e.g. find the maximum of a set S of n numbers.
Convex Hull Computation ● Applications of Convex Hull Computation ● Definitions ● Basic Math Functions ● Algorithms Algorithm Speed Discovered By Brute.
Design and Analysis of Algorithms - Chapter 41 Divide and Conquer The most well known algorithm design strategy: 1. Divide instance of problem into two.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
Design and Analysis of Algorithms - Chapter 41 Divide and Conquer The most well known algorithm design strategy: 1. Divide instance of problem into two.
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
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.
Computational Geometry (35/33) Line Segments and cross-product Segment intersection and Sweep Line Convex Hull and Graham’s Scan, Jarvis’s march Divide-and-Conquer.
5 -1 Chapter 5 The Divide-and-Conquer Strategy A simple example finding the maximum of a set S of n numbers.
Computational Geometry Course Summary (First Half) Spring 2008 Pay special attention to: algorithm details (able to explain correctness and carry out a.
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
4-3~ 鄭力瑋. concave polygon:convex polygon: Convex polygons 「凸」的定義是:圖形內任意兩點的連線不會經過圖形外部。
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.
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.
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.
Lecture 3: Parallel Algorithm Design
Andrew's Monotone Chain Convex Hull Algorithm
MA/CSSE 473 Day 16 Answers to your questions Divide and Conquer
Convex Hull.
CSCE350 Algorithms and Data Structure
Algorithm design techniques Dr. M. Gavrilova
Convex Hull obstacle start end 11/21/2018 4:05 AM Convex Hull
Computational Geometry (35/33)
Convex Sets & Concave Sets
The Divide-and-Conquer Strategy
Convex Hull 1/1/ :28 AM Convex Hull obstacle start end.
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.
CMPS 3120: Computational Geometry Spring 2013
Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull
Introduction to Algorithms
Presentation transcript:

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 called concave. x yP x yP convex concave

3 The convex hull problem The convex hull of a set of planar points is the smallest convex polygon containing all of the points. concave polygon:convex polygon:

Graham ’ s Scan Start at point guaranteed to be on the hull. (the point with the minimum y value) Sort remaining points by polar angles of vertices relative to the first point. Go through sorted points, keeping vertices of points that have left turns and dropping points that have right turns.

Graham ’ s Scan

Graham ’ s Runtime Graham ’ s scan is O(n log n) due to initial sort of angles.

A more detailed algorithm

Convex Hull by Divide-and-Conquer First, sort all points by their x coordinate. – ( O(n log n) time) Then divide and conquer: – Find the convex hull of the left half of points. – Find the convex hull of the right half of points. – Merge the two hulls into one.

5 Hull of S by exhaustive search;

Lower Tangent Example Initially, T=(4, 7) is only a lower tangent for A. The A loop does not execute, but the B loop increments b to 11. But now T=(4, 11) is no longer a lower tangent for A, so the A loop decrements a to 0. T=(0, 11) is not a lower tangent for B, so b is incremented to 12. T=(0, 12) is a lower tangent for both A and B, and T is returned.

Q&A