Find the number of intersections for a ray passing from the exterior of the
polygon to the point needed.
If odd, the point lies inside the polygon.
If even, the point lies outside the polygon.
On Thu, Dec 6, 2012 at 3:54 AM, Don dondod...@gmail.com wrote:
Given a simple polygon (specified by
Point-In-Polygon Algorithm
On Thu, Dec 6, 2012 at 3:54 AM, Don dondod...@gmail.com wrote:
Given a simple polygon (specified by a list of the vertices) and a
point, how do you determine if the point is inside the polygon?
--
--
draw any ray through the point.
the ray cuts the polygon at several places on both sides of the point.
if the no off cuts @ both side is odd
point lie inside the polygon
else outside the polygon.
Plz see the example in the attached PDF.
On Thu, Dec 6, 2012 at 9:48 AM, shivendra singh
Given a simple polygon (specified by a list of the vertices) and a
point, how do you determine if the point is inside the polygon?
--