home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / programm / 2505 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.3 KB  |  24 lines

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