Convex Hulls May 20121 Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.

Slides:



Advertisements
Similar presentations
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.
Advertisements

1/13/15CMPS 3130/6130: Computational Geometry1 CMPS 3130/6130: Computational Geometry Spring 2015 Convex Hulls Carola Wenk.
algorithms and data structures
2/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries II Carola Wenk.
Convex Hull obstacle start end Convex Hull Convex Hull
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.
The Divide-and-Conquer Strategy
1 Divide-and-Conquer The most-well known algorithm design strategy: 1. Divide instance of problem into two or more smaller instances 2. Solve smaller instances.
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
Ruslana Mys Delaunay Triangulation Delaunay Triangulation (DT)  Introduction  Delaunay-Voronoi based method  Algorithms to compute the convex hull 
Theory of Algorithms: Divide and Conquer
Introduction to Algorithms Rabie A. Ramadan rabieramadan.org 6 Ack : Carola Wenk nad Dr. Thomas Ottmann tutorials.
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.
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.
Lecture 3: Reduce to known problem Convex Hull (section 33.3 of CLRS). Suppose we have a bunch of points in the plane, given by their x and y coordinates.
Convex Hull Problem Presented By Erion Lin. Outline Convex Hull Problem Voronoi Diagram Fermat Point.
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.
Feb Polygon Triangulation Shmuel Wimer Bar Ilan Univ., School of Engineering.
1 Today’s Material Computational Geometry Problems –Closest Pair Problem –Convex Hull Jarvis’s March, Graham’s scan –Farthest Point Problem.
5/17/2015 1:32 AMConvex Hull1 obstacle start end.
Query Processing in Databases Dr. M. Gavrilova.  Introduction  I/O algorithms for large databases  Complex geometric operations in graphical querying.
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.
1.4 Exercises (cont.) Definiton: A set S of points is said to be affinely (convex) independent if no point of S is an affine combination of the others.
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
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.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 4: 3D Convex Hulls Monday, 2/23/04.
Design and Analysis of Algorithms - Chapter 41 Divide and Conquer The most well known algorithm design strategy: 1. Divide instance of problem into two.
Divide and Conquer The most well known algorithm design strategy: 1. Divide instance of problem into two or more smaller instances 2. Solve smaller instances.
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.
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.
A. Levitin “Introduction to the Design & Analysis of Algorithms,” 3rd ed., Ch. 5 ©2012 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
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.
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.
Convex Hull. University of Manchester biologists used lasers to measure the minimum amount of skin required to wrap around the skeletons of modern-day.
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.
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.
Lecture 15 Computational Geometry Geometry sweeping Geometric preliminaries Some basics geometry algorithms.
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.
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
MA/CSSE 473 Day 16 Answers to your questions Divide and Conquer
Convex Hull.
Query Processing in Databases Dr. M. Gavrilova
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
Convex Hull 1/1/ :28 AM Convex Hull obstacle start end.
CHAPTER 33 Computational Geometry
Divide-and-Conquer The most-well known algorithm design strategy:
Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull
Introduction to Algorithms
Convex Hull - most ubiquitous structure in computational geometry
Presentation transcript:

Convex Hulls May Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty

Preliminaries May 20122

3

4

5

Convex Hull Algorithms in the Plane May 20126

7

8

Graham’s Scan May To determine whether a point is extreme, is it necessary to examine all triangles? R. L. Graham showed in 1972 that sorting the point first, the extreme points can be found in linear time. Suppose an internal point was found and was set as the origin, while all points are trivially transformed accordingly. The points can be sorted lexicographically by angle and distance from origin. The points are then stored in doubly- linked circular list. No divisions or square roots are needed.

May Start Scan Scan starts at the lowest rightmost point which is certainly extreme. The following rules apply: 1.p 1 p 2 p 3 is a right turn. Eliminate p 2 and check p 0 p 1 p p 1 p 2 p 3 is a left turn. Advance the scan and check p 2 p 3 p 4. It repeatedly examines triples of consecutive points to determine whether or not they define a reflex angle.

May Theorem: The convex hull of N points in the plane can be found in O(NlogN) time and O(N) storage, using only arithmetic operations and comparisons. The sort of polar coordinate (divisions and square toot are not necessary) can be replaced by left to right sorting as follows. Lower subset Scan Upper subset Split into upper and lower points by the line passing through the leftmost and rightmost points

May Construct the upper and lower boundaries separately by left to right scan of the sorted points, and applying same rules for reflex angles. The points l and r are necessarily on the boundary.

Jarvis’s March May A polygon can be described by the sequence of its edges, similar as the sequence of vertices. Given two points, it is straightforward to test whether the line segment joining them is an edge of the convex hull. Convex hull Theorem: The line segment l defined by two points is an edge of a convex hull iff all other points of the set lie on l or to one side of it.

May There are O(N 2 ) edges to examine. For each, all N points are tested, yielding O(N 3 ) run time. The algorithm finds successive hull vertices by repeatedly turning angles. New vertex is discovered in O(N) time, yielding O(N 2 ) total time.

May In the worst case where all N points lie on the convex hull Jarvis’s march consumes O(N 2 ) time, which is inferior to O(NlogN) Graham’s scan run time. In many cases where the number of convex hull points is h and h<<N, run time is O(hN). Jarvis’s march is reminiscent of gift-wrapping, and can be extended to 3D, while Graham’s scan does not.

QUICKHULL Techniques May Inspired by QUICKSORT sorting algorithm (Hoare 1962). Reminder: QUICKSORT worst case run time is O(N 2 ). Expected runs time is O(NlogN) (division of set into two subsets, adhering some “balance” criterion). QUICKHULL works recursively. It partitions the set S of N points into two subsets each results in a polygonal chain. The chains concatenations yields the convex hull polygon. The initial partitioning is defined by the line passing through the points with the smallest and largest abscissae.

May

May

May

May Finding the point which maximizes the area of the triangle takes O(N). Chain concatenation takes O(1). Therefore, if the size of point subsets adheres some balance, the run time is O(NlogN). As QUICKSORT, worst run time is O(N 2 ). Though QUICKHULL is a divide-and-conquer algorithm, the uncontrolled size of the two remaining parts results square worst-case time complexity. Moreover, the algorithm that inherently can be parallelized, may suffer from inefficiency due to poor balancing.

Divide-and-Conquer Algorithms May Suppose the point set S is divided into two arbitrary halves S 1 and S 2, where there is no separation between S 1 and S 2. Let us compute the convex hulls CH(S 1 ) and CH(S 2 ). How much work is required to form CH(S 1 US 2 )?

May Theorem: The convex hull of the union of two convex polygons can be found in time proportional to their total number of vertices.

May

May