GrahamScan (convex hull) - todo: clean up this mess