The woman is naked, leaning forward slightly on her windowsill as she gazes out over the water. There appears to be a simple mosaic of blue and brown tiles on the walls around her, tracing out the odd, jagged shape of her window.

At least, that's what the scene appears to show. But if you step backwards or squint, you see something else entirely: Abraham Lincoln's face.

There are two ways of viewing this painting by Salvador Dali, whose art belongs to the surrealist movement, which attempted to blur the line between fantasy and reality. The illusion lies in the fact that our minds can only grasp one interpretation at a time.

Gala Contemplating the Mediterranean Sea Which at Twenty Meters Becomes the Portrait of Abraham Lincoln—Homage to Rothko, 1976

Dali might be most famous for the melting watches of "The Persistence of Memory," but he was a prolific artist who also made enough paintings with illusions at their hearts to fill an exhibition in 2014.

"Salvador Dali intuited that what we construe visually as reality is the product of the habits of the mind, more than of the eye," neuroscientist Susana Martinez-Conde and her colleagues wrote after seeing the exhibit. "He understood that we create an ordered or disordered world from the intermittent and incomplete retinal information processed by your mind's experiences, desires and apprehensions."

The paintings from this exhibition, "Marvels of Illusion," illustrate how our brains fail to recreate the physical world, the researchers wrote recently in the journal Frontiers in Human Neuroscience. Many of the paintings encourage our brains to devise links between unrelated objects or to make sense of information that could be interpreted two different ways.

Filling in the gaps

Dali realized that when our minds are faced with a cluster of individual objects, we group them together if they seem to complete a whole. The Kanizsa triangle illusion is one simple demonstration of this tendency; we don't just see three Pac-man wedges, we see a triangle floating between them.

Fuss et al.

We are also on the lookout for faces. There are groups of neurons in the part of the brain called the fusiform face area that are dedicated to detecting faces. These neurons also become active when we see the illusion of a face. Such illusions happen when our brains fill in the gaps to make a face out of limited visual information, as in many accidental cases of "face pareidolia."

Dali took advantage of both of these tendencies in his paintings. In "Paranoia," figures are locked in battle above the headless bust of a woman. Our brains obligingly sketch out the outlines of her face and hair from the fighters, grouping together the men closest to us as a jawline, those on horseback as a brow, and the confusion in the background as hair.

This painting actually has a second trick; for some viewers, the woman is demurely gazing downwards, while others might spot "a wild-eyed woman with a sinister smile."

Paranoia, 1935-1936

In another painting, Dali started out with seemingly meaningless blotches of ink and gouache. He "saw" one man in Renaissance garb serving wine to another, and sketched out details to bring them into focus. But he didn't fill in all the missing information; when we see fuzzy patches like the standing man's trousers, our brains supply it for us.

La Soif, 1965

One thing or another?

Another of Dali's favorite tricks was to paint scenes that could be read two different ways.

This illusion is especially strong when the illusions involve faces. "Our brain is wired to notice, identify and discriminate facial expressions and features from minimum data," noted the researchers. "This capacity is essential to our social interactions and the reason we attribute emotions and personality to objects such as rudimentary masks and the front ends of vehicles."

Once, Dali painted a scene onto a replication of a famous bronze bust that makes our perception hover between the original sculpted face and two Dutch merchants.

Nieuw Amsterdam, 1974

In another work, he painted three scenes that could be the faces of an old man, a youth and a baby, or arches framing sand or cliffs. For most of us, our brains favor interpreting the left and middle scenes as faces, and have a harder time spotting the baby grinning on the right.

Old Age, Adolescence, Infancy —The Three Ages, 1940

This kind of ambiguous illusion can also be made by mixing high-resolution detail and fuzzier, low-resolution shapes. Dali created one such illusion in the painting of the woman looking out to sea that resolves itself into the outline of Abraham Lincoln's face.

"Once we start to recognize Lincoln's visage, our face-processing neurons contribute additional details to fill in the image," the researchers noted. "After we connect Lincoln's face to a specific group of squares, it's hard to cease seeing it."

So, can we gain anything from pondering the illusions in Dali's paintings, besides that satisfying "aha!" moment when we realize what the trick is?

The researchers argue that we can. "Illusions are—or should be—a fundamental part of the neuroscientist's toolbox to explore how the brain crease an internal representation of the external world," they wrote.

Besides, puzzling over illusions gives us a chance to interact with art in a way we don't usually get to. In Salvador Dali's world, where so many faces and bodies might be something else entirely, we are invited to choose and thus become active participants in the art we are seeing.