Body shape transition from the shape in water to the shape in agar.
(A) Average speed of the worm as a function of wavenumber (v) and period (T) for a given friction coefficient. The star symbol indicates the pair of (v, T) that maximizes the worm’s average speed. (B) For each environmental index σ, the pair of (v, T) that maximizes the worm’s average speed. The worm figures inside the small rectangles pointed to by the arrows represent the body shape corresponding to the respective (v, T) pair.