🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.sgi.graphics
3 messages
3 total messages Started by Tim Hall Wed, 30 Dec 1992 01:06
Perspective
#22
Author: Tim Hall
Date: Wed, 30 Dec 1992 01:06
25 lines
1433 bytes
How is the perspective matrix computed in GL?  I'm familar with the
Foley / Van Dam stuff where the diagonal is 1's and then using 1/d
(d = distance to viewing plane) etc. etc.  I just assumed that this
would be the case after calling "perspective" and "d" would be found
from the view angle.  However this was not the case as the values
in the diagonal where not all 1.  (Doing a getmatrix after a perspective
call).

Anyhow, why I ask and have the attention of all you graphics people, is
because I've been trying to match up the images from my raytracer to the
images produced using the GL.  For small view angles the images match up
fairly well.  For large viewangles my images are slightly larger.  Sort
of like the eye point is a bit too close or the view angle a bit too small.
(Yeah I've checked out both of those)  So now I figure I'm missing a key
concept on perspective.  But it all seems so easy.........

Thanks.



-- 
-Tim Hall
I felt the water coming up to my chin, up to my nose.  When I woke up
my body was all greasy from the holy oil.  I remember being disappointed
I was still alive.  -Harry Call
Re: Perspective
#26
Author: Kurt Akeley
Date: Wed, 30 Dec 1992 18:19
29 lines
835 bytes
-- 

I believe this is how the perspective matrix is computed:

	cot(fov/2)
	----------	0	0	0
	 aspect


	    0	    cot(fov/2)	0	0


			    near+far
	    0		0   --------	-1
			    near-far


			    2.far.near
	    0		0   ----------	0
			     near-far


Clipping is then done to:

	-w < x < w
	-w < y < w
	-w < z < w

-- Kurt Akeley	    kurt@sgi.com  (415) 390-3612  M/S 7U-550
Re: Perspective
#31
Author: Jean Favre
Date: Thu, 31 Dec 1992 16:01
25 lines
982 bytes
In article <1hsp6vINNql6@fido.asd.sgi.com> kurt@cashew.asd.sgi.com (Kurt Akeley) writes:
>-- 
>
>I believe this is how the perspective matrix is computed:
>
>	cot(fov/2)
>	----------	0	0	0
>	 aspect
>
>
>	    0	    cot(fov/2)	0	0
>
> [stuff deleted...]

Shouldn't this be "cot(fov/20)", since the fov is given in tenths of degrees?
Page C-4 of the Graphics Library Programming Guide shows the same matrix
Kurt Akeley typed in, except for this typographic error.

I'm just trying to help.
Good luck.

-- 
Jean M. Favre. EE&CS Dept. The George Washington University
		(202) 994 5917
		favre@seas.gwu.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads