Why do the eyes of some animals, including goats, have horizontal-shaped pupils, while others, such as rattlesnakes and domestic cats, have vertical slits?

It is a question that has longed intrigued researchers, and a study of 214 species published Friday suggests the answer may be strongly linked to giving animals a survival edge: vertical pupils and circular pupils help certain predators hunt, while horizontal pupils help other species spot predators from afar.

Not all vision scientists accept the researchers’ hypothesis, however, citing examples of animals that do not fit cleanly into these classifications.

The research, which was conducted by a team of scientists from the University of California, Berkeley, and Durham University in Britain, was published in the journal Science Advances.

The team used computer models based on a sheep’s eye to support theories about why horizontal, vertical and circular pupil shapes benefit different animals.

When the model’s pupil was horizontal, more light could be captured from the left and right of the eye, not surprisingly, and less light from below and above the eye. This would allow grazing animals to better detect predators approaching from different directions, the researchers said.

“People had been saying that the horizontal pupil helps expand the horizontal view of the ground, they just hadn’t shown that,” said Martin S. Banks, a visual scientist from Berkeley and lead author on the paper. “Our contribution was to build a model and show that that happened.”

But there was an obvious caveat to this conclusion: What would happen if the sheep bent its head to the ground to eat? Logic would suggest that the horizontal pupil would become perpendicular to the ground.

But the researchers made a surprising discovery while taking pictures of goats at a petting zoo — the eyes actually rotate as much as 50 degrees when the head turns downward, keeping the pupils parallel to the ground. Dr. Banks assumed that other scientists had noted this ability, but he found no mention of it after doing an extensive search of the scientific literature.

The researchers then studied horses, antelopes and other grazing animals, and found that they could rotate their eyes as well.

Dr. Banks and his team also used the computer model to identify advantages of vertical slit eyes. They found that vertical pupils help an ambush predator better estimate the distance to its prey by sharpening depth perception and its focus on a target.

One asterisk on this explanation is that large predators like tigers and lions that ambush prey have circular pupils, not vertical. The authors reason that because these animals are taller, their eyes do not have to compensate as much for those visual cues.

Critics of the paper say there are countless examples that undermine the authors’ theories. The chinchilla, for example, eats grass but has vertical slit pupils.

“There are so many exceptions to the rules the authors think to have discovered, that there must be much more to pupil shape than being predator or prey, big or small,” said Ronald H.H. Kröger, a biologist from Lunds University in Germany.

Jenny Read, a vision scientist at Newcastle University in Britain, said the paper presented “an incredibly neat example” of how evolution and natural selection have optimized the eyes over millions of years.

She said she was most surprised by the authors’ findings about how grazing animals’ eyes rotate as they bend to eat, especially being a horse rider herself. “It’s very striking that with all the attention that animal eyes have attracted over the years that in the scientific literature no one has apparently noticed or commented on this,” she said.

Hany Farid, a vision scientist from Dartmouth College who specializes in computer imaging analysis, appreciated how the authors’ computer model used geometry and optics to show “unarguably” that a vertical slit pupil produces a better field to discern the depth of vertical structures, which would be beneficial to certain predators.