Frustrum Points Coordinates

I would like to get (with a fast method) the points that limits the frustum (4 for the front near plan & 4 for the front far plan)
I just would like coordinates of these point with a few instructions.
I uses for the moment, the intersection plane from the planes got by multiplying projection & modelview matrix.
But I’m not enough good in maths to get a fast solution
Yes I need to learn
But If anyone got a simple solution…

Well, you should calculate them ahead of time (whenever a new perspective matrix is calculated)and store them. So long as you’re not changing your perspective matrix on every frame, the speed is irrelevant

I have a way that I came up with for getting the points, but its kind of a hack and I’m too lazy to open my code right now. Here is the basic idea though:

Take the vector (0,0,-1) (assuming -z is in front of the viewer), rotate it around the x axis by half of the vertical FOV, rotate it around the y axis by half of the horizontal FOV, then extend that vector to the far clipping plane. That will give you the top right corner. The others are easy to find once you have the first one.

I cannot use that, 'cause I’ve got a camera and my point of view changes at each frame.
So my frustrum orientation also changes (and rotate along X and Y axis by half of fov means you are wathing along z axis (but if I’m upside down with my camera it must be different, same case with watching along Y axis or X)
I’ve already thinks about that but it leads to get lot of test to know how my camera is placed (to many special cases).

I don’t serach an iterative method, but a direct method (I uses the frustrum culling exmple from GameTutorials site: It gives a method to get planes from the frustrum, but I would like to get Points that limit my frustrum)


Ok I’ve found a simply method using glUnProject (with limits of my viewport)

It works perfectly
PS:sorry for disturbing

I use his metho in my 3D engine and it works well !