The effect of using different lenses on depth of field and foreshortening
Depth of field is the amount of an object that is in-focus at various f-stops. This is particularly relevant in close-up photography where quite often it is necessary to use f22, or f32 to ensure all of an object is in focus.
The first two images show a section through a lens and the effect that changing the aperture (altering the size of the hole in the diaphragm) has on depth of field. Note how using a small hole (f32) increases the distance from the front to the back of an object that is in focus.
In the following 20 images you will see the effects of using different lenses at varying aperture settings (f-stops). In each of the images, the camera has been focused on the orange. You will notice that when the lens is fully open (f2.8), the cottage in the background is well out-of-focus. As the lens diaphragm is closed, making the hole smaller (f22), so the background comes more into focus. Note also that the background comes into focus sooner with a wide-angle lens than with the telephoto. In practise, if you want the background in focus, you should focus the camera on an object about one third the distance in, from the foreground object to the background.
Notice also the foreshortening effect of the telephoto lens. In the first row of images using the 400mm lens, the orange fills the windows in the stable door. Compare this with the bottom row, using the 28mm lens where the orange nearly covers the whole cottage. This effect can be put to good use in composition where the background forms an important part of your image.