implementation convexhullPolygon