Re: fieldOfView (Tom Miller's Book)

From: Andreas Müller (
Date: 05/27/04

Date: Thu, 27 May 2004 09:19:54 +0200

Psion wrote:
> Hi, I've just started reading Tom Miller's book, "Managed DirectX 9
> Graphics and Game Programming". Great book by the way. I have seen
> Tom Miller respond to some on the threads so I'm posting a question
> here with the hope that he or someone else will answer it. In case
> you do have the book, I'm referring to page 16-17.
> I'm looking at the method, Matrix.ProspectiveFovLH(); The signature
> is:
> System.Single fieldOfView, System.Single aspectRatio, System.Single
> znearPlane, System.Single zfarPlane
> My question is: how do you determine what the fieldOfView angle is?
> In an example in the book, Tom writes:
> device.Transform.Projection = Matrix.PerspectiveFovLH( (float)Math.PI
> / 4, this.Width / this.Height, 1.0f, 100.0f);
> I understand the last three arguments. But why set the fieldOfView
> to " (float)Math.PI /4 ] "? Is that just an arbitrary angle chosen?
> Can one choose any angle one wants?

Not really any, but any one you see fit :-). PI/4 is a 45 degree angle,
which gives you a field of view of 90 degrees. This is a very common setting
and should work out fine in most cases.
> Thanks,
> Prince