/ concept-collection / numbl-surfacefun-intro
Sign in
concept-collection / numbl-surfacefun-intro
numbl-surfacefun-intro / vec_mean_curvature.m
17 lines · 394 BBlameHistoryRaw
1% vec_mean_curvature.m — Mean curvature from the normal field.
2%
3% The mean curvature of a surface is half the surface divergence of its
4% unit normal field: H = div(n)/2.
6mip load --install flatironinstitute/flatironinstitute/surfacefun
8rng(0)
9p = 16;
10nref = 2;
11dom = surfacemesh.blob(p + 1, nref);
13v = normal(dom);
15figure(1);
16plot(div(v)/2), colorbar
17title('Mean curvature div(n)/2');
moveopenescclose