Next time you want to find out whether a species is a predator or prey animal, take a look at the eyes.

A vertical elongated pupil, such as the kind you might find on a domestic cat, suggests that the animal is a predator that is active during the day and night, and who is likely close to the ground. A round pupil is more likely for predators that are active during the day. A horizontal pupil, like the kind you would see on a goat, cow or horse, suggests that the species is a prey animal that, more than likely, has eyes placed on the sides of the head rather than in front.

Why such a drastic difference between various animals? In a new study from researchers at UC Berkeley and the University of Durham in England, scientists looked at the eyes of 214 terrestrial species, hoping to learn why pupil shapes vary so much from one species to another.

They discovered that vertical and horizontal elongated pupils serve vital functions for predator and prey species, helping one to hunt and the other to flee. The ecological niche an animal belongs to is a major indicator of pupil shape.

"If an animal becomes nocturnal, they're likely to develop a vertical pupil; if they become diurnal, they have a round pupil. It's not just random," said William Sprague, a coauthor on the paper. "The changes are associated with their ecological niche."

Vertical elongated pupils were helpful for predators to gauge the distance to their prey, a skill necessary for the survival of any hunter. Objects that are closer are in sharp focus while objects that are farther away are blurred, indicating for the animal how far away something is from them.

The pupils of herbivores serve a different function. The study authors explain that horizontal pupils allow animals to see a panoramic view of their surroundings even across uneven terrain helping them to detect predators from various directions. The shape of the pupil even helps to reduce the amount of blur the animal experiences when watching a predator out of the corner of its eye.

"The first key visual requirement for these animals is to detect approaching predators, which usually come from the ground, so they need to see panoramically on the ground with minimal blind spots," said Martin Banks, the UC Berkeley professor of optometry who led the study. "The second critical requirement is that once they do detect a predator, they need to see where they are running. They have to see well enough out of the corner of their eye to run quickly and jump over things."

Perhaps one of the most interesting discoveries the researchers made about herbivores came from in-person observations. In order for horizontal elongated pupils to keep an eye on the surrounding area, they must stay parallel to the ground even when the head moves.

"To check this out, I spent hours at the Oakland Zoo, often surrounded by school kids on field trips, to observe the different animals," said Banks. "Sure enough, when goats, antelope and other grazing prey animals put their head down to eat, their eyes rotated to maintain the pupils' horizontal alignment with the ground."

The quest to learn why various animals have different pupil shapes is far from over. Next up: The scientists want to expand their research to include the eye shapes of animals that live in aquatic, aerial and arboreal habitats.