F=cos((x^2+y^2)^(1/2))+cos(3*(x^2+y^2)^(1/2)); mtg.plot3d(F | domain=[[-3,3],[-3,3]], mesh=30); L= [(3*(1+sin(y)) + 2*(1-cos(y)/2)*cos(x))*cos(y), (4+2*(1-cos(y)/2)*cos(x))*sin(y), -2*(1-cos(y)/2) * sin(x)]; L = map(subst,L,x,s,y,t); mtp.parametric_plot3d(L | domain=[[0.0,2*3.14],[0.0,2*3.14]]); def mygamma(X,Y) { if (X <= 0.2) { Xi = number_floor(X); if ((X-Xi)^2+Y^2 < 0.04) {X=Xi+0.2; } if ((X-(Xi+1))^2+Y^2 <0.04) { X=Xi+1-0.2; } } return pari(gamma,X+@i*Y); } mtg.plot3d(quote(number_abs(mygamma(x,y))) | domain=[[-3,3],[-1,1]]);