HomeOptics & LightIbn al-Haytham's Pinhole Camera (Qamara) — 2D Ray Bench

Ibn al-Haytham's Pinhole Camera (Qamara) — 2D Ray Bench

Interactive 2D optical-bench diagram of Ibn al-Haytham's 11th-century qamara: drag the object and screen along the axis, resize the pinhole, and watch straight-line rays build an inverted, rescaled image while a live chart plots how the blur diameter grows with aperture size.

Optics & Light2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-islamic-golden-age ↗ Open standalone

In the 11th century, Ibn al-Haytham used a darkened chamber with a small opening — the qamara — to prove experimentally that light travels in straight lines and that vision works by light entering the eye, overturning a thousand years of extramission theory. This 2D optical-bench diagram rebuilds that experiment: a lit "F"-shaped object stands to the left of a wall pierced by an adjustable pinhole, and every ray that survives the aperture is traced onto a screen on the right, forming a real, inverted, rescaled image exactly as similar-triangle geometry predicts. Drag the object or screen directly on the diagram (or use the sliders) and resize the aperture; live readouts track magnification, image height and geometric blur diameter, a ray-bundle mode reveals the penumbra cones, and a strip chart plots how blur grows linearly with aperture size.

⚙ Under the hood

Interactive 2D optical-bench diagram of Ibn al-Haytham's 11th-century qamara: drag the object and screen along the axis, resize the pinhole, and watch straight-line rays build an inverted, rescaled image while a live chart plots how the blur diameter grows with aperture size.

opticscamera-obscurahistory-of-scienceray-tracingislamic-golden-agegeometric-optics2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)