  If a piece of the contour of a picture is missing to the eye vision, then the
brain tends to complete it using some kind of sub-Riemannian geodesics of the
unit tangent bundle of the plane, R2xS1. These geodesics can be obtained by
lifting extremal curves of a total curvature type energy in the plane. We
completely solve this variational problem, geometrically. Moreover, we also
show a way of constructing rotational surfaces of constant negative curvature
in R3 by evolving these extremal curves under their associated binormal flow
with prescribed velocity. Finally, we prove that, locally, all rotational
constant negative curvature surfaces of R3 are foliated by extremal curves of
these energies. Therefore, we conclude that there exists a one-to-one
correspondence between the sub-Riemannian geodesics used by the brain for
visual curve completion and these rotational surfaces of R3.
