PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Optics & Light

Other simulators in this category — or see all 44.

View category →
NewSchool

Rainbow in a Droplet

Snell in a sphere: primary (1× internal reflection ~42°) and secondary (2× ~51°, reversed spectrum); scan b/R and n.

Launch Simulator
NewSchool

Rayleigh Sky (blue)

Scattered intensity ∝ λ⁻⁴; compare blue vs red and qualitative sky gradient.

Launch Simulator
NewSchool

Inferior Mirage (hot road)

n(y) gradient above hot asphalt: rays bend — sky light looks like a wet patch.

Launch Simulator
School

Reflection

Flat, concave, and convex mirrors with auto-drawn ray diagrams.

Launch Simulator
FeaturedSchool

Refraction

Light crossing boundaries. Snell's law with angle measurements.

Launch Simulator
School

Total Internal Reflection

Find the critical angle. Fiber optics analogy.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Optics & Light/Pinhole Camera

Pinhole Camera

A pinhole camera, or camera obscura, is one of the simplest optical devices, forming an image without a lens. This simulator models its core principle: light travels in straight lines from a bright object, passes through a tiny aperture, and projects an inverted image onto a screen. The physics is governed by the geometry of similar triangles formed by the object, the pinhole, and the image. From this geometry, we derive the key relationship for image size: h_i = h_o * (v / u), where h_i is the image height, h_o is the object height, v is the image distance (from pinhole to screen), and u is the object distance (from object to pinhole). The simulator allows you to manipulate these variables—object size, object distance, and screen distance—to observe how the image changes in size, brightness, and sharpness. Key learnings include the direct proportionality between image size and screen distance, the inverse relationship between image size and object distance, and the trade-off for image sharpness: a smaller pinhole produces a sharper but dimmer image due to diffraction limits, while a larger pinhole creates a brighter but blurrier image. The model simplifies reality by assuming ideal rectilinear propagation of light, ignoring the wave effects of diffraction (except as a noted limitation), and treating the pinhole as a perfect point. By interacting, students solidify their understanding of ray optics, geometric similarity, and the fundamental parameters controlling image formation.

Who it's for: High school physics students and introductory undergraduate courses studying geometric optics, as well as educators demonstrating the principles of image formation without lenses.

Key terms

  • Pinhole Camera
  • Camera Obscura
  • Similar Triangles
  • Image Formation
  • Geometric Optics
  • Aperture
  • Inverted Image
  • Ray Model of Light

Geometry

0.45 m
2.8 m
1.6 m

Similar triangles: h_i / h_o = v/u. Rays from each object point pass through one aperture — image brightness grows with hole area but sharpness falls (geometric optics limit).

Measured values

Image height |h_i|0.257 m
Magnification |M|0.571

How it works

The pinhole model ignores diffraction: it is the cleanest introduction to image formation before lenses add focusing power.

Frequently asked questions

Why is the image upside down?
The inversion is a direct consequence of light traveling in straight lines. Rays from the top of an object pass through the pinhole and strike the bottom of the screen, while rays from the bottom strike the top. This crossing of paths at the pinhole inevitably produces an inverted image, which is a fundamental feature of any simple projective geometry.
Does making the pinhole smaller always make the image sharper?
Only up to a point. A smaller pinhole reduces the size of each light 'blob' on the screen, increasing sharpness. However, when the pinhole becomes extremely small, diffraction—the bending of light waves around edges—becomes significant. This diffraction spreads out the light, actually blurring the image again and creating colored fringes. There is an optimal pinhole size for maximum sharpness.
How is the pinhole camera equation (h_i = h_o * v/u) related to the thin lens equation?
The pinhole camera is a special, simplified case of a lens system. In the thin lens equation (1/f = 1/u + 1/v), if the focal length f becomes very large (like an infinitely weak lens), then v/u approaches a constant, mirroring the pinhole relationship. The pinhole model has an infinite depth of field—everything is in focus—because it lacks a lens's converging power, which is a key simplification.
What happens to the image brightness when I move the screen further back?
The image becomes larger but dimmer. The same amount of light from the object is spread over a larger area on the screen. This demonstrates the conservation of energy: illuminance (brightness per unit area) decreases with the square of the distance from the pinhole, a principle known as the inverse square law for light intensity from a point source.