home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16600 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.4 KB  |  34 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!wupost!gumby!destroyer!cs.ubc.ca!news.UVic.CA!csr.UVic.CA!iperrigo
  3. From: iperrigo@csr.UVic.CA (Ian Perrigo)
  4. Subject: Re: 3D coordinates conversion to 2D
  5. Message-ID: <1992Nov19.212214.27948@sol.UVic.CA>
  6. Sender: news@sol.UVic.CA
  7. Nntp-Posting-Host: ursamajor.uvic.ca
  8. Reply-To: iperrigo@csr.UVic.CA (Ian Perrigo)
  9. Organization: University of Victoria
  10. References:  <1992Nov18.164150.203294@uctvax.uct.ac.za>
  11. Date: Thu, 19 Nov 92 21:22:14 GMT
  12. Lines: 20
  13.  
  14. In article <1992Nov18.164150.203294@uctvax.uct.ac.za>, purves@uctvax.uct.ac.za writes:
  15. >
  16. >    Could anyone please give me a hint on how to convert three dimensional 
  17. >    Coordinates so it can be displayed on a screen and look right as well.
  18. >    
  19. >    Please post to this News-Group as I am using TC++.
  20. >
  21. >    Thanks.
  22. >
  23. >    
  24. I suggest you look into two techniques, parallel and perspective projection. There
  25. are many forms of these techniques, one particularly easy one is to simply
  26. lop off the Z coord (assuming you are using a right-handed coord system, i.e.
  27. Z coming out at you). This is a form of parallel projection. You still keep track
  28. of your Z coord in your "model", i.e. using it for calculations (such as rotation
  29. etc), but ignore it when displaying a point.
  30. Perspective projection gives a more realistic picture of an object by making things that are farther away (in depth or Z axis) seem smaller. 
  31.  
  32. Ian.
  33. (iperrigo@cs.uvic.ca)
  34.