home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!csd4.csd.uwm.edu!markh
- From: markh@csd4.csd.uwm.edu (Mark)
- Subject: Re: How to decide if a point is inside a polygon?
- Message-ID: <1992Aug27.171134.14798@uwm.edu>
- Sender: news@uwm.edu (USENET News System)
- Organization: Computing Services Division, University of Wisconsin - Milwaukee
- References: <7121@bigbird.hri.com.hri.com> <1992Aug27.170349.13453@uwm.edu>
- Date: Thu, 27 Aug 1992 17:11:34 GMT
- Lines: 12
-
- In article <1992Aug27.170349.13453@uwm.edu> markh@csd4.csd.uwm.edu (Mark) writes:
- >Implement a polygon by putting its vertices in counter-clockwise order in a
- >circular list. A line drawn from a point inside to each of the vertices of
- >the list will move in a counter clockwise direction as you go through each
- >vertex in the list. In other words, the sum of the angles AVB where V is the
- >point in question and A and B are adjacent items in the circular list, where
- >each angle is measured in a counterclockwise direction, will be 360 degrees.
- >If the point lies outside the polygon, this sum will be 0. If the point, V,
- >lies ON the polygon, the sum will be 360.
-
- It won't be zero if the point lies outside the polygon. It will be some
- multiple of 360 larger than 360.
-