Curvature and Distance Function from a Manifold