12d8453Intro to surfacefun: interactive numbl example projectJeremy Magland 1% mesh_twisted_torus.m — A twisted torus.
2%
3% The mesh need not be smooth between patches. surfacemesh.twisted_torus
4% shears the patches as it wraps them around the ring.
6mip load --install flatironinstitute/flatironinstitute/surfacefun
8p = 16;
9nu = 4;
10nv = 32;
11dom = surfacemesh.twisted_torus(p + 1, nu, nv);
13figure(1);
14plot(dom), camlight
15title('Twisted torus');
17fprintf('patches: %d\n', length(dom));