# Thin Lens camera model

This topic is 3771 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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!

##### Share on other sites
The distance from lens to film would not change with aperture, but it would change with zoom.

##### Share on other sites
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...

##### Share on other sites
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.

##### Share on other sites
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!

##### Share on other sites
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).

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 10
• 28
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633410
• Total Posts
3011727
• ### Who's Online (See full list)

There are no registered users currently online

×