Function prototypes
void gluperspective ( gldouble Fovy, gldouble Aspect gldouble Znear, gldouble Zfar)
First you have to set the gluperspective to see what its parameters mean.
Fovy, this most difficult to understand, my understanding is that the eyes open angle, that is, the size of the angle of view, if set to 0, pretty close your eyes, so nothing to see, if 180, then you can think of your vision is very broad,
aspect, this good understanding, is the actual window aspect ratio, namely X/y
Znear, this one, represents you near, the cutting surface,
Zfar, representing the distant cutting surface,
If you don't understand it, keep looking.
We know that things in the distance look smaller, things that are near are bigger, that's the perspective principle.
As shown
Assuming that the two lines represent highways, in theory, their two sides are parallel,
But in reality, they always intersect at a point in the distance (infinitely far),
The length of the actual line AB is =CD, but in this case the perspective angle is used, it will be like the effect, is not very close to the reality of the situation?
Combining the two functions we just
Znear, the distance from the eye distance, assuming 10 meters away, please do not set to negative, OpenGL is silly, do not know how to forget,
Zfar represents a distant cutting surface, assuming a distance of 1000 meters,
Is the meaning of these two parameters,
and explain what that "eye-opening angle" means,
First, let's say we are now 50 units away from the object,
At the eye opening angle set to 45 o'clock, see the big screen:
We can see a ball in the distance, and it's fun, huh,
Now let's open our eyes and set the eyes open angle to 178.
(180 degrees for the boxer, then we will see nothing, eyes open too big, eyes are not God)
We only see one point,,,,,,,,,,,,,,,,,,,,,,,,,,,
Because we are looking too large, the size of the ball itself has not changed, but it is too small in our "horizon",
Conversely, we will close the eyes, change to 1 degrees to see what will happen?
In our distance from the object 3000, "Eyes open angle" for 1 o'clock, we seem to walk into the ball, this is not similar to the camera's focal length?
When we set the perspective angle to 0 o'clock, we are the equivalent of closing our eyes and the world is quiet.
We can't see anything ... .........
Go to: http://www.cppblog.com/COOOOOOOOL/archive/2009/12/28/104255.html
The gluperspective function of OpenGL [go]