Working, efficient, convex hull code.