3-d curvature based upon a function