  We examine the structure of the potential energy of 2+1-dimensional
Yang-Mills theory on a torus with gauge group SU(2). We use a standard
definition of distance on the space of gauge orbits. A curve of extremal
potential energy in orbit space defines connections satisfying a certain
partial differential equation. We argue that the energy spectrum is gapped
because the extremal curves are of finite length. Though classical gluon waves
satisfy our differential equation, they are not extremal curves. We construct
examples of extremal curves and find how the length of these curves depends on
the dimensions of the torus. The intersections with the Gribov horizon are
determined explicitly. The results are discussed in the context of Feynman's
ideas about the origin of the mass gap.
