# The Industry's Foundation for High Performance Graphics

1. ## about perspective projection matrix

here is from "http://www.opengl.org/sdk/docs/man/"
f=cotangent﻿(
 fovy 2
)
The generated matrix is
(
 f aspect
f
 zFar+zNear zNear−zFar
 2×zFar×zNear zNear−zFar
-1
)
and here is my matrix in question:
const float w = d_area.getWidth();
const float h = d_area.getHeight();
const float aspect = w / h;
const float midx = w * 0.5f;
d_viewDistance = midx / (aspect * 0.267949192431123f);
const float nearZ = d_viewDistance * 0.5f;
const float farZ = d_viewDistance * 2.0f;
const float nr_sub_far = nearZ - farZ;
float tmp[4][4];
tmp[0][0] = 3.732050808f / aspect;
tmp[0][3] = -d_viewDistance;
tmp[1][1] = -3.732050808f;
tmp[1][3] = d_viewDistance;
tmp[2][2] = -((farZ + nearZ) / nr_sub_far);
tmp[3][2] = 1.0f;
tmp[3][3] = d_viewDistance;
So what does this matrix represent,orth,perspertive?

2. Does an orthographic projection involve a field of view? You should find the answer in 3, 2, 1 ...

3. Yes,there is no fovy,but i can't understand the matrix usage?!

4. What exactly? Why we use matrices in the first place? How the matrices are derived? What a matrix is anyway?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•