Novak Elliott wrote:
> does anyone have the source code for a point in polygon test ?
Is this for convex, non-convex, or complex polygons?
The convex case is trivial; a point is inside the polygon iff it is on
the inside of all of the edges of the polygon.
For a complex polygon, you need to take a line segment from the point
to some other point which is known to be outside of the polygon, and
find which of the polygon's edges it intersects. The result depends
upon the winding rule which is used.
I don't recall whether there is a specific method for non-convex (but
not complex) polygons.
--
Glynn Clements <[EMAIL PROTECTED]>