12d8453Intro to surfacefun: interactive numbl example projectJeremy Magland 1% mesh_single_patch.m — A surface from a single high-order patch.
2%
3% Every patch of a surfacemesh is represented on tensor-product Chebyshev
4% nodes in [-1,1]^2. Here we build one patch and map it to the graph of
5% z = cos(u)cos(v). The constructor takes cell arrays of node coordinates
6% (one cell per patch).
8mip load --install flatironinstitute/flatironinstitute/surfacefun
10n = 16;
11[u, v] = chebpts2(n);
13x = u;
14y = v;
15z = cos(u) .* cos(v);
16dom = surfacemesh({x}, {y}, {z});
18figure(1);
19plot(dom), camlight
20title('Single high-order patch');
22fprintf('number of patches: %d\n', length(dom));