Convex Hull R.L. Graham’s Algorithm Computer Graphics.

Slides:



Advertisements
Similar presentations
Computer Graphics- SCC 342
Advertisements

Chan’s algorithm CS504 Presentation.
Planar Convex Hull 2013 / 5 / 9 Group 4 Sungheon Park Jeongho Son CS504 Presentation [CS504 Presentation]
algorithms and data structures
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.
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,
Computational Geometry
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
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.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Chapter 11 Sorting and Searching. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Chapter Objectives Examine the linear search and.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 3 Chapter 3: 2D Convex Hulls Friday,
5 - 1 § 5 The Divide-and-Conquer Strategy e.g. find the maximum of a set S of n numbers.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
1 Parallel Algorithms IV Topics: image analysis algorithms.
Approximation Algorithms
Circle Drawing algo..
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.
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.
Recap CSC508.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
5 -1 Chapter 5 The Divide-and-Conquer Strategy A simple example finding the maximum of a set S of n numbers.
Mathematical Induction II Lecture 21 Section 4.3 Mon, Feb 27, 2006.
Fundamental Data Structures and Algorithms Klaus Sutner April 27, 2004 Computational Geometry.
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
ALGORITHMS.
Chapter 9 Sorting 1. The efficiency of data handling can often be increased if the data are sorted according to some criteria of order. The first step.
Chapter 9 Sorting. The efficiency of data handling can often be increased if the data are sorted according to some criteria of order. The first step is.
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.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 11 Representation and.
Computer Graphics Lecture 08 Taqdees A. Siddiqi Computer Graphics Filled Area Primitives I Lecture 08 Taqdees A. Siddiqi
What is the runtime of the best possible (comparison based) sorting algorithm? 1.O(log n) 2.O(n) 3.O(n log n) 4.O(n 2 ) 5.None of the above.
Sort Algorithm.
3. Polygon Triangulation
Andrew's Monotone Chain Convex Hull Algorithm
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
What is an algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate.
Convex Hull.
CSCE350 Algorithms and Data Structure
Image Processing for Physical Data
Sorting Algorithms Written by J.J. Shepherd.
Using Slope-Intercept Form
Convex Hull obstacle start end 11/21/2018 4:05 AM Convex Hull
Geometry.
Convex Sets & Concave Sets
Convex Hull 1/1/ :28 AM Convex Hull obstacle start end.
Locating an Obnoxious Line among Planar Objects
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull
Computational Geometry Algorithms
Geometry.
Computational Geometry
Mathematical Induction II
Convex Hull - most ubiquitous structure in computational geometry
Presentation transcript:

Convex Hull R.L. Graham’s Algorithm Computer Graphics

Convex Hull Formally: It is the smallest convex set containing the points. (a mathematical definition was provided in the lecture) Informally: It is a rubber band wrapped around the “outside” points Given a set of points S on the plane, Graham’s scan computes their convex hull. Computer Graphics

Step 1 Find a point, P, interior to the convex hull (CH) by taking the average of the coordinates of all the given points. Another startegy might be to simply choose yMin P Computer Graphics

Step 2 Translate the interior point, P, and all the others, so the interior point is at the origin Y P X Computer Graphics

Step 3 Find the angle between the line connecting P to each of the points and the positive X-axis. Sort the points according to the magnitude of the angle. The sorting determines the order that the algorithm will process the points Y P X Computer Graphics

Step 4 If two points have the same angle, delete the point with the smaller amplitude (This step creates a new set of points S’. Starting from the lowest Y-Axis coordinate, label the points P0, P1, P2, ... P4 P3 P2 P5 P1 P0 Computer Graphics

Step 5 Let labels Pa, Pb, Pc refer to P0, P1, P2 respectively. P4 P3 Computer Graphics

Step 6 If the interior angle formed by Pa, Pb, Pc is greater than or equal to 180 degrees, then eliminate the point labeled with Pb, Set point Pb to point Pa and set point Pa to the previous point in the sequence, in this case, P5. P4 P3 P4 P3 Pc Pc Pa P5 P5 q Pb eliminate Pa Pb Computer Graphics

Step 6 - Cont. If the interior angle formed by Pa, Pb, Pc from before is less than 180 degrees, no points are eliminated, and each of Pa, Pb and Pc is advanced forward one point. P4 P4 P3 Pc P3 Pb Pc P5 P5 q Pb Pa Pa P0 Computer Graphics

Step 7 The Algorithm continues by repeating step 6 until Pb=P0. At this point, the algorithm stops and only the points of the convex hull remain. Computer Graphics

Efficiency Assume n is the number of points in S. Step 1 can be done in O(n) operations. Step 2 can be done in O(n) operations. Step 3 can be done in O(nLogn) operations. Step 4 can be done in O(n) operations. Step 5 can be done in O(1) operations. Computer Graphics

Efficiency - Cont. Note that each application of step 6 either eliminate a point (back word) or moves forward. This means that after 2n iterations at the most, we’ll end up with CH(S’). In conclusion, the algorithm will take O(nLogn) operations. Computer Graphics