Every 3D point (x,y,z) is multiplied by projection matrix. Projection matrix is 4x4 so 3D vector (x,y,z) must be extended to (x,y,z,0). First two elements of result are coordinates on 2D screen. There are well-known formulas for finding projection matrix for "observer" looking at certein point...