title: Mapping an image on sphere and getting back the unwrapped equirectangular projection
body: <p>I'm trying to achieve the following task:</p>
  
  <p>Imagine having a 2:1 aspect ratio drawing canvas. I want to place rectangular images on this canvas (..x,y Cartesian coordinates) and as I move the image around further away from the canvas center (0,0) I want to get the distortion to the image as if it was sliding over the imaginary sphere's normals.</p>
  
  <p>The logic I believe is to convert the (x,y) 2D Cartesian coordinates of the image to the corresponding latitude, longitude spherical coordinates, and then apply the equirectangular projection to the sphere and return the image with the corresponding distortion (as if it's uvs where unwrapped in a 3D modeling package).</p>
  
  <p>There is an application doing exactly that called "HDR Light Studio" which generates equirectangular (lat/long) HDR images for 3D scene lighting purposes.
  If you check out the videos on their site you will understand exactly what kind of image distortion I'm trying to achieve.</p>
  
  <p>Please give me some help over the subject if you can.
  I have searched all around the net for info but no luck.</p>
  
  <p>Thanks in advance</p>