From: Thomas Knudsen Newsgroups: comp.os.msdos.djgpp Subject: Re: point inside polygon detection Date: Thu, 26 Mar 1998 18:40:30 +0100 Organization: News Server at UNI-C, Danish Computing Centre for Research and Education. Lines: 32 Message-ID: References: <6fce42$md4 AT bgtnsc02 DOT worldnet DOT att DOT net> NNTP-Posting-Host: geb.gfy.ku.dk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <6fce42$md4@bgtnsc02.worldnet.att.net> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 25 Mar 1998, Steve Patton wrote: > Hi, > > Is there a quick easy way to detect whether a point lies within the > boundaries of a 2d polygon? Right now I'm dealing with a four sided > polygon. This shape could be a rectangle (at any rotation angle, or > distortion), trapazoid, etc, any 4 sided polygon. This has to be checked a > LOT, so I would appreciate an efficient algorithm. Source code is not > neccessary, if you can give me an idea, I can run with it. Thanks! > > -- > -Steve > Personal : http://home.att.net/~pattonl > Business : http://home.att.net/~pattonl/digital_resources.htm > > > > Check Wm. Randolph Franklin's highly optimized PNPOLY algorithm on URL http://www.ecse.rpi.edu/Homepages/wrf/geom/pnpoly.html -Thomas -- Thomas Knudsen | www: http://www.gfy.ku.dk/~tk/ National Survey and Cadastre - Denmark | e-mail: tk AT gfy DOT ku DOT dk Geodetic office, Rentemestervej 8 | Direct Phone: +45 35 87 52 64 DK-2400 Copenhagen NV, Denmark | FAX: +45 35 87 50 52