title: get uvw coordinates from pixel coordinates for ray-tracing
body: <p>I'm trying to implement a simple ray-tracing algorithm
  so the first step is to convert pixel coordinates into uvw coordinates system
  iam using those two equations that i found in a book
  <img src="https://i.stack.imgur.com/6z7IG.png" alt="enter image description here"></p>
  
  <p>where l,r,b,t are the view frustum points , (i,j) are the pixel indexes  , (nx,ny) are the scene width and height</p>
  
  <p>then to calculate canonical coordinate i use</p>
  
  <p><img src="https://i.stack.imgur.com/b6oVS.png" alt="enter image description here"></p>
  
  <p>i want to understand the previous equations and why they give uwv coordinates for perspective projection not for orthogonal projection (when i use orthogonal projection the equation still gives the result as if perspective projection is used)</p>