How can I convert lines intersecting a plane into a focused image?

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).

Thanks

-
Is this more appropriate on SignalProcessing.SE? –  Zev Chonoles Oct 26 '11 at 21:37
You need to know how far the object is from the plane and then project the photons back in the suitable direction that distance. If you don't know the distance you have to experiment with different distances until you find a satisfactory one. –  Henry Oct 26 '11 at 22:01
@Henry, thanks for the response, but why do you need to back project to the object? Your eye doesn't send rays out to an object. Instead, rays from the object pass through the lens of your eye, have their direction changed based on where they hit the lens and their angle of incidence, and then hit your retina. I don't have access to the geometry information, just the photons, so I can't perform back projection. –  user487100 Oct 26 '11 at 22:10
Your eye has a lens to make the diverging photons from a single point converge; the lens changes as you focus different distances. But you said you did not want to simulate a lens. –  Henry Oct 26 '11 at 22:21
@Henry I'm sorry, I should have been more clear. I don't want to let the physics of the particle transport code simulate the lens (via refractive index etc). I want to use a mathematical formula to simulate what the lens would do. –  user487100 Oct 26 '11 at 22:37