Math perspective question

Hi, I have a very simple math question I can’t handle :

I specify my camera perspective by using
gluPerspective(fov, ratio, front, back) ;

I want to get the widht and height of my front plane using only fov, ratio, front and back, as you cans specify in a glFrustum call.

This is to perform view frustum culling using bounding spheres.

Thx in advance

Lolo

Is this not a trigonometry question? I could be wrong but I thought I’d have a go cos I need the practice

I think height = sin(fov/2) * near

not so sure about the width, still thinking about it, but could someone confirm the height for me please?

width = aspect * height,

but I’m less confident of this one, so if someone could check it…

I found by myself, here it is :

Width = Front * tan(Fov/2)
and Height = Width / Ratio

thx endo

Is that the same as mine? btw, I thought the fov was in the vertical axis, is that right?

I consider it being in the X axis so that’s why tan and no sin

huh but you seem to be right, Red book says it’s fovy… I need to change my code then

Maybe simply switching Height and Width would do I bet