determining when a point is inside a polygon
There are many algorithms to determine whether a point is inside apolygon
or not:
- •
Connect the point at infinity with a line. If this linecrosses the edges of the polygon an odd number
of times, the pointis inside the polygon. Otherwise it is not.
- •
Calculate the winding number of the polygon with thepoint.
These two algorithms can be used for any closed curve.