Skip to content

Function: clipConvex() ​

ts
function clipConvex(subject, clip): Polygon;

Intersection of subject (any simple polygon) with a convex clip polygon. If a non-convex subject is cut into separate parts, they come back as one polygon joined by zero-width strips along the clip edge; use clipPolygonToConvex to get the parts separately.

Parameters ​

ParameterType
subjectPolygon
clipPolygon

Returns ​

Polygon

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).