% mesh_twisted_torus.m — A twisted torus. % % The mesh need not be smooth between patches. surfacemesh.twisted_torus % shears the patches as it wraps them around the ring. mip load --install flatironinstitute/flatironinstitute/surfacefun p = 16; nu = 4; nv = 32; dom = surfacemesh.twisted_torus(p + 1, nu, nv); figure(1); plot(dom), camlight title('Twisted torus'); fprintf('patches: %d\n', length(dom));