Created on 14 June 1997.

# The Café Wall Illusion

• Your browser does not appear to be capable of running Java applets.

## Introduction

The Café Wall Illusion was first reported by Richard L. Gregory and Priscilla Heard in 1979 [Gregory-79]. While on the way to work one day, a member of Gregory's lab in Bristol, England noticed that the front of a local café had been adorned with black and white ceramic tiles. The mortar between adjacent rows of tiles was visually apparent, and the black/white pattern was offset by half a tile width in alternating rows. The illusion it created, reproduced here, was striking enough to warrant further study.

## The interactive demonstration

When you first start this applet, a window will appear that shows a black and white staggered tile pattern in the top portion and several slider controls in the bottom. The first thing to do is to sit (or stand) back, point a relaxed gaze at the general center of the pattern, and consider the following questions.

• Are those lines really angled, or are they parallel and horizontal?
• Are the tiles really wedge shaped, or are they square?

In fact, the pattern is drawn to have square tiles and horizontal lines, but most people are inclined to see a somewhat skewed pattern in which the lines are alternately tilted slightly in one direction then the other with respect to the horizontal and in which the tiles appear to be taller on one side than the other.

### Applet controls

The applet controls provide various ways to explore the cause and the robustness of the illusion. When showing the demonstration to an audience it has proven effective to briefly discuss each control, in the order listed below, before proceeding with an explanation of the cause of the illusion. Then, if time permits, reviewing the effects of at least some of the controls in light of the recent explanation serves to solidify the viewer's understanding.

Window sizer
The location and use of this control is dependent on your particular window system, but can be used to emphasize an important feature of the illusion. If you resize the window so that only about three rows and five columns are visible, the illusion should still be quite evident. It is a sufficiently robust effect that only a few tiles are needed to create it.
You will probably want to restore the window to (roughly) its original size for the remainder of the demonstration.
Tile width, Tile height
As long as the Square switch in the lower right part of the panel is selected, these two controls are equivalent: they change the size of the tiles. When the Square switch is not selected, then the width and height can be controlled independently.
It should be clear that the illusion is present to some extent at any tile size. When the tiles are made very small, most people will agree that the effect becomes more dramatic, but also that it changes qualitatively. The tiles still do not appear square, but it is difficult to pick out angled lines spanning the full width of the panel. Furthermore, if you focus intently on a single row, it may appear as drawn, while only those above and below it suffer the illusory effect.
You will probably want to restore the tiles to their original size before continuing. Not only will they be easier to look at, but you may encounter noticeable drawing lag when a large number of tiles are displayed (depending on the speed of the computer you are using).
Square
While this switch is selected, a change in tile width is automatically mirrored in the height and vice versa. You can deselect it to demonstrate that the illusion does not depend upon the tiles being square. Both tall and thin, and short and squat tiles still generate the illusion (to varying degrees). Selecting the switch again will increase the smaller of the two tile dimensions to match the larger one.
Mortar width
This is the first control with which the illusion can be lessened or destroyed altogether (the controls above all show how persistent it is). Simply reducing the mortar width to zero will create a pattern in which only right angles and squares are perceived. (If you don't know what mortar refers to then you need to read the introduction above.) Restoring the mortar to its minimum (non-zero) width will immediately restore the illusion (if the pattern is being viewed from a distance, you may need to increase it another notch or two before the illusion will be restored).
When the width is increased substantially the tiles will again appear square (or nearly so), but you may see other unexpected effects involving the colouration of the mortar.
Row offset
This control shifts the horizontal position of every other row. As you shift slowly toward the checker-board pattern (white tiles aligned perfectly with black tiles above and below), the illusion will disappear gradually. Returning to the original configuration will restore it. In the original configuration, the bottom two lines of mortar appear as if they will converge somewhere to the left of the window. If the alternate rows are then moved left until they overlap by half a tile width on the other side, then the bottom lines will now appear to converge somewhere to the right.
Dark gray, Light gray, Mortar gray
The final part of the demonstration involves changing the intensity of the different parts of the pattern. Increasing the Dark gray slider to a position somewhat left of center, and the Light gray slider to a position just right of center should alter the image without destroying the illusion. If you then slowly move Mortar gray to the extreme left or right, the illusion should disappear even as you gaze continuously at it. Returning the slider to the center will again restore it.
Dismiss
As for all demo applets, the Dismiss button at the bottom of the applet window will remove the window from the screen. Selecting the APPLET link at the top of this page will then return it to the screen just as you left it.

## Discussion

The original paper by Gregory and Heard provides a thorough treatment of the way in which this illusion arises. It is based primarily on a concept called border locking that involves edge detection in the context of simultaneous spatial and colour registration in the human visual system.

You may also be interested in a somewhat simpler (and therefore modestly less accurate) explanation. If you look at the boundary between two dark tiles (in the default configuration), the mortar line is plainly evident. At the boundary between two light tiles it can also be seen clearly. At the boundary between a light and dark tile, however, your visual acuity simply isn't sharp enough to resolve the mortar line as a separate object. Nevertheless, it still occupies some space on the screen and your brain must somehow interpret that ``missing'' space. It therefore simply interprets the mortar as part of the tile above or below it (depending on which one is nearest the center of your field of view). When you look at a single tile, then, it appears taller at one end than the other by twice the width of a mortar line, giving it that characteristic wedge shape.

But this is only half of the story. If all of the tiles looked like wedges, then the boundary between them should appear jagged. Your brain, however, is looking for the simplest explanation that fits the evidence that is presented to it. In this case, the evidence supports the theory that the rows of tiles are separated by simple straight lines (which is reasonable because this is in fact true). The best compromise between the incompatible notions of straight lines forming the boundary between a succession of wedges is the interpretation that the lines are in fact straight, but neither horizontal nor parallel. When the tiles are made quite small, more evidence is available to refute this theory, so the appearance is qualitatively changed. Depending upon where you focus your attention, both conflicting perceptions (straight lines and rows of wedges) can be seen independently.

In light of this explanation it should be clear why the various controls alter the nature or strength of the illusion as they do.

### Implications for Computer Graphics

Consider the portion of the demonstration in which the tiles are dark and light gray (rather than completely black and white), and the mortar colour is changed slowly from black to white. (If you haven't already tried this then you might want to do so before you read further.) The illusion emerges, becomes quite strong, then fades again and disappears altogether. It is only the intensity (not even the hue) of only a tiny fraction of the pixels in the image that is changing, yet the perception of the geometry of the scene is altered considerably.

This suggests that any rendering algorithm that computes pixel colours without regard for neighbouring regions of the scene may fall prey to such unintended illusory effects. It is unlikely that so dramatic an effect as the Café Wall Illusion will be stumbled upon accidentally, but more subtle effects may nevertheless detract from the overall quality of an image.

Scott Flinn (flinn@cs.ubc.ca)