Whether in OpenGL, DirectX, or other 3D solutions, projection distortion is an annoying and unsightly behavior when calculating and projecting onto the screen!
1.) ... The problem of distortion when projecting 3D objects!
2.) ... Behavior when removing projection distortion!
1.) The problem of distortion when projecting 3D objects!
Using the image below as a reference, increasing the width creates a horizontal stretch. It seems very plausible that the Fov-Y angle must increase to cause a vertical stretch that fixes the proportionality of the bordered image.Here, you can clearly see how the spheres in the upper left corner are distorted. Even though this is mathematically correct, it's quite unsightly and distorts the 3D experience!
( ...see Image 1 )
GLfloat fFovy = 60.0f; // Field-of-view
GLfloat fZNear = 0.5f; // Near clipping plane
GLfloat fZFar = 10000.0f; // Far clipping plane
// Calculate viewport aspect
RECT rv;
GetClientRect(m_pMainWnd->m_hWnd, &rv);
fAspect = (GLfloat)(rv.right-rv.left) / (GLfloat)(rv.bottom-rv.top);
// Define viewport
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(fFovy, fAspect, fZNear, fZFar);
glMatrixMode(GL_MODELVIEW);
(Image-1) The projection distortion in the display! |
![]() |

2.) Behavior when removing projection distortion!
As mentioned, the field of view parameter is very important!
If you imagine your window as a physical window to the world you're viewing, and your eye as the observation point, you can imagine a pyramid. For a small window, and if you're far enough away from the monitor, the pyramid becomes very pointed: the field of view is therefore small. I'd say you probably drew with a field of view of 90-120 degrees or more, when you were actually viewing it at around 25-45 degrees (since your window isn't full screen, but rather small).
This introduces significant distortion, which is necessary to look correct when you really view your window up close.
Your perspective might simply be too strong. Try reducing the field of view angle.
In most cases, you don't know where your viewer is in relation to your image, so you have to guess. This makes choosing the field of view an aesthetic matter.
Even without projection distortion, the 3D representation will appear wrong, or even more wrong!
( ... see picture 2 )
(Image-2) Without projection distortion in the display! |
![]() |
