Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!ptsfa!amdahl!drivax!dambrose From: dambrose@drivax.UUCP (David Ambrose) Newsgroups: comp.graphics Subject: Re: polygons and points Message-ID: <2932@drivax.UUCP> Date: 13 Jan 88 19:58:57 GMT References: <506UD138985@NDSUVM1> Reply-To: dambrose@drivax.UUCP (David Ambrose) Organization: Digital Research Inc Lines: 18 In article <506UD138985@NDSUVM1> UD138985@NDSUVM1.BITNET writes: > I would like to know if anyone out there has a fool proof method >(algorithm) for determining whether or not a point is inside of a polygon. You could use the tried and true "parity" algorithm. Draw a line from the point to "infinity". Find all the intersections of this line with the polygon's edges and count them. If the number is odd, the point is inside; even, it's outside. I don't have any referrences at hand but may be able to provide them if badgered. -- ______________________________________________________________________________ David L. Ambrose, -- Digital Research, Inc ...!amdahl!drivax!dambrose DISCLAIMER: Don't blame DRI. They wouldn't approve of this anyway. r}ix NO CARRIER