home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!swrinde!zaphod.mps.ohio-state.edu!usc!rutgers!psinntp!psinntp!svc!news
- From: moose@svcdudes.com
- Newsgroups: comp.programming
- Subject: Re: How to decide if a point is inside a polygon?
- Message-ID: <1992Aug27.162441.18118@svcdudes.com>
- Date: 27 Aug 92 16:24:41 GMT
- References: <7121@bigbird.hri.com.hri.com>
- Sender: news@svcdudes.com
- Reply-To: moose@svcdudes.com
- Distribution: na
- Organization: Software Ventures, Inc.
- Lines: 17
-
- In article <7121@bigbird.hri.com.hri.com> mps@sparc68.hri.com (Mark Stockley)
- writes:
- > I am in need of an algorithm to compute whether or not a given
- > point exists within or without a polygon. Any help or pointers to
- > where to look would be much appreciated.
- >
-
- Draw a line from the point to anywhere definately outside the polygon. Count
- the number of times the line crosses the polygon border. If it's odd, the
- original point is inside the polygon, if it's even, it was outside.
-
-
- --
- Michael Rutman | moose@svcdudes.com
- Cubist | makes me a NeXT programmer
- Software Ventures | maker of MicroPhone Pro
- #include <std.disclaimer> | really offesive political statement
-