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

Related simulators

Continue with similar topics in this category — or all 50 in Optics & Light.

View category →
FeaturedSchool

Lens Simulator

Launch Simulator

Converging and diverging lenses with ray diagrams and image formation.

NewSchool

Coffee-Cup Caustics

Launch Simulator

Parallel beam, circular cup segment, reflected-ray density on a table line.

NewSchool

Fermat's Principle

Launch Simulator

OPL = n₁AP+n₂PB vs hit point; minimum = Snell path.

NewUniversity / research

Fourier Optics 4f System

Launch Simulator

Object → lens → Fourier plane → spatial filter (low/high-pass) → lens → image; 2D FFT with circular aperture in spectrum.

NewSchool

Rainbow in a Droplet

Launch Simulator

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

NewSchool

Optical Bench (sandbox)

Launch Simulator

Up to 4 elements: thin lenses, vertical mirrors, wedge δ; paraxial ray trace.

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

Camera obscura: similar triangles, image size h_i = h_o · v/u.

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

About this model

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

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.