question on gl
Andrew V. Royappa
avr at cs.purdue.EDU
Wed Apr 3 04:31:34 AEST 1991
>In article <1991Apr2.150125.22972 at odin.corp.sgi.com>, dave at sgi.com (dave "who can do? ratmandu!" ratcliffe) writes:
>> In article <14144 at medusa.cs.purdue.edu> avr at 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
More information about the Comp.sys.sgi
mailing list