For turtles, lying belly-up is a helpless, life-threatening situation.

Now it appears many turtles evolved shells with unique shapes to easily help them flip back onto their bellies if they find themselves on their backs.

"Before starting this project, I always thought animals such as turtles worked hard to right themselves, and what this showed was this need not be the case—they can just have a good shape for their shell that does most of the work," applied mathematician Peter Varkonyi at the Budapest University of Technology and Economics in Hungary told LiveScience.

Turtle shells come in all shapes and sizes. Aquatic turtles with flat shells well-suited for swimming often right themselves by pressing their heads against the ground with muscular necks, levering themselves onto their bellies. However, if land turtles have high-domed shells, which offer better protection against the snapping jaws of predators, their necks and limbs may not be long enough to reach the floor and gain any leverage.

Varkonyi and his colleague Gabor Domokos investigated whether such high-domed shells had a special geometry that helped turtles right themselves. They developed simple mathematical models of turtle shells by analyzing 30 shells from 17 aquatic and terrestrial species.

The researchers found the height, width and curvature of high-domed turtle shells was close to optimal for self-righting. The way these shells balance turtle weight makes it easy for the reptiles to roll back onto their bellies with just a little effort, such as bobbing their heads or feet.

"We'd like to see if there are beetles like this also," Varkonyi said.

The findings are detailed online Oct. 17 in the journal Proceedings of the Royal Society B.