1% mesh_torus.m — A torus (genus-1 surface).
2%
3% surfacemesh.torus(p+1, nu, nv) builds a smooth torus with nu patches
4% around the tube and nv patches around the ring. Surfaces of any genus
5% are supported.
7mip load --install flatironinstitute/flatironinstitute/surfacefun
9p = 16;
10nu = 8;
11nv = 24;
12dom = surfacemesh.torus(p + 1, nu, nv);
14figure(1);
15plot(dom), camlight
16title('Torus');
18fprintf('patches: %d\n', length(dom));