The scaling of uphill and downhill locomotion in legged animals.