Hi Richard, this program takes in only a list of polygon vertices, not a list of data points that may or may not lie within the polygon. It returns a uniform grid of points that lie within the area specified by the polygon.

I think people who study functions with domain as a polygon in R2 could find this useful. Its currently used to study chaotic maps like the Henon map, with polygons formed by intersections of the stable and unstable manifolds.

you should consider incorporating the sampling density parameter (i.e. number of nodes per unit area of the polygon) into your function to actually make it useful

Hi Richard, this program takes in only a list of polygon vertices, not a list of data points that may or may not lie within the polygon. It returns a uniform grid of points that lie within the area specified by the polygon.

This submission shows that the author does not understand the potential of built-in inpolygon() function, that can accomplish the same thing with much shorter syntax and faster runtime.

you should consider incorporating the sampling density parameter (i.e. number of nodes per unit area of the polygon) into your function to actually make it useful

Hi Richard, this program takes in only a list of polygon vertices, not a list of data points that may or may not lie within the polygon. It returns a uniform grid of points that lie within the area specified by the polygon.

There's also John D'errico's inhull
http://www.mathworks.co.uk/matlabcentral/fileexchange/10226-inhull
to do the same thing, and it works in any number of dimensions.

This submission shows that the author does not understand the potential of built-in inpolygon() function, that can accomplish the same thing with much shorter syntax and faster runtime.

Comment only