Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!purdue!avr From: avr@cs.purdue.EDU (Andrew V. Royappa) Newsgroups: comp.sys.sgi Subject: Re: question on gl Message-ID: <14154@medusa.cs.purdue.edu> Date: 2 Apr 91 18:31:34 GMT References: <14144@medusa.cs.purdue.edu> <1991Apr2.150125.22972@odin.corp.sgi.com> <94881@sgi.sgi.com> Reply-To: avr@cs.purdue.edu (Andrew V. Royappa) Distribution: usa Organization: Department of Computer Science, Purdue University Lines: 37 >In article <1991Apr2.150125.22972@odin.corp.sgi.com>, dave@sgi.com (dave "who can do? ratmandu!" ratcliffe) writes: >> In article <14144@medusa.cs.purdue.edu> avr@cs.purdue.EDU (Andrew V. Royappa) writes: >> >The gl graphics user's guide says that the perspective & viewing >> >transformations transforms the perspective pyramid into the box >> >-1.0 <= x,y,z <= 1.0, to facilitate clipping. Is this in fact >> >the case, >> yep--this *is* the case -1.0 to 1.0 for x, y, *and* z clipping. >> > >actually we clip against -w and +w, where w is normally 1.0 for orthographic >projections. For perspective transformations, w is NOT 1.0, and instead of >transforming the pyramid into a unit box, we really do clip against the >pyramid. > >-------------------- > Gary Tarolli > > Huh. Well, I'm writing some simple 3D routines using X11, and decided to use the gl transformations printed at the back of the manual. After applying the MVP matrix to a line segment, I clip against -1.0<=x,y,z<=1.0. I see errors sometime even though the clip appears to do exactly what I want it do. So then, should I clip against the cube only when using the ortho projections, and against the pyramid when using perspective ? If yes, could you please give me the exact bounds of the pyramid used by gl ? Thank you both for your help. Andrew