Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Speeding up point-in-polygon -- take two

by roboticus (Chancellor)
on Aug 28, 2006 at 14:20 UTC ( #569984=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     *--------------------*
      \       A          /
    ...
     /      \     \   /
    *--------*     \ /
                    *
    
  2. or download this
     *--------------------*
      \       A          /
    ...
     / A(2) \     \   /
    *--------*     \ /
                    *
    
  3. or download this
    sub _pointIsInQuadrilateral {
      my ($a_point, $a_x, $a_y) = @_;
    ...
      # Point is inside quadrilateral!
      return 1;
    }