communications in analysis and geometry Volume 17, Number 4, 755–776, 2009 3-manifolds in Euclidean space from a contact viewpoint Ana Claudia Nabarro and Mar´ ıa del Carmen Romero-Fuster We study the geometry of 3-manifolds generically embedded in R n by means of the analysis of the singularities of the distance-squared and height functions on them. We describe the local structure of the discriminant (associated to the distribution of asymptotic direc- tions), the ridges and the flat ridges. 1. Introduction The study of the contacts of a submanifold of Euclidean space with objects, such as the hyperspheres and hyperplanes, that are invariant through the action of the Euclidean group provides a useful information on its extrinsic geometry, which leads to interesting global results [6, 28]. The main tool in this study is the analysis of the singularities of the distance squared and height functions on the submanifold. The generic singularities of the family of distance squared functions were initially studied by Porteous [22], who determined the relations between the singular set, the catastrophe map and the bifurcation set of this family with, respectively, the normal bundle, the normal exponential map and the focal set of the submanifold. He also introduced the concepts of ribs and ridges in connection with special contacts of the submanifold with its focal hyperspheres. These sets have a special interest from the viewpoint of applications in Image Analysis [3, 7, 9, 10]. A detailed study for surfaces in 3-space can be found in [23] and for surfaces in 4-space in [18]. On the other hand, the generic singularities of height functions on hyper- surfaces were analyzed by Bruce [4] and Romero Fuster [24]. The corre- sponding study for surfaces in R 4 and R 5 can be, respectively, found in [14] and [17]. The concept of flat ridge of submanifolds with codimension 2 was introduced in [27] as the natural analogue of the ridges for the contacts with hyperplanes. In the case of a hypersurface, they can be seen as the intersection of the ridge and the parabolic sets. Other properties concerning 755