From the Pinhole · Lesson 1
Why does a pinhole flip the world? From the Mohist Canon to Shen Kuo
The text version of a lesson from Photography with Travis Zhang. All lessons →
In short: because light travels in straight lines. From every point of an object, only a thin bundle of light gets through a small hole, so light from high up lands low on the far wall, light from low down lands high, and left and right swap too: the result is an image that is upside down and reversed. A smaller hole gives a sharper but dimmer image, and a hole that is too small turns blurry again because of diffraction. China's Mohist Canon, the Greek Problemata, Ibn al-Haytham in Cairo and Shen Kuo in Song-dynasty China all recorded or studied this effect.
Why does a pinhole make an upside-down image?
Because light travels in straight lines. Every point on a tree outside a window reflects light in all directions. With a big window, light from the treetop and the roots mixes, and the opposite wall just looks bright. Block the window down to a single small hole, and only a thin bundle from the treetop gets through; it keeps going downward and lands low on the wall. Light from the roots passes through and travels upward, landing high. Each point leaves a small spot of light, and countless spots add up to an inverted picture.
A dark room with just one small hole like this is called a camera obscura, Latin for "dark room". Every camera today is essentially a shrunken camera obscura, with film or a sensor where the wall used to be.
Is a smaller pinhole always better?
No. A smaller hole makes smaller spots and a sharper image, but it lets in less light, so the image gets dimmer. Past a certain point, light spreads out as it passes the edge of the hole, an effect called diffraction, and the image blurs again.

In 1891 the British physicist Lord Rayleigh gave a rule of thumb for the best size in the Philosophical Magazine: the diameter is about 1.9 times the square root of focal length times wavelength.[1] For a shoebox 30 cm deep and yellow-green light at 550 nm, that gives about 0.8 mm. A numerical simulation of Fresnel diffraction made for this course, measuring how small a circle holds 80% of the light, puts the best size at around 0.5 mm.[2] So a hand-made pinhole anywhere from 0.5 to 0.8 mm works, roughly the hole a sewing needle makes. The question of how big to make the hole is still on every camera today; we call it the aperture.
Who first wrote down that a pinhole flips the image?
One of the oldest surviving records is in the Chinese Mohist Canon, a few chapters of the book Mozi, generally dated to the late 4th to mid 3rd century BC and written by later followers of the Mohist school, not by Mozi himself.[3]
The Canon has a line, 景到,在午有端, which roughly means "the image is inverted because the light crosses at a point."[4] In the usual reading, jing is the image, dao means inverted, wu means crossing, and duan is a point, that is, the small hole. The Explanations section goes further: light hits a person and goes straight out like an arrow, so light from the feet lands high and light from the head lands low, and the image stands on its head.
Was the Mohist Canon "the world's first pinhole experiment"?
There is no evidence for that claim. The text comes from later Mohists, so it cannot simply be credited to Mozi, and what survives records and explains an effect; nothing supports calling it the world's first experiment. Several characters in the passage have also been read in different ways, and editors punctuate it differently.

Why are the patches of light under a tree crescent-shaped during an eclipse?
Because every gap between the leaves is a small pinhole, and every patch of light on the ground is a small image of the sun. Normally the sun is round, so the patches are round; during an eclipse, when the moon covers part of the sun, hundreds of patches turn into crescents at once.

The Problemata, traditionally attributed to Aristotle's school, already asked why, during an eclipse, sunlight passing through a sieve, the leaves of a broad-leaved tree, or crossed fingers makes crescents on the ground.[5] Watching projected images on the ground is also one of the safest ways to watch an eclipse. Never look straight at the sun.
What did Ibn al-Haytham's candle experiment show?
It showed that light travels in straight lines, and that light from different sources passing through the same hole does not mix into a jumble. Ibn al-Haytham, a scholar living in Cairo in the first half of the 11th century, described it in his Book of Optics (Kitab al-Manazir): several candles burn at different positions outside a darkened room with a hole in the wall, and the white wall opposite shows as many spots of light as there are candles, each lined up with its candle through the hole. Cover one candle and its spot disappears.[6]

In this experiment the wall shows only spots, not an image. But today's cameras rely on exactly these two facts: thousands of rays pass through the lens at once, each takes its own path, and each lands at its own place on the sensor.
How did Shen Kuo explain inverted images in the Dream Pool Essays?
Shen Kuo said that a shadow passing through a gap in a window is naturally inverted. Writing in the late 11th century, the Northern Song scholar noted in Book 3 of his Dream Pool Essays (Mengxi Bitan) that a kite, meaning the bird of prey, flies through the sky with its shadow following it; but seen through a gap in a window, the shadow moves the opposite way: the bird goes east and the shadow goes west. The image of a pagoda seen through a window gap also hangs upside down.[7]

He also corrected an earlier Tang-dynasty book, Youyang Zazu, which claimed pagoda images turn upside down because the sea churns them over. Shen Kuo called that nonsense.
Bottom line: the inverted pinhole image depends on just one fact: light travels in straight lines. From the Mohist Canon to Shen Kuo, thinkers in East and West spent more than a thousand years recording and explaining it. At that stage the camera obscura was still mainly used to watch eclipses and to discuss optics, and the trade-off of how big to make the hole has stayed with cameras to this day.
Sources
- Lord Rayleigh, "On Pin-hole Photography", Philosophical Magazine, 5th ser., 31 (1891): 87–99. https://zenodo.org/records/1786469
- Course numerical simulation (author's own, unpublished): Fresnel diffraction integral for a circular hole, white light sampled at five wavelengths from 450 to 650 nm, screen 30 cm away.
- Chris Fraser, "Mohist Canons", Stanford Encyclopedia of Philosophy. https://plato.stanford.edu/entries/mohist-canons/
- Mozi, "Jing Xia" (Canon B) and "Jing Shuo Xia" (Explanations B), Wikisource edition. https://zh.wikisource.org/wiki/墨子/經下 ; https://zh.wikisource.org/wiki/墨子/經說下
- [Pseudo-]Aristotle, Problemata, Book XV, trans. E. S. Forster, Oxford: Clarendon Press, 1927. https://archive.org/details/workstranslatedi07arisuoft
- A. Mark Smith, ed. & trans., Alhacen's Theory of Visual Perception, Transactions of the American Philosophical Society 91 (2001), p. 379, §6.85.
- Shen Kuo, Mengxi Bitan (Dream Pool Essays), Book 3, "Bianzheng 1", Wikisource edition. https://zh.wikisource.org/wiki/夢溪筆談/卷03
Compiled by photographer and photography lecturer Travis Zhang from the course script; every fact is checked against the sources.