I am writing a particle transport code. I would like to be able to obtain an image of my geometry when transporting photons given the following information:
The photons are incident on a plane. For every photon I know the location at which it hits the plane and the direction it is travelling when it strikes the plane.
I would like to use this information to convert this into a focused image. When a photon is incident on the plane, I would like to use it's position of incidence and its direction of travel to assign it to some pixel in an image. Of course the pixelation could come later as the result of a histogram.
I could simulate a lens with a plane behind it and then just histogram the interactions, but I would like to skip the lens simulation and go straight from plane to image.
What mathemeatical formula can I use to map from plane(location,direction) to image(location).