Example

Reflect a Polygon Horizontally

geometric.polygonReflectX(polygon[, reflectFactor]) reflects a polygon over its vertical midline. Pass an optional reflectFactor between 0 and 1, where 1 indicates a full reflection, 0 leaves the polygon unchanged, and 0.5 collapses the polygon on its vertical midline.

Adjust the reflect factor to see polygonReflectX move the polygon across its vertical midline.

See also Polygon Reflect Y.

Code