---
title: "Loupe"
url: "https://sanyam.sh/lab/loupe"
date: "2026-10-15"
---

# Loupe

Drag the glass over the map. Pinch or use the corner to raise it.

a magnifying glass over a printed harbour map. drag it to read the print, press the map to bring it there, and raise or lower it to change how much it shows.

key insight: the glass is held at a height, never set to a magnification. a lens at `u` of its focal length shows the print `1 / (1 - u)` times its size, and the bright spot it focuses on the paper is its radius times `1 - u`, so the view grows as the spot tightens.

the map is drawn once at up to seven times the stage's size and read through mipmaps. its border is a line of microprint that only the glass at full height resolves.

- Source: https://github.com/SanyamPunia/www/blob/main/components/labs/loupe/optics.ts
