in reply to Determing whether point falls inside or outside a complex polygon

Typing "points inside complex polygon" in Google gives this as your first result:

http://www.alienryderflex.com/polygon/

Just translate the simple C code to Perl and you're set.

-b

  • Comment on Re: Determing whether point falls inside or outside a complex polygon

Replies are listed 'Best First'.
Re^2: Determing whether point falls inside or outside a complex polygon
by tilly (Archbishop) on Nov 08, 2004 at 17:56 UTC
    That depends on how you define the interior of a polygon which intersects itself. If you want to account for the possibility that your point is "inside twice", the most general solution is to compute the winding number.