Returns the convex hull (separated into upper and lower Chains of vertices) and the diameter (farthest pair of points), given input consisting of a list of 2d points represented as pairs (x,y). The convex hull Algorithm is Graham's scan, using a coordinate-based sorted order rather than the more commonly seen radiaL sorted order. A rotating calipers algorithm generates candidate pairs of vertices for the diameter calculation. Care was taken handling tricky cases such as pairs of points with the same x-coordinate and colinear Triples of points.
NEW
Fixed some bugs.
Convex hull and diameter of 2d point setsInformation