home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!news.smith.edu!orourke
- From: orourke@sophia.smith.edu (Joseph O'Rourke)
- Subject: Re: Point inside a triangle
- Message-ID: <1992Nov19.115634.27148@sophia.smith.edu>
- Organization: Smith College, Northampton, MA, US
- References: <BxvnnI.90x@slipknot.rain.com> <1992Nov18.003415.9990@cis.uab.edu> <BxxoH3.BAH@slipknot.rain.com>
- Date: Thu, 19 Nov 1992 11:56:34 GMT
- Lines: 25
-
- In article <BxxoH3.BAH@slipknot.rain.com> robert@slipknot.rain.com.UUCP (Robert Reed) writes:
- >In article <1992Nov18.003415.9990@cis.uab.edu> sloan@cis.uab.edu (Kenneth Sloan) writes:
- >|In article <BxvnnI.90x@slipknot.rain.com> robert@slipknot.rain.com.UUCP (Robert Reed) writes:
- >|>
- >|>A trivial modification to the algorithm as I suggested it would correct for
- >|>this. [...]
- >|
- >|Your "trivial modification" is virtually *all* of Professor O'Rourke's
- >|algorithm! [...]
- >
- >Hardly. My test is: [...]
- >Note that most of this code gets executed only in the rare case that point p is
- >collinear with a triangle edge which is horizontal.
-
- Why do you only test on horizontal edges? The point a below is called inside
- and the point b outside by the raw ray algorithm.
-
- /\
- a b
- / \
- +------+
-
- In order to classify either both inside or both outside, it seems necessary
- to check for collinearity with every edge. Checking for collinearity
- requires a signed area calculation (or its equivalent).
-