If there is a camera with a given fov and aspect ratio values at (0, 0, 0)
looking straight down the Z axis, and there is a triangle (x1, y1, z1), (x2, y2, z2), (x3, y3, z3)
, and the canvas is 1024*768 pixel, then how will it be calculated (in a right-handed coordinate system)? Are there any easy to understand example codes somewhere?
Asked
Active
Viewed 945 times
-1

defunct
- 81
- 1
- 7
1 Answers
2
Of course there is simple. Here on Wikipedia is all information you need: http://en.wikipedia.org/wiki/3D_projection
And if you need some code: http://codeincodeblock.blogspot.sk/2012/03/projecting-3d-world-co-ordinates-into.html
And here on stack is similar question: 3d to 2d Projection Matrix