Matlab POLYBOOL - external contours and internal contours

NOTE: Polybool is obsolete (link down)

Warning: (X1,Y1) contains no external contours. Function POLYBOOL assumes that that external contours have clockwise-ordered vertices, and all contours in (X1,Y1) have counterclockwise-ordered vertices. Use POLY2CW to reverse the vertex order if necessary.

External contour:

the vertices describing the outer edge of a polygon–the outside of a donut, for example. These vertices must be given in CLOCKWISE order.

Internal contour:

the vertices describing an area in which the convex hull is hollow (the donut hole). These vertices must be given in COUNTERclockwise order.