Angus Dorbie (dorbie++at++sgi.com)
Tue, 15 Jun 1999 08:29:37 -0700
In simple terms you are correct, provided your eye is in the correct
place and the screen is flat & rectangular.
BUT, actually degrees do not relate exactly to dimensions, it's a tan of
the half angle = half dimension divided by distance to the screen.
So assuming a symmetric frustum and 110 degrees by 50 degrees FOV we can
compute the screen dimensions if we know the viewer position. SO, let's
assume that the viewer is 3 meters from the screen. This means that the
screen needs to be 3*2*(tan(110/2)) by 3*2*(tan(50/2)) meters or 8.57m
by 2.80m. Obviously you can work the arithmetic the opposite way around
if you like to derive angles for a specific screen dimension.
If your viewer is off center from the screen then you should derive
angles independently for each half of an asymmetric frustum, which leads
into the next topic.
The irony is that the OpenGL interface for supplying a frustum doesn't
use these angles at all because it simply makes more sense to supply
window dimensions on the near clip. This means that you can forget FOV
completely and specify the projection matrix using direct ratios of the
measured display and viewer relationship, you never even have to convert
to degrees, just measure the display setup and pop the numbers into the
frustum, perhaps scaled by some amount. Look at glFrustum and pfFrustum.
Cheers,Angus.
-- "Microsoft's system was like a forest that hadn't had a controlled burn in decades, just waiting for one person with a match to turn it into a disaster. Melissa was Microsoft's fault. They left their system wide open to this sort of abuse, they knew it could happen and did nothing." -- Bruce PerensFor advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/
This archive was generated by hypermail 2.0b2 on Tue Jun 15 1999 - 08:29:41 PDT