Saturday, March 3, 2012

Projecting a 3D world co-ordinates into 2D perspective projection Algorithm in c# windows form with source code

We imagine the object in 3D co-ordinates but drawing these object on computer screen we must have to do 2D screen projection. There are different types of projection like parallel ,oblique ,perspective and here I will show you perspective projection. I will try to describe all the procedure that transforms points in 3 dimensional space to screen coordinates given a particular coordinate system, camera and projection plane models.This discussion describes the mathematics required for a perspective projection including clipping to the projection pyramid with a front and back cutting plane. Here projection plane is perpendicular to the view direction vector so,oblique projection is not allowed.

You can download complete project from GitHub.

3D Co-ordinates System
It has the positive x-axis to the right, the positive z-axis upward, and the positive y-axis forward on the screen and origin is in middle.