Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!CIS.OHIO-STATE.EDU!dnwiebe From: dnwiebe@CIS.OHIO-STATE.EDU (Dan N Wiebe) Newsgroups: comp.graphics Subject: Re: World to Eye coordinate transforms Message-ID: <8912152015.AA01911@frigate.cis.ohio-state.edu> Date: 15 Dec 89 20:15:02 GMT Sender: dnwiebe@tut.cis.ohio-state.edu Lines: 19 Is your eye at the xyz origin? If it's not translate it there, along with all the other points in your world space. Once the eyepoint is at the origin, rotate all your points so that COI (center of interest--some point on your z' vector) is someplace on the positive-z half of the yz plane (rotate around the y axis). Then rotate all your points once more around the x axis until COI lies on the positive z axis (until z and z' coincide). Finally, mirror in z (multiply the z coordinate of all your points by -1). Now, if you want a simple parallel projection, you can just throw out your Z coordinate and plot X and Y on the screen. If you want perspective, you'll have to go through a perspective transform first, shrinking the far-away stuff and stretching the close-up stuff. Multiplying your x and y coordinates by a something containing a factor of 1/-z will work if you're not too picky; otherwise you need to do a bunch of cotangent calculations. But you probably know all that... Hope this helps... Dan Wiebe