By Anirudh C V
Use Graham Scan's Algorithm for finding Convex Hull in C++ from given set of points in the polygon
Convex Hull of a set of points, in 2D plane, is a convex polygon with minimum area such that each point lies either on the boundary of polygon or inside it.
We use Graham Scan's Algorithm for finding Convex Hull.
The expected Time Complexity is O(n*log(n)) and the expected Space Complexity is O(n), where n is the total number of points in the polygon.
INPUT :
1. Enter number of points that are going to be given as input - 3
2. Then give the points list - {1 , 5} , {4 , 4} , {2 , 1}
OUTPUT :
{1 , 5}
{2 , 1}
{4 , 4}
Submitted by Anirudh C V (AnirudhCV)
Download packets of source code on Coders Packet
Comments