Scientists are looking to stingrays, which slide through the water like a vertical blade, for inspiration in designing the next generation of efficient submarines. While most fish use a back-and-forth tail wag to propel themselves through the water, the researchers explain in a release, stingrays employ an elegant ripple motion to glide through their environment.

To figure out how the stingrays do this, the team turned to algorithms developed in the field of computational fluid dynamics. This allowed them to map the way water behaves when it encounters the stingrays motions, and to calculate a critical variable called the “QCritera”—the vortices of waves around the animal’s body. These vortices, the team found, “create a low pressure field in front of it, and high pressure near its back end,” Popular Science reports. “This moves the fish forward without it having to expend much energy.”

While stingray look-alike submarines are still years away, cracking the underlying physical and mathematical principles behind those animals’ movements is a first step to building such a machine, the team points out.

Here’s a visual of how this phenomenon works:

More from Smithsonian.com:

These High Tech Cocktail Garnishes Take a Hint from Plants and Animals

How Nature Makes Us Smarter