### Metachronal waves of legs

Have a look at this centipede walking. You can clearly see waves of legs propagating forward along the body, from back to front, as the centipede walks forward.

The motion of the legs is known as a metachronal rhythm, appearing as traveling waves caused by actions happening in squence. It's even more obvious with a millipede.

In each case, a leg in back leads the one in front.

## Is this universal?

Four-legged creatures walk this way too. A horse leads with the hind legs when walking or galloping. When trotting, however, a horse moves diagonally-opposite legs in unison and the footfalls are balanced with no leg leading, as can be seen in this video:

Try crawling on your hands and knees. When crawling at a comfortably brisk pace, you may notice your legs leading the arms. If you try to lift up an arm before lifting up a leg on the same side, you can certainly do it, but it feels unnatural.

Oddly, six-legged insects and spiders don't walk this way. Insects walk with what's called an "alternating tripod gait" with three feet on the ground at all times, alternating with the other three feet. And spiders, well, it's hard to tell from the videos I saw, but they seem to walk like two overlapping four-legged creatures, with two separate sets of four-legged gaits, although it isn't readily apparent that the rear legs in a set of four are leading the front legs of the set.

## Simulating a centipede

I wanted to simulate the ways in which a centipede can walk. I spent a few hours putting it together in OpenSCAD, a parametric script-based 3D modeling program.

Here's the first result, an anatomically-incorrect centipede walking the with the leg waves traveling from back to front, or "anterior propagation movement". Each segment has a pair of legs windmilling around like the arms of a freestyle swimmer, so that one foot on either side is always on the ground, with each foot level on the ground when the leg moves backward (to propel the centiped forward) and arcing up in a semicircle to return back to the front. The motion of legs on each segment is offset 45° in its cycle compared to the previous segment. This results in legs that are eight segments apart moving in unison.

What happens when I reverse the sign of the phase offset parameter? The centipede still walks forward, but the leg waves now propagate backward along the body; that is, the leg waves exhibit a "posterior propagation movement":

The OpenSCAD source code for both simulations can be found where I uploaded the simulation animations on Wikimedia Commons.

In both simulations, half the feet are on the ground at any given moment. Well, not exactly half, because centipedes always have an odd number of segments (as does the centipede model in my simulation), so nearly half the feet, one more or less, are always on the ground.

Comparing the two simulations, one might surmise that there's an evolutionary advantage to the back-to-front-wave walk because the feet are distributed on the ground more evenly rather than clumped together in small areas.

A disadvantage one can see with the leg waves moving backward is that when the centipede lifts up its front legs on one side, seven segments (plus the head) are unsupported on that side before the front foot touches the ground again. This overhang length is shorter with the back-to-front waves because the feet are more evenly distributed on the ground; neither side of the the head nor the tail remains unsupported for a long time or for a long length. On the other hand, there may be an advantage in having the feet touch the ground in appropximately the same place, making it easier to walk over small pebbles and twigs.

## There are both kinds

All millipedes (as far as I know) walk with waves traveling from the back to the front. So do caterpillars and other creatures with many legs. It turns out, however, that this isn't true for all centipedes. Videos I found suggest that small centipedes walk like millipedes with anteriorly-moving leg waves, but large centipedes move with posteriorly-moving leg waves.

For exmple, this centipede is walking with front-to-back (posterior propagation) leg waves:

The most notable example of posteriorly-propagating leg waves might be scolopendra heros, the giant desert centipede. Here's a 2-second video of a scolopendra walking:

This paper about the ability for a scolopendra centipede to transition from walking to swimming offers an explanation that the neural signals propagate from the head down to each segment, causing each leg further back to be delayed in its motion relative to the one in front. Intuitively, that makes sense, but it doesn't explain the more common back-to-front walk.

How is it that this front-to-back wave locomotion doesn't seem to be a common gait for most creatures?