Module algorithms
$O(n \log n)$ Convex hull of a set of points.
$O(n^2)$ Finds all line segment intersections.
$O(n^4)$ Generate a random, valid polygon from a set of points.