View Full Version : Image plane equation

11-07-2004, 11:20 PM
I am rendering a simple 3D object (e.g. a cube, vertices only). I need to know what is the z-coordinate value for the points lying on the image plane. OpenGL transforms the projection matrix so that the z-coordinate remains unchanged and is used in the depth buffer. Can I assume that the focal distance/z-coordinate of points lying on image plane after projection is equal to the near clipping plane value?

To sum up, my question is, how do I find out the focal length or equivalently the z-coordinate of points lying on the image plane after projection (using OpenGL projection matrix, that is)?

Thank you.


11-09-2004, 03:31 AM
Have a peek at this section on transformations:

11-10-2004, 03:49 AM

Thanks for the pointer. I found another link which answered lots of questions, I think it is very well written (it has some typos, but it explains nicely how the modelview and projection matrices are generated). I hope it will be of use to someone else as well.