Polygon resize algorithm