home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 11972 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.graphics
  2. Path: sparky!uunet!news.smith.edu!orourke
  3. From: orourke@sophia.smith.edu (Joseph O'Rourke)
  4. Subject: Re: Point inside a triangle
  5. Message-ID: <1992Nov17.132302.6345@sophia.smith.edu>
  6. Organization: Smith College, Northampton, MA, US
  7. References: <BxsLL1.5H5@slipknot.rain.com> <1992Nov16.115211.23169@sophia.smith.edu> <Bxtz3s.6xA@slipknot.rain.com>
  8. Date: Tue, 17 Nov 1992 13:23:02 GMT
  9. Lines: 18
  10.  
  11. In article <Bxtz3s.6xA@slipknot.rain.com> robert@slipknot.rain.com.UUCP (Robert Reed) writes:
  12.  
  13. >The special cases are trivial to discard, if the ray intersects a vertex, the
  14. >adjacent vertices must have Y values of opposite sign (assuming a horizontal
  15. >ray) to represent a crossing.  If the point is collinear with an edge, discard
  16. >it [the edge, I presume].
  17.  
  18. It seems from your description that points on the boundary of the triangle
  19. T are not handled consistently by the ray algorithm.  Below, a is not in T
  20. but b is in T.
  21.  
  22.                    /\
  23.                   b  \
  24.                  /    \
  25.                 +--a---+       
  26.  
  27. At least this seems to be what the code that Michael Goza posted does.
  28. Am I right?
  29.