title: Convert 3D -> 2D Coordinate
body: <p>I'm working on a ray-tracer and have come up with something that I think could be quite novel, but I'm struggling with the mapping of a Vector3 to it's corresponding 2D screen coordinate. I've searched and found a couple of different takes on the subject but they always end up giving me the wrong results.</p>
  
  <p>Given:</p>
  
  <p>A perspective Camera (consisting of a vectors for position, up, right and left)
  A vector representing the 3D point in space I want to map back to the screen</p>
  
  <p>Have:</p>
  
  <p>I have a function that will take an (x,y) coordinate and a Camera object and it gives me back a Vector (x,y,z)</p>
  
  <p>Want:
  A function to do the reverse - i.e. take a 3D world coordinate and the camera and give me back the (x,y) coordinate in return...</p>
  
  <p>I've tried several methods to do this and all of them return incorrect data.</p>
  
  <p>Thank you!</p>