in reply to Better Logic?

Damn, your right!

What I need to do is calculate the slope of the line first then establish whether or not the data is on the correct side of the slope.

Thanks for pointing out my huge logical flaw... Brain Fart of the week :)

Replies are listed 'Best First'.
Re: Re: Better Logic?
by merlyn (Sage) on Mar 21, 2001 at 02:17 UTC
    There are some Mighty Quick Algorithms for this. I think I remember seeing one in the Algorithms In Perl book. "Don't divide" is an imporant part of that.

    -- Randal L. Schwartz, Perl hacker

      As it happens, the sample chapter of Mastering Algorithms with Perl is all about geometry, and it includes a discussion of the standard ray method for the point-in-polygon problem.

      --
      I'd like to be able to assign to an luser