Implement GetClosestPointOnPerimeter method