title: How to change 3d point to 2d pixel location?
body: <p>Assume that the camera is located at (0,0,1) point looking into the origin. -z direction is going into the screen. Objects beyond z = -100 are not visible ( far viewing plane). At the far viewing plane x and y are clipped at 100 at right and -100 at left for x-axis and likewise for y-axis.</p>
  
  <p>The viewport window is 600 pixel wide and 300 pixel height. On the 2d pixel coordinates (x2d, y2d), (0,0) is the top left corner, x2d increases to right and y2d increases going downward.</p>
  
  <p>Given above parameters, what are the formulas that calculates (x2d,y2d) given a point (x,y,z)? Each 3d point maps to a pixel unless 3d point is clipped ( not visible in the viewport).
  Assume perspective projection.</p>
  
  <p>Please don't provide a link that talks about the theory of 3d projections. I am looking for specific  solution to this specific problem with the given parameters.</p>