Update curvature.R