Point FindPointInPolygon(List<Vertex> contour)

Dec 17, 2015 at 1:12 PM
Hi,

I need to increase the limit from 8 to 10 in with my polygons inside this function. It would be great to add a small description on how this method finds a point in a polygon and why you may need to increase the limit = 8 threshold.

Thanks,

Alberto
Coordinator
Dec 17, 2015 at 1:37 PM
Edited Dec 17, 2015 at 2:44 PM
See https://triangle.codeplex.com/discussions/542075

EDIT: Actually, the way it is implemented now, the algorithm can easily be defeated:
int limit = 8;
double h = 1.0 / limit;

var contour = new List<Vertex>() {
    new Vertex(0, 0), new Vertex(1, 0), new Vertex(h, h), new Vertex(0, 1)
};

try
{
    Contour.FindPointInPolygon(contour, limit);
}
catch
{
    Console.WriteLine("Failed.");
}
The algorithm described in the above link (searching at a convex corner) might be a better option.
Coordinator
Dec 17, 2015 at 1:38 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.