CLIPPOLYGON Clip a polygon with a rectangular box.

   POLY2 = clipPolygon(POLY, BOX);
   POLY is N-by-2 array of points
   BOX has the form: [XMIN XMAX YMIN YMAX].
   Returns the polygon created by the intersection of the polygon POLY and
   the bounding box BOX.

   Note: Works only for convex polygons at the moment.

   See also:
     polygons2d, boxes2d, clipPolygonHP, clipPolyline

Package: geometry