Example

Scale a Polygon

geometric.polygonScale(polygon[, scale[, origin]]) returns the vertices resulting from scaling a polygon by a scaleFactor (where 1 is the polygon's current size) from an origin point. If origin is not specified, the origin defaults to the polygon's centroid.

The returned polygon's area is equal to the input polygon's area multiplied by the square of the scaleFactor. To scale the polygon's area by the scaleFactor itself, see geometric.polygonScaleArea.

Adjust the scale factor to see polygonScale resize the polygon from its centroid.

See also Polygon Scale Area.

Code