Quickhull Algorithm for Convex Hull

The QuickHull algorithm is a Divide and Conquer algorithm similar to QuickSort. Let a[0…n-1] be the input array of points. Following are the steps for finding the convex hull of these points.

Algorithm:

  • Find the point with minimum x-coordinate lets say, min_x and similarly the point with maximum x-coordinate, max_x.
  • Make a line joining these two points, say L. This line will divide the whole set into two parts. Take both the parts one by one and proceed further.
  • For a part, find the point P with maximum distance from the line L. P forms a triangle with the points min_x, max_x. It is clear that the points residing inside this triangle can never be the part of convex hull.
  • The above step divides the problem into two sub-problems (solved recursively). Now the line joining the points P and min_x and the line joining the points P and max_x are new lines and the points residing outside the triangle is the set of points. Repeat point no. 3 till there no point left with the line. Add the end points of this point to the convex hull.

Convex Hull AlgorithmConvex Hull using Divide and Conquer Algorithm:Convex Hull using Jarvis’ Algorithm or Wrapping:Convex Hull using Graham Scan:

The Convex Hull Algorithm is used to find the convex hull of a set of points in computational geometry. The convex hull is the smallest convex set that encloses all the points, forming a convex polygon. This algorithm is important in various applications such as image processing, route planning, and object modeling.

Similar Reads

What is Convex Hull?

The convex hull of a set of points in a Euclidean space is the smallest convex polygon that encloses all of the points. In two dimensions (2D), the convex hull is a convex polygon, and in three dimensions (3D), it is a convex polyhedron....

Convex Hull | Monotone Chain Algorithm:

Monotone chain algorithm constructs the convex hull in O(n * log(n)) time. We have to sort the points first and then calculate the upper and lower hulls in O(n) time. The points will be sorted with respect to x-coordinates (with respect to y-coordinates in case of a tie in x-coordinates), we will then find the left most point and then try to rotate in clockwise direction and find the next point and then repeat the step until we reach the rightmost point and then again rotate in the clockwise direction and find the lower hull....

Quickhull Algorithm for Convex Hull:

The QuickHull algorithm is a Divide and Conquer algorithm similar to QuickSort. Let a[0…n-1] be the input array of points. Following are the steps for finding the convex hull of these points....

Complexity Analysis for Convex Hull Algorithm:

The below table enlists the time complexities of the above mentioned convex hull algorithms.where, N denotes the total number of given points....

Problems on Convex Hull:

Problem links Dynamic Convex hull | Adding Points to an Existing Convex Hull Deleting points from Convex Hull Perimeter of Convex hull for a given set of points Check if the given point lies inside given N points of a Convex Polygon Tangents between two Convex Polygons Check if given polygon is a convex polygon or not Check whether two convex regular polygon have same center or not Minimum Enclosing Circle...

Frequently Asked Questions on Convex Hull:

Question 1: What is a convex hull?...

Contact Us