POLYGONCONTAINS Test if a point is contained in a multiply connected polygon.

   B = polygonContains(POLYGON, POINT);
   Returns TRUE if the (possibly multi-connected) polygon POLYGON contains
   the point(s) given by POINT.
   This is an extension of the Matlab function inpolygon for the case of
   polygons with holes.

   Example
   POLY = [0 0; 10 0;10 10;0 10;NaN NaN;3 3;3 7;7 7;7 3];
   PT = [5 1;5 4];
   polygonContains(POLY, PT);
   ans =
        1
        0

   See also
   polygons2d, inpolygon, isPointInPolygon

Package: matgeom