I offer for your contemplation a photograph I found on a website:
credit: Keoki Stender, www.marinelifephotography.com
The basic components of this image are obvious: the camera is underwater, just below the surface of the ocean at a coral reef. The coral is easily recognized, as is the surface of the water above it. You can even see the curvature introduced by lens in the sharp edge at the intersection of the water surface-line. The green undersurface of the water is the result of internal reflection: it’s the reflection of the coral reef from the surface. You can see the sky refracted through the water surface at the upper left, along with some clouds whose images are distorted by the surface of the water.
But then there’s the shocker: the perfectly clear, undistorted sky and clouds in the upper right. That kind of image would only appear if the camera lens were above the waterline, but it’s clearly below the waterline.
I know, you think that the answer is obvious: the lens is partly submerged, and a wave of water is sweeping from left to right across the top of the lens. You think you’re pretty smart, don’t you? Here’s the flaw in that reasoning: a lens forms an image using its entire diameter. A lens in air would focus light something like this:
See how the magenta lines, representing rays of light from the cloud, converge to a tight focus at a single point on the focal plane? This is what makes an image “in focus”. If they don’t converge to a single point, then the image is out of focus. Now let’s immerse the lens in water:
The water is show in green. The water itself refracts the light in the lower ray, but not in the upper ray. Hence the lower ray strikes the lens in a different location at a different angle and therefore does not strike the focal plane at the same location as the upper ray. The image is out of focus. Thus, if the lens were partly submerged, the clouds would not be in focus.
So I wrote the photographer asking him how he took the shot, and he graciously provided a detailed answer. There were three factors I had not considered. First, the photo was taken with a fisheye lens, which has a very short focal length. Short focal lengths compress an image on the image plane, reducing any out-of-focus effects. Second, he had shut the lens down to f/11, meaning that the working aperture was only about 1 mm in diameter; this is essentially no different from a pinhole. Third, the camera was inside a waterproof enclosure with an optical dome. So here’s the correct optical diagram:
The cloud is kept in focus primarily because the lens is effectively a pinhole, and secondarily because the water is held some distance away from the lens.