home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / graphics / 12075 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.4 KB  |  36 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: <1992Nov19.115634.27148@sophia.smith.edu>
  6. Organization: Smith College, Northampton, MA, US
  7. References: <BxvnnI.90x@slipknot.rain.com> <1992Nov18.003415.9990@cis.uab.edu> <BxxoH3.BAH@slipknot.rain.com>
  8. Date: Thu, 19 Nov 1992 11:56:34 GMT
  9. Lines: 25
  10.  
  11. In article <BxxoH3.BAH@slipknot.rain.com> robert@slipknot.rain.com.UUCP (Robert Reed) writes:
  12. >In article <1992Nov18.003415.9990@cis.uab.edu> sloan@cis.uab.edu (Kenneth Sloan) writes:
  13. >|In article <BxvnnI.90x@slipknot.rain.com> robert@slipknot.rain.com.UUCP (Robert Reed) writes:
  14. >|>
  15. >|>A trivial modification to the algorithm as I suggested it would correct for
  16. >|>this. [...]
  17. >|
  18. >|Your "trivial modification" is virtually *all* of Professor O'Rourke's
  19. >|algorithm!   [...]
  20. >
  21. >Hardly.  My test is: [...]
  22. >Note that most of this code gets executed only in the rare case that point p is
  23. >collinear with a triangle edge which is horizontal.
  24.  
  25. Why do you only test on horizontal edges?  The point a below is called inside
  26. and the point b outside by the raw ray algorithm.
  27.  
  28.                    /\
  29.                   a  b
  30.                  /    \
  31.                 +------+
  32.  
  33. In order to classify either both inside or both outside, it seems necessary
  34. to check for collinearity with every edge.  Checking for collinearity 
  35. requires a signed area calculation (or its equivalent).
  36.