This work deals with the determination of the shape of a generally non-circular impenetrable cylinder from the way it scatters incident sound. A complete family (of generally non-orthogonal functions) representation of the scattered field is employed to match the total measured field. The data equation and state equation, derived from the Rayleigh hypothesis, are grouped into a single nonlinear cost functional which is minimized by means of the modified Levenberg-Marquardt algorithm to obtain the parametric equation of the boundary of the body in the cross section plane. Numerical examples of the results of the inversion scheme are given for cylinders with both convex and non-convex boundaries illuminated by a plane wave with frequency or angle-of-incidence diversity. Potential applications include robotics (artificial vision), non-destructive evaluation and medical imagery.