% vec_mean_curvature.m — Mean curvature from the normal field. % % The mean curvature of a surface is half the surface divergence of its % unit normal field: H = div(n)/2. mip load --install flatironinstitute/flatironinstitute/surfacefun rng(0) p = 16; nref = 2; dom = surfacemesh.blob(p + 1, nref); v = normal(dom); figure(1); plot(div(v)/2), colorbar title('Mean curvature div(n)/2');