Updated convex hull code to remove duplicate points.