Have you ever wondered why your cat's eyes have those creepy vertical slits for pupils? A new study suggests the reason may lie in cats' preferred mode of hunting.

Vertical-slit pupils are most common among nocturnal predators that ambush their prey, according to the new research, published today (Aug. 7) in the journal Science Advances. Most likely, this pupil shape provides the sharpest way to gauge distance for a prey-snatching leap, the study found.

The new research doesn't only demystify the housecat, however; it also reveals that the bizarre horizontal, rectangular pupils sported by goats and sheep likely help these prey animals scan the horizon for predators — and watch the terrain when sprinting from danger. Moreover, circular pupils tend to be found on tall, active predators that are awake during the day. (Sound familiar, humans?) [Video: Why Goats Have Rectangle Eyes]

Cat's eye

The observation that predators tend to have vertical pupils and prey horizontal ones dates back to the 1940s, but no one had ever quantified that difference, said Martin Banks, a vision researcher at the University of California, Berkeley. To find out if there was truth behind the casual observations, Banks and his team assembled a database of 214 land-based species. Then, they analyzed the pupil shape of each species in relation to the animal's foraging habits and day or nighttime activity. (The team left out birds and fish in order to limit the complications of varying visual environments.)

Ambush predators, like many cats and snakes, were most likely to sport vertical-slit pupils, particularly when those animals were active at night. The reason for this correlation most likely has to do with the mechanics of the eye, Banks told Live Science. Ambush hunters need to be very good at gauging depth so they can effectively leap out at their prey.

There are two ways to gauge depth without moving. In one method, stereopsis, the brain compares the distance between the two images returned by each eye to gauge depth. (Hold out your finger, focus on it and close each eye in succession. That "jump" you see is the distance used in stereopsis.) [Images: See the World From a Cat's Eye]

The other method, blur, takes advantage of the fuzziness of objects behind and in front of the spot on which you're focusing.

As it turns out, the side-to-side displacement used in stereopsis is easier to gauge using vertical lines and contours than it is with horizontal ones. Thus, Banks said, the vertical pupil provides the best view for stereopsis.

To judge horizontal distances, though, cats and other slit-pupil predators likely use blur, Banks said. To maximize blur, the pupil must open wide. And to maximize blur for horizontal lines, the pupil must open wide from top to bottom. In other words, the ideal shape is narrow horizontally and wide vertically — precisely the arrangement of a cat's eye.

"This is the right arrangement to maximize stereo and blur as cues to distance simultaneously," Banks said.

Pupils for prey

On the other side of the spectrum are the weird rectangular pupils of goats, sheep, horses and some toads. Banks and his colleagues found that, of 42 herbivorous prey animals in their database, 36 had horizontal pupils. To find out why, they created a computer model of a sheep's eye and measured its optics. [Vision Quiz: What Can Animals See?]

To expand their field of vision, sheep and other grazing prey animals sport horizontally elongated pupils. (Image credit: Gordon Love, Durham University)

The results revealed that a horizontal pupil minimizes input from above and below, and maximizes input from the front and back of an animal, creating a panoramic view. Plus, most of these prey animals have eyes on the sides of their heads, further improving that view.

"It allows them to see better in front and behind, and maybe not to be dazzled by sunlight from above," Banks said.

Even more interesting, Banks said, was the discovery that these pupils also minimize the blur of horizontal contours, creating a sharper image of the ground and upcoming terrain. That's pretty important for an animal that might need to drop everything and run if a mountain lion pounces — especially an animal with its eyes on the side of its head, Banks said.

"Imagine your eyes were looking 70 degrees [off] from where you're running," he said. "You'd be terrible at it."

Partway through developing this theory, Banks and his colleagues realized they might have a problem, he said. A goat's horizontal eyes would have to stay in line with the horizon for the animal to benefit from this additional clarity. If the animal's pupils didn't line up when it was grazing, head down, "there goes our idea," Banks said.

He "dashed off" to a local zoo while one of his colleagues headed to a farm near his home in England, each with a video camera in hand. What they saw put their theory back in the game: Goats, sheep and horses all rotate their eyes — one clockwise and one counterclockwise — to keep their pupils in line with the horizon when grazing.

Banks could find no reference to this talent in the scientific literature but said he and his team "kind of doubt" they discovered it. "I can't imagine that this missed everyone's attention for the last couple hundred years," he said.

Eye evolution

If vertical pupils are for hunting and horizontal pupils are for fleeing, where does that leave round pupils like the ones humans have? Those results, Banks said, are a bit less clear. Animals with round pupils tend to be active predators or foragers that are awake both day and night. But the correlation between pupil shape and these traits was not as strong as it was for vertical and horizontal pupils.

Finally, the researchers created some family trees of cats and canids (a group that includes dogs and foxes), to find out whether pupil shape evolved only once in these families or whether it pops up independently on multiple occasions. They found that strange pupil shapes have evolved many times.

"It's just kind of come and gone depending on their niche," Banks said. "We think that whatever pressure there was to evolve a certain pupil shape happened multiple times, not just once."

Distance judgments aren't the only reason animals might evolve a certain pupil shape, Banks added. Other factors, such as color vision and pattern recognition, probably play a role.

The researchers now want to study the interaction between the retina and the pupil, particularly in horizontal eyes. Many animals with horizontal pupils have a "smear" retina, Banks said, with higher densities of light receptors in a horizontal streak across the retina. (Humans, by contrast, have a circular area called the fovea that is particularly dense.)

The team also wants to look at even odder eyes. Some lizards, for example, have pupils that narrow into three or four vertically stacked pinholes. Cephalopods like cuttlefish have truly bizarre, "W"-shaped pupils. And some skates and rays have pupils shaped like crescent moons.

"There are a lot of really weird ones out there," Banks said.

Follow Stephanie Pappas on Twitter and Google+. Follow us @livescience, Facebook & Google+. Original article on Live Science.