Thin Lens camera model

Started by
4 comments, last by grhodes_at_work 15 years, 9 months ago
Hi all, for may raytracer I'm trying now to model a thin camera class, but I don't get a few things. What I understood is that the focal length is the distance from the lens and the film when lights coming from a point infinitely distant will focus in a single point on the film. But the actual distance from the lens and the film changes with other parameters, doesn't it? I don't understand if it changes with the aperture or with other parameters. Does it change with the zoom? I need it because (AFAIK) that way I can use the thin lens equation to get the distance where everything is in focus, to shoot rays in order to simulate DOF using the method explained in PBRT, but they directly choose that 'everything in focus' distance, while I would like to derive it from real cameras properties. But I don't know how to choose this parameter and how it is related with the others. Do you have any tipps, or a link to a good explanation? Thank you!
Advertisement
The distance from lens to film would not change with aperture, but it would change with zoom.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Thank you, but this way I still don't know at wich distance to put the film from the lens (I'm a bit confused...): that is, given the thin lens equation:

1/s + 1/v = 1/f

I should be able to find s (correct me if I'm wrong):

1/s = 1/f - 1/v

If I put my film (the v param) at the focal plane (v = f) I get

1/s = 0 -> s = infinite

As I understand it, and my math skills are embarassingly weak, this confirms the definition that at the focal length converge all rays coming from infinity. But leaves me with a lot of questions...
Well, your analysis is correct! If you put the film at exactly the focal distance, the the only object that will be sharply focused on the film is an object at an infinite distance, e.g., the situation you are describing is exactly the "focus at infinity" case! If you want to focus on an object that is closer to the lens than infinity, then your film must be further away from the lens than f, e.g., v must be > f.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Now it is clear: when I focus an object with my camera, I'm actually increasing or decreasing the distance from the film to the lens...

Thank you again!
Yes. The ratio 1/s changes significantly while the difference between f and v doesn't change much, but does change. You adjust v in such a way that the s in the equation matches the subject distance for the focal length of the lens (or, more likely in modern cameras compound lens).
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement