pair[] polarSort(pair[] c, int pivot=-1)
Sort points by the polar angles in ascending order.
If pivot < 0, use the pair returned by pivot(c) as origin else c[pivot].
[
Browse code]
pair[] hull(pair[] c, real depthMin=infinity, real depthMax=0,
real angleMin=360, real angleMax=0, int pivot=-1)
Graham scan method of computing a hull nodes of a given set of points.
With default parameter, return the convex hull.
depthMin and depthMax control the minimum and the maximum depth of cracks from the bounding box of c when it's possible.
angleMin and angleMax control the minimum and the maximum angle (in degrees) defined by three consecutive points when it's possible.
The origin for sorting polar coordinates is the point returned by
pivot(c) if pivot < 0 else c[pivot].
[
Browse code]
Example 0001