  Navigating our physical environment requires changing directions and turning.
Despite its ecological importance, we do not have a unified theoretical account
of non-straight-line human movement. Here, we present a unified optimality
criterion that predicts disparate non-straight-line walking phenomena, with
straight-line walking as a special case. We first characterized the metabolic
cost of turning, deriving the cost landscape as a function of turning radius
and rate. We then generalized this cost landscape to arbitrarily complex
trajectories, allowing the velocity direction to deviate from body orientation
(holonomic walking). We used this generalized optimality criterion to
mathematically predict movement patterns in multiple contexts of varying
complexity: walking on prescribed paths, turning in place, navigating an angled
corridor, navigating freely with end-point constraints, walking through doors,
and navigating around obstacles. In these tasks, humans moved at speeds and
paths predicted by our optimality criterion, slowing down to turn and never
using sharp turns. We show that the shortest path between two points is,
counterintuitively, often not energy optimal, and indeed, humans do not use the
shortest path in such cases. Thus, we have obtained a unified theoretical
account that predicts human walking paths and speeds in diverse contexts. Our
model focuses on walking in healthy adults; future work could generalize this
model to other human populations, other animals, and other locomotor tasks.
