home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / graphics / 9711 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  1.7 KB

  1. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!psinntp!psinntp!eye!erich
  2. From: erich@eye.com (Eric Haines)
  3. Newsgroups: comp.graphics
  4. Subject: Re: 3d line through 3d polygon
  5. Message-ID: <1992Sep14.094644.15276@eye.com>
  6. Date: Mon, 14 Sep 92 13:46:43 GMT
  7. References: <BuGD8w.CxA@iat.holonet.net> <92256.221654JIANGY@QUCDN.QueensU.CA>
  8. Organization: 3D/EYE, Inc.  Ithaca, NY
  9. Lines: 27
  10.  
  11. In article <92256.221654JIANGY@QUCDN.QueensU.CA> <JIANGY@QUCDN.QueensU.CA>
  12. write
  13. s:
  14. >The most intuitive (not necessarily efficient) solution is:
  15. >   (1) compute the coefficient (A, B, C, D) of the polygon plane
  16. >       using Newell (?) method.
  17. >       ...
  18.  
  19. Your method's normally the most efficient overall, too (though you could do
  20. extra things like putting the polygon in a bounding box and using the box for
  21. tests, if the polygon was sufficiently complicated).
  22.  
  23.  
  24. >(Sorry, I missed one step between steps 2 and 3: you have to rotate
  25. >the polygon and the intersection point so that all the polygon vertices
  26. >and the intersection point have the same z coordinates, since the point-in-
  27. >polygon test in RTNews works only for 2D point and polygons.
  28.  
  29. You don't need to rotate:  just throw away one of the coordinates of the
  30. triplet (this is equivalent to casting the polygon onto one of the XY, YZ, or
  31. XZ planes).  The best coordinate to throw out is the one with the maximum
  32. absolute value for the normal components of the plane.  For example, if the
  33. plane's normal was (-1,-5,2), throw away the Y component (i.e. use the XZ
  34. plane for casting).  This ensures that you don't cast the polygon onto a plane
  35. perpendicular to its normal, which turns the polygon into a no-area beastie.
  36.  
  37. Eric Haines
  38.