Skip to content

Function: clipHalfPlane() ​

ts
function clipHalfPlane(
   poly, 
   point, 
   normal, 
   offset?
): Polygon;

Keep the part of poly where dot(normal, v - point) >= offset (one pass of Sutherland–Hodgman).

Parameters ​

ParameterTypeDefault value
polyPolygonundefined
pointVecundefined
normalVecundefined
offsetnumber0

Returns ​

Polygon

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