# Why does a pinhole create an image of the Sun?

When I was a kid I happened to encounter a solar eclipse. I was taught that I should not look at the Sun directly when it is undergoing an eclipse, but I was extremely curious to see it.

Somebody suggested to me that if I created a pinhole in cardboard and place the cardboard in the Sun and managed to get the light passing through the pinhole on a screen inside the room then I could see the eclipse on the screen. I did that and I could see the eclipse on the screen.

My question is, why was I not seeing a circular illumination on the screen? But to my surprise, as the eclipse was progressing on the Sun, the illumination I saw on the screen was also undergoing the same eclipse! It means the illumination on the screen was the image of the Sun!

Why was it not a uniformly illuminated circular patch on the screen? Why was it undergoing an eclipse? The light was passing through all the portions of the hole, so why was an eclipse showing on the screen?

In summary, how does a pinhole create an image of the Sun? And not always a circular illumination?

Edit1: If we place a single point source of light in front of the pinhole then it creates a circular illumination on the screen, but if we put an extended object in front of the pinhole then it creates an inverted image of the object on the screen, how? An extended object can also be considered as a collection of infinite point sources of light. If one source produces a circular patch then infinite sources should also produce the same circular patch, just of greater intensity. The shape of the patch should not change. Why does the shape of the patch change to the shape of the object on the screen? Kindly help.

• To the reader: Kindly read all the answers below to get a complete idea. All the answers are good, but together they make the response "Complete". – Devansh Mittal Mar 20 '20 at 12:28
• Before the glass lens "pinhole glasses" were used (and can still be bought) to improve human vision: en.wikipedia.org/wiki/Pinhole_glasses There are claims that they can strengthen ciliary muscles. The key to understanding pinhole cameras is the rectillinear propagation of light ie light travels in straight lines and that reduced aperture improves contrast. You can easily test this immediately by squinting. – cousin_pete Mar 20 '20 at 14:16
• This related question about apertures on Photo.se should answer your question. – BlueRaja - Danny Pflughoeft Mar 20 '20 at 21:05
• Camera obscura – Aaron F Mar 21 '20 at 10:10

Let us start from the basics. Consider a point source of light placed on the principal axis of the pin hole camera as shown in the diagram below:

The point source produces a circular illumination on the screen. Now let's displace the point source towards $$D$$ from the centre as shown below:

The circular illumination also moves away from the centre but in the opposite direction i.e., towards $$d$$. For the time being let us assume the displacement of the object is small compared to its distance from the pinhole. So that we can still consider the illumination on the screen to be nearly circular for the sake of simplicity. I've shown the displacement along one direction. But similar phenomenon happens for displacements in all other directions perpendicular to the principal axis. I'll leave it to your imagination to play with the system.

Now, let's consider an extended object which consists of four point sources of light as shown below:

The circular illumination due to the central yellow point source is also at the centre. But for off-centred red, green and blue point sources, the illumination is also off-centred as per our previous result. The corresponding inverted image formed is also shown above.

It's not necessary for the extended object to be made of point sources emitting different colours (wavelengths to be more precise). I've just coloured them differently to make the point clear.

Sun is not a point source and is an extended body which contains infinitely many point sources. Similar arguments can be used to explain why we observe the image of eclipse instead of a circular patch of light.

To witness the solar eclipse of December 26, 2019, I too made a pin hole camera and the image of the eclipse is shown below:

Don't get puzzled by the three images of the eclipse numbered one, two and three. I just made three circular holes each of different diameters ($$r_1) to check which one gives the best result.

As explained by Farcher in his answer, there exists an optimum pinhole diameter for a given wavelength of light and distance of the pinhole from the screen. If the pinhole is too small, then the diffraction effects would become significant. Also the intensity of the image decreases with the decrease in the pinhole size. When we increase the pinhole size, the intensity increases, but at the same time the image becomes more blurred as the circle of illumination grows in size. With the given order of pinhole sizes you could also verify this from the image above (although the difference between the second and third image is not that pronounced in this image).

As per the Wikipedia article on pinhole camera the optimum diameter $$d$$ of the pinhole is given by the following expression:

$$d=2\sqrt{f\lambda}$$

where $$d$$ is pinhole diameter, $$f$$ is focal length (distance from pinhole to image plane) and $$\lambda$$ is the wavelength of light.

Image courtesy: My own work :)

• In your image from 2019, what were the three pinhole sizes that you used? (From what you posted, it appears that #2 was best.) – Mitchell Spector Mar 21 '20 at 16:15
• @MitchellSpector: All the three pinholes were less than a millimetre wide. I wasn't able to measure the exact diameter as I didn't have any instrument with least count less that the maximum size of the pinholes. For curious readers, I did a reverse calculation. For $f=40\,\mathrm{cm}$ and $\lambda=500\,\mathrm{nm}$ (I chose this value of wavelength because it was close to the maxima in this plot) the value of $d$ turns out to be $0.89\,\mathrm{mm}$. This is the optimum value of the pinhole size for given parameters. – user14250 Mar 22 '20 at 3:36
• I agree that the image 2 was the best. Based on my observations, I suspect that the size of hole 2 was close to the optimum value than 1 and 3. Also, I think the optimum value lies in between the sizes of holes 2 and 3 as the sharpness of corresponding images are almost similar. – user14250 Mar 22 '20 at 3:41

The important thing is that it is a small hole in the cardboard.

(image from Wikipedia (German) - camera obscura)

Therefore every point of the original (the sun) produces a small spot on the screen. So you get a fuzzy image of the sun on the screen.

• If we place a single point source of light in front of the pinhole then it creates a circular illumination on the screen, but if we put an extended object in front of the pinhole then it creates an inverted image of the object on the screen, how? An extended object can also be considered as a collection of infinite point sources of light. If one source produces a circular patch then infinite sources should also produce the same circular patch, just of greater intensity. The shape of the patch should not change. Why the shape changes to the shape of the object on the screen? Kindly help. – Devansh Mittal Mar 20 '20 at 5:34
• @DevanshMittal Objects are not infinite point sources of light. You push the abstraction too far, and get nonsense in return. Try it the other way around - represent the whole object with a small finite amount of "point" sources of light. Trace each of those sources to a spot on the screen. Now see what happens when you change the size of the pinhole or the amount of "light rays". Also note what happens when you move the object closer or further away. – Luaan Mar 20 '20 at 11:17
• @DevanshMittal Alternative explanation: if you place a single point source of light in front of the pinhole, you get a circular illumination on the screen. But if you move the point source around, the circle on the screen moves around, too -- and in the opposite direction that the point source moves. So now, when you have an object that's an infinite collection of point sources, you get an infinite collection of circular illuminations, but all at different locations -- and those locations are arranged in exactly the same shape as (the inversion of) the original object! – Daniel Wagner Mar 20 '20 at 11:54
• @DevanshMittal Objects are not point sources... You said an extended object can be considered as a collection of point sources. The point sources are not all in the same place! – user253751 Mar 20 '20 at 13:20

The images which I remember are the following

which show that there is an optimum size for the pinhole but never is the image as sharp as you might expect from that which is formed using a lens..

If the hole is too small diffraction becomes significant so that the final image becomes blurred.

If the hole is too big the final image also becomes unacceptably blurred.
To explain this consider the following diagram with there being three very small pinholes $$X,\,Y$$ and $$Z$$ and ignore diffraction effects.

Only a narrow cone of rays (red) which start off from point $$A$$ on the object can pass through pinhole $$X$$ and arrive at the screen to form image $$a''$$ with the image, $$b''$$, of the bottom of the object, $$B$$, being formed by the rays which also pass through pinhole $$X$$.
Images $$ab$$ and $$a'b'$$ are formed by small pinholes $$Y$$ and $$Z$$ but in different places on the screen.

If the hole is of size $$XZ$$ you can consider it as a series of very small pinholes from $$X$$ to $$Z$$ and producing a series of overlapping images between images $$a''b''$$ and $$a'b'$$

As the hole $$XZ$$ gets smaller and smaller there are still overlapping images but the overlap is less and less until an image is formed which is a fair reproduction of the object because the overlap is relatively small compared with the size of an image formed by a very small pinhole ignoring the effects of diffraction.

• If we place a single point source of light in front of the pinhole then it creates a circular illumination on the screen, but if we put an extended object in front of the pinhole then it creates an inverted image of the object on the screen, how? An extended object can also be considered as a collection of infinite point sources of light. If one source produces a circular patch then infinite sources should also produce the same circular patch, just of greater intensity. The shape of the patch should not change. Why the shape changes to the shape of the object on the screen? Kindly help. – Devansh Mittal Mar 20 '20 at 5:33
• @DevanshMittal in terms of my answer a single point source of light will produce a fuzzy spot on the screen. The degree of fizziness will depend in the size of the pinhole.if the pinhole is very large there will be a lot of fuzziness and the image will be an ill defined circular patch of light. As the pinhole gets smaller the size of that patch of light will decrease and it’s edge will become much more pronounced. – Farcher Mar 20 '20 at 6:08
• Sir, Shouldn't a circular patch be formed independent of the size of the hole? Why the size of the hole matter? – Devansh Mittal Mar 20 '20 at 6:13
• Are you trying to say that if size of the hole is greater then multiple light rays from the same point source can pass through it and hence multiple illuminations of the same point source will appear on the screen, and hence the shape will appear circular but if the hole is small then only single light ray will pass through the hole and will form only a single image of one point? – Devansh Mittal Mar 20 '20 at 6:16
• @DevanshMittal Some spots on the screen will receive more light than others. The result is not a circle - there's a circle of maximum intensity in the middle, and around that is a progressively diminishing amount of light. To get a circle, you need to perfectly focus the light (and of course, you never get perfect focus). In a pinhole camera, the only focusing mechanisms you have are 1) distance to object and 2) size of the pinhole. Of course, getting an image of the Sun is rather easy, since it's just so damn far away :) And then there's projection distortion. – Luaan Mar 20 '20 at 11:21

If we place a single point source of light in front of the pinhole then it creates a circular illumination on the screen, but if we put an extended object in front of the pinhole then it creates an inverted image of the object on the screen, how? An extended object can also be considered as a collection of infinite point sources of light. If one source produces a circular patch then infinite sources should also produce the same circular patch, just of greater intensity. The shape of the patch should not change. Why the shape changes to the shape of the object on the screen?

That's almost correct, but not quite.

You're right that a point source will create a (very small) circular image on the screen. You're also right that a large object is essentially an infinite collection of point sources.

Your mistake is in thinking that an infinite collection of point sources ought to produce a single circular image. Actually, an infinite collection of point sources will produce an infinite collection of circular images on the screen. Moreover, the circular images will all be in different locations on the screen. Together, these infinitely many tiny circular images, all in different locations, form an image of the object.

• Yes. Thanks for pointing it out. I realized my mistake after Guru Vishnu's response. – Devansh Mittal Mar 20 '20 at 16:36
• And because they're all tiny circles rather than points, the image will be slightly blurry. – Mark Mar 20 '20 at 21:48

this effect is called the pinhole camera, it functions as follows:

The sun is an extended object, every point of which is radiating light. If we send that light through a tiny aperture, then from each point on the sun only a single ray can make it through the pinhole, and an inverted image of the sun will be formed on a screen behind the pinhole. By tracing all the sun's rays that make it through the pinhole you can see that the pinhole acts just as if it were a (primitive!) lens.

• If we place a single point source of light in front of the pinhole then it creates a circular illumination on the screen, but if we put an extended object in front of the pinhole then it creates an inverted image of the object on the screen, how? An extended object can also be considered as a collection of infinite point sources of light. If one source produces a circular patch then infinite sources should also produce the same circular patch, just of greater intensity. The shape of the patch should not change. Why the shape changes to the shape of the object on the screen? Kindly help. – Devansh Mittal Mar 20 '20 at 5:34
• look up "camera obscura" or "oscura" on wikipedia. -NN – niels nielsen Mar 20 '20 at 7:06
• @DevanshMittal You would not get a circular illumination on screen form a pure single point of light - you would get a single point on the screen. But in the real world you cannot get a light source with zero width and height. So if you approximate a circular point with for example the sun you will get a circular image on the screen that is the image of the circular sun. If you approximate a circular point with a lightbulb instead you will get a lightbulb shaped image of the lightbulb – slebetman Mar 20 '20 at 11:27