Invariant structure in locomotion