The part confusing about opengl during studying the projection was that the focal length, top, left, bottom, right, wasn't declared, and it magically did it with FOV and image aspect ration. I found the wonderful maths in this amazing site, and found out how it is calculated based on FOV and focal length.
Two points I noted for my confusion was:

  • near clipping plane is the plane which limits the projected coordinates, and
  • focal length is the distance from the point of projection to the optical center( (0,0,0) in our case )

Now, the question is, is the focal length always equal to the distance of the near clipping plane from the optical center, i.e. in other words, is the image always projected on the near clipping plane (or at least in openGL)? Yet in other words, is the near clipping plane and the plane of projection the same thing just with different terms.

  • $\begingroup$ but focal length is calculated for a simulated camera with some imaginary film size. So No. $\endgroup$
    – joojaa
    Jan 25 at 17:30

For some reason most sites choose to leave the projection plane out of the visualization of the view frustum. The focal length often labeled "g" is the distance from the camera to the projection plane. The projection plane (which is blue in the attached image) is almost always placed at a distance from the camera such that the distance from the center to the top and bottom is 1. This image from the fged website shows it well: enter image description here This choice is a matter of convenience since it makes the math all work out nice and neat. As you can see the near plane can, and often is, behind the projection plane. (the green plane in the image is the near plane)

For your second confusion: One goal of the projection matrix is to force coordinates with a z value less then that of the near plane to fall outside of the near clipping region which is -1 in OpenGL. So any coordinate that has a z value less then near value will result in a z value below -1 after projection.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.