I am reading this paper
Given a complex polygon. Its edges may intersect. The algorithm finds out if given point is inside of polygon or not. It draws a line from the point and calculates number of intersections of line and edges of polygon. If the number of intersections is odd the point is inside polygon.
I don't understand how inside or outside of complex polygon are defined? I think there should be definition of it, that doesn't depend on any algorithm. So a polygon is given, what parts are inside of polygon and what part not?
2 Answers
$\begingroup$This paper (cited in your linked article) discusses two non-equivalent definitions of interior/exterior points of a convex polygon, one based on even-odd and the other on winding number, and so it appears the paper you have linked is using the even-odd rule as the definition and not as a result based on some other definition.
$\endgroup$ $\begingroup$The intuitive concept of "inside" and "outside" don't apply to convex polygons, however based on the algorithm a point is considered outside if the polygon "overlaps" itself an even amount of times.
$\endgroup$ 1