The function convex_hull_2 generates the counterclockwise sequence of extreme points from a given set of input points.
generates the counterclockwise sequence of extreme points
of the points in the range [first,beyond).
The resulting sequence is placed starting at position
result, and the past-the-end iterator for the resulting
sequence is returned. It is not specified at which point the
cyclic sequence of extreme points is cut into a linear sequence.
The default traits class Default_traits is the kernel in which the type InputIterator::value_type is defined.
One of two algorithms is used, depending on the type of iterator used to specify the input points. For input iterators, the algorithm used is that of Bykat [Byk78], which has a worst-case running time of O(n h), where n is the number of input points and h is the number of extreme points. For all other types of iterators, the O(n log n) algorithm of of Akl and Toussaint [AT78] is used.