  Euler proved that every rotation of a 3-dimensional body can be realized as a
sequence of three rotations around two given axes. If we allow sequences of an
arbitrary length, such a decomposition will not be unique. In this paper we
solve an optimal control problem minimizing the total angle of rotation for
such sequences. We determine the list of possible optimal patterns that give a
decomposition of an arbitrary rotation. Our results may be applied to the
attitude control of a spacecraft with two available axes of rotation.
