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