This is a tough question!

I would like to calculate how an image (a real 2D photograph) looks if I place a lens at a certain distance d1 from it and I observe it at a certain distance d2.

It is frustrating. All textbook always only treat 1D Images...

Therefore I have turnd to this wonderful community. Mybe you guys can help me, as you already did many times! :)

Geometric distorsion:

  1. Image (2D photograph)

enter image description here

  1. I place a lens at a certain distance d1 above my image and look at the lens at a certain distance d2. This is what I would get:

enter image description here

I have looked into Ray transfer matrix analysis, but I could't figure out how to compute such a distorsion of the image, which is also coherent with physics.

Image blurr:

Another effect of a lens is that things can appear in focus or out of focus depending on the focal distance f and your position d2.

  1. Image in focus d2=f

enter image description here

  1. Image out of focus d2 < f or d2 > f

enter image description here

In the end I would like to write a neat Mathematica code, in which you can import an image and based on the parameters, d1, f and d2, it will create the resulting image, including distorsion and blurr in a physically meaningfull way. :)

I would highly appreciate any help, also only partial answers! :)

  • $\begingroup$ you may check these two links to get some ideas. 1) mathematica.stackexchange.com/questions/5676/… 2) mathematica.stackexchange.com/questions/26268/… $\endgroup$ – s.s.o Oct 25 '16 at 19:20
  • $\begingroup$ It seems like you are primarily asking for help with the optics rather than the Mathematica code. Perhaps Physics is the place to start. $\endgroup$ – Simon Woods Oct 25 '16 at 21:07
  • $\begingroup$ @Simon Woods thanks for the note. I hence posted my question there too. ...but maybe some people know it here also. :) $\endgroup$ – henry Oct 26 '16 at 5:12
  • $\begingroup$ There are great open source products like Blender or POVRay that can do these things. Why not use one of those (or look at the source code if you're interested how it works)? Doing this in Mathematica is certainly possible (there's a professional package called "Optica" for that purpose), but IMO it's a large task for a SE question. $\endgroup$ – Niki Estner Oct 26 '16 at 6:22
  • $\begingroup$ @nikie thanks a lot for your idea! Yes, I agree it is a large task, but I would also appreciate just partial answers. :) $\endgroup$ – henry Oct 26 '16 at 6:44