the function minimum perimter polygon