# Projection Matrix Help

This topic is 3614 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys, For the last week or so I have been trying to create a projection matrix without success, I have read through numerous gamedev articles related to projection matrices but for one reason or another they have failed to provide a solution. I am posting this question here as a last resort and I really hope you guys are able to help me with this. This is the environment I am working in:
viewWidth   = 640
viewHeight  = 360
fieldOfView = 80
focalLength = 381
The coordinate system is a bit odd due to the fact I am working with ActionScript 3.0 here:
positive X = left to right
positive Y = top to bottom
positive Z = into the view (away from the screen)
The matrices I am working with are 4x4 and are row-based and stored as a single array. The upper-case character represents the vector, the lower-case character represents the component:
matrix[ Xx, Xy, Xz, Xw, Yx, Yy, Yz, Yw, Zx, Zy, Zz, Zw, Wx, Wy, Wz, Ww ]
Finally, I am working with euler angles. If anyone can show me (in Layman's terms) how to generate a projection matrix I would be extremely grateful. Thanks.

##### Share on other sites
Hi,

Maybe the internals of GluPerspective is what you're looking for:
Although I'm not sure how to translate focal length to zNear and zFar.

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 16
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
632928
• Total Posts
3009268
• ### Who's Online (See full list)

There are no registered users currently online

×