← All animations

🎭 Optical Illusions

Your eyes don't hand your brain a photograph — they hand it raw, ambiguous signals that the brain interprets, guessing at a 3-D, well-lit world. Illusions are the moments that guess shows. Below, every illusion comes with a prove-it tool: the things claimed to be identical really are identical in the code — same RGB values, same pixel lengths — so you can confirm with a bridge, a ruler, or a colour readout that your eyes were genuinely fooled.

1. Brightness & colour are read in context

The brain judges a surface's shade relative to what surrounds it, not by raw light. That's usually smart (it lets you see a sheet of paper as "white" in shadow or sun), but it can be tricked.

Checker-shadow: square A and square B are the same grey

A looks dark, B looks light — yet they're filled with the exact same RGB. Slide the bridge across to connect them (when the same grey touches itself with no context between, the illusion collapses), move the eyedropper to read live pixel values, or hit Reveal equal to recolour everything else and leave only A & B.

A = rgb(120,120,120) · B = rgb(120,120,120)
Simultaneous contrast: one grey, two backgrounds

The two inner bars are filled with identical grey. The one on the dark field looks brighter; the one on the light field looks darker. Drag the slider to slide them together — when they meet in the middle, edge to edge, the difference vanishes.

Both bars = rgb(140,140,140)
Negative after-image: stare, then look away

Fixate the white dot for ~15 seconds while your photoreceptors fatigue, then press Look away. The colours flip to their complements — a cyan-and-magenta flag leaves a red-and-green ghost — because the tired cones briefly under-respond.

Stare at the dot, then press the button.

2. Geometry & motion — straight, equal, and still get distorted

Depth cues and edge-detectors leak into your sense of size, angle, and even motion. Each tool below proves the truth: equal lines are equal, parallel lines are parallel, and the "spinning" wheel never moves.

Müller-Lyer: the fins lie

The two horizontal shafts are drawn at exactly the same pixel length. Outward fins (>—<) make a line look longer; inward fins (<—>) shorter. Dial the fin angle, then hit Show ruler to drop a measured grid over both shafts.

Both shafts = 320 px
Ponzo: same size, "different" distance

Converging rails read as a road racing into the distance, so the brain enlarges whatever sits "further away." The two yellow bars are identical in length — the upper one only looks bigger. Adjust how steeply the rails converge.

Both bars = 220 px
Café wall: parallel lines that look wedged

Rows of offset light/dark tiles with a thin grey mortar line make the horizontal mortar lines appear to slope and converge. They are perfectly horizontal and parallel. Slide the row offset to kill the effect (at 0 offset the wedges vanish), or drop a straightedge overlay to check.

Mortar lines: parallel & horizontal
Peripheral drift: a still image that "rotates"

This wheel is a single static image — no animation, no JavaScript moving it. The asymmetric light→dark sweep around each ring tricks your motion detectors when you look past it, so it seems to creep. Let your gaze wander; stare straight at one spot and it stops. Dial the contrast that drives the effect — at zero it's plainly frozen.

Image is 100% static — nothing is animating.

3. Why your eyes "fail" — and what it reveals

None of these are flaws so much as fingerprints of the shortcuts vision uses. Light hitting the retina is hopelessly ambiguous — the same pixel could be dark paint in bright light or white paint in shadow — so the brain doesn't report raw light. It infers a stable, three-dimensional, context-corrected world, and infers fast. Illusions are engineered to push those inferences past where they're reliable.

The point of the prove-it tools: in every case the "equal" things are equal in the source — same RGB literals, same pixel lengths, a genuinely static bitmap. The disagreement is entirely between the image and your perception of it, which is exactly what makes illusions worth studying.