The basic principle of a camera is that the light from the subject passes through a tiny hole. The size of the hole combines with a simple law of physics to flip the image vertically and focus it on a point a short distance from the hole; in the camera, the so-called “focal plane”, at which point the film or digital sensor is placed. The smaller the hole, the greater the sharpness and detail of the image, as those who have ever tried taking a photo with a pinhole camera can attest. This principle applies to all regular cameras, as well as the camera obscura.
The principle works with pretty much any hole and the point was perfectly demonstrated the other morning at home, when the rising sun shone through the small holes in the mounting of our window blinds. The angle of the sun caused a tiny but very clear projection of the mountains and sun itself on our bedroom wall, reversed vertically. It was fascinating to watch the sunrise backwards: it began as a tiny dot, before rising over the mountain ridge and becoming larger and larger on the wall.