Illusions / Café wall
Café wall illusion
Level lines with a false tilt.
Measured from the image
Sliders
How the effect works
A café wall pattern stacks rows of black and white tiles. Each row slides sideways against the row above. Gray mortar lines run between the rows. Every mortar line is flat and level, yet the lines look like wedges, open on one side and closed on the other.
Your visual system treats the border between a light tile and a dark tile as one edge to lock onto. The sideways shift of each row pulls the mortar line a small step toward one side. The pull alternates along the line. Your brain adds the pulls together and reports a slope. Gregory and Heard named this idea border locking. Treat any single explanation as a working model.
The numbers on this page come from the image itself. The build script reads the mortar angle from the pixels and reports zero degrees for every line. Set the row shift to zero and the tiles form a plain checkerboard. The slope vanishes. Set the shift to half a tile and the slope looks strongest. A shift of one full tile puts the rows back in step, so the effect falls away at both ends of the range. The sweep table below tracks a geometric proxy for this, one row per shift value.
Measured at the default settings
Image size: 520 by 334 px. The build script read these values from the rendered pixels.
- Mortar Rows Y
- [40, 82, 124, 166, 208, 250, 292]
- Mortar Thickness Px
- 2
- Mortar Angle Degrees
- 0
- Mortar Spacing Px
- 42
- Row Shift Px
- 20
Where the effect weakens
The table sweeps Row shift as % of one tile (0 = no illusion, 50 = strongest) and scores a geometric proxy from 0 to 1: Row offset from the nearest aligned position, as a share of half a tile. The proxy comes from the image geometry. The proxy measures geometry and not perception. Your own eyes decide what you see. Rows below 0.5 are marked weak.
Weak range: 0 to 20, 80 to 100 %. Proxy at the default setting: 1.
| shiftPercent (%) | Proxy | Row Shift Px | Mortar Angle Degrees |
|---|---|---|---|
| 0 | 0 (weak) | 0 | 0 |
| 10 | 0.2 (weak) | 4 | 0 |
| 20 | 0.4 (weak) | 8 | 0 |
| 30 | 0.6 | 12 | 0 |
| 40 | 0.8 | 16 | 0 |
| 50 | 1 | 20 | 0 |
| 60 | 0.8 | 24 | 0 |
| 70 | 0.6 | 28 | 0 |
| 80 | 0.4 (weak) | 32 | 0 |
| 90 | 0.2 (weak) | 36 | 0 |
| 100 | 0 (weak) | 40 | 0 |
Try this
- Drag the row shift to zero. Watch the mortar lines keep their place while the tilt goes away.
- Set the mortar thickness to zero and see what remains of the tilt.
- Move the mortar gray level toward black, then toward white. Compare the tilt each time.
History
- Hugo Münsterberg described a version of this pattern in 1894. Source
- Richard Gregory and Priscilla Heard published "Border locking and the Cafe Wall illusion" in Perception in 1979. Source
Only facts confirmed against a source appear here. Where sources disagree, this site leaves the detail out.
More illusions
Entertainment only. Not a vision or health test.





