Find a point in a complex polygon
-
19-09-2019 - |
Question
This polygon could be shaped like a C
I tried the formula located here How can I determine whether a 2D Point is within a Polygon?
however it doesn't actually correctly predict if the point is in the polygon.
Solution
Easiest way - especially for lots of points is to triangulate the polygon then do a point in triangle test.
You could convert the polygon into a set of convex polygons but that is trickier.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow