Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!apple!sun-barr!decwrl!sgi!thant@horus.sgi.com From: thant@horus.sgi.com (Thant Tessman) Newsgroups: comp.sys.sgi Subject: Re: subroutines perpec and lookat Summary: lookat thinks y is up Message-ID: <38766@sgi.SGI.COM> Date: 25 Jul 89 15:21:36 GMT References: <8907250331.AA20644@prism.gatech.edu> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 23 In article <8907250331.AA20644@prism.gatech.edu>, ccsupos%prism@GATECH.EDU ("SCHREIBER, O. A.") writes: > > > In reference to the above help message, I have straightened out > my handling of the transformation matrices. However, the twist > given to the projection does not always correspond to the one that > is input. Has anyone ever had this problem? > Thanks in advance. > Olivier Schreiber This is probably due you assuming that z is up (a perfectly reasonable assumption, one would think) but that the 'lookat' for historical reasons thinks that y is up, not z. To use lookat with geometry where z is up, you can follow lookat with rotate(-900, 'x'); and pretend that z is y and y is -z. Or you can look how the lookat matrix is built (Appendix C of the Graphics Library User's Guide, Volume II) and build your own. Hope this helps. thant@sgi.com