Some surfaces present folding patterns formed by juxtapositions of ridges and valleys as, for example, the cortical surface of the human brain. The fundamental problem with ridges is to find a correspondence among and analyze the variability among them. Many techniques to achieve these goals exist but use scalar functions. Depth maps are used to efficiently project the geometry of folds into a scalar function in the case where a natural projection plane exists. However, in most cases of curved surfaces, there is no natural projection plane to represent folding patterns. This paper studies the problem of shape matching and analysis of folding patterns by extending the notion of depth maps when no natural projection plane exists. The novel depth measure is called a depth potential function. The depth potential function integrates the information known from the curvature of the surface into a point-of-view invariant representation. The main advantage of the depth potential function is that it is computed by solving a time independent Poisson equation. The Poisson equation endows our surface representation with a significant computational advantage that makes it orders of magnitude faster to compute compared with other available surface representations. The method described in this paper was validated using both synthetic surfaces and cortical surfaces of human brain acquired by magnetic resonance imaging. On average, the improvement in shape matching when using the depth potential was of 11%, which is considerable.