Which saint you see in this 17th-century painting depends on where you stand. From the left, Saint Francis of Assisi decked on his Franciscan order habit clutches a crucifix with a hand bloody with stigmata; from the right, Saint Francis of Paola holds a paper that reads “Charitas.” And looking straight on, there’s a weeping Saint Peter looking up at a blue sky where his airy halo mingles with the clouds.

The illusion is due to the raised wooden ridges that jut out from the panel, an effect known as anamorphosis. Each perspective of the piece, believed to be made in either Spain or Naples by an unknown artist, is digitized online at Art UK, a newly launched initiative from the former Public Catalogue Foundation in collaboration with the BBC to host images from hundreds of public collections in the UK. The painting is one of over 1,200 artworks available from the Wellcome Library, which include large holdings on medical history, and also curiosities like this religious trompe l’oeil, purchased by Henry S. Wellcome himself.

These “perspective” or “turning” pictures were especially popular in the 16th and 17th centuries. According to the Wellcome Library, the technique of “how to make a panel with three figures, of which only one is visible at a time” was included in the 1615 Arts of poetry, and of painting and symmetry by Felipe Nunes. Ross Macfarlane, research engagement officer at the Library, highlighted the painting in 2013 on the Wellcome blog, referencing Stuart Clark’s 2007 book Vanities of the Eye: Vision in Early Modern European Culture. In it, Clark writes that these “turning” paintings were regularly used for religious subjects, noting that 17th-century French theologian Jacques-Bénigne Bossuet stated that “anamorphic images were the perfect natural emblems of a world whose justice, hidden behind appearances, was impossible to see except from ‘a certain point’ revealed by faith in Christ.”

The most famous use of anamorphosis is the skull in Hans Holbein the Younger’s “The Ambassadors” (1533), on view at the National Gallery in London, that seems to emerge in 3D when viewed from an angle. However, it’s far from the largest. That goes to a 17th-century fresco in Trinità dei Monti at the top of the Spanish Steps in Rome, where a 65-foot landscape morphs into a portrait of one of the saints on the Wellcome Library picture: Saint Francis of Paola. You can watch the scene turn from rustic setting to saint in this video from the National Gallery of Art:

Saint Francis of Paola, notably, was known for his miracles, including prophecy and, as a devout vegan, bringing animals back to life who had been slaughtered for meat. The seemingly miraculous transformation of the fresco, as well as the Wellcome Library painting, referenced this power. Yet the science of optics was also part of this awe. Barbara Maria Stafford and Frances Terpak theorize in their book Devices of Wonder that the “anamorphic paintings may have functioned as practical lessons in mathematics and perspective for the novices of the monastery.”

While many anamorphic paintings are not religious, like this rather scandalous Venus revealed with a mirror from the West Highland Museum, many are. Andrea Pozzo’s 17th-century “The Apotheosis of St. Ignatius” fresco at Sant’Ignazio in Rome appears to descend from the church ceiling with a host of saints and angels. An anamorphic image of Saint Anthony of Padua and Jesus from the 18th century is believed to have inspired Salvador Dalí’s warped perspectives during its exhibition in 1936 at the Museum of Modern Art. The Brothers Quay in their 1991 film Anamorphosis, or De Artificiali Perspectiva also explored this fascination, focusing on the Saint Francis of Paola fresco. Each of these works emphasized that truth could not be perceived from just one angle, and that often there’s more to the surface of reality than what we can see, an idea that ripples through spirituality.

View more art from the Wellcome Library online at Art UK.