1% ex08_sphere_graded.m — Graded mesh on the unit sphere.
2%
3% Same sphere as ex07, but the size function grows with distance from the
4% north pole (0,0,1), so triangles are small near the pole and large near
5% the south pole.
7mip load --install distmesh
9fd=@(p) dsphere(p,0,0,0,1);
10fh=@(p) 0.05+0.5*dsphere(p,0,0,1,0);
11[p,t]=distmeshsurface(fd,fh,0.15,1.1*[-1,-1,-1;1,1,1]);
13title('Graded sphere');
14fprintf('mesh: %d nodes, %d triangles\n', size(p,1), size(t,1));