the Melkman algorithm for convex hull