Matlab calculates surface curvature