% fun_plot.m — A scalar function on a surface (surfacefun). % % A surfacefun represents a scalar field on a surfacemesh, built from a % function handle of the Cartesian coordinates (x,y,z). mip load --install flatironinstitute/flatironinstitute/surfacefun p = 16; nref = 2; dom = surfacemesh.sphere(p + 1, nref); f = surfacefun(@(x, y, z) cos(6*x) .* y + exp(z), dom); figure(1); plot(f), hold on, plot(dom), colorbar title('f = cos(6x) y + e^z');