% matlab.pdf, p. 131

[X,Y] = meshgrid(-3:.1:3,-3:.1:3);
Z = sin(X).*sin(Y).* exp(-X.^2-Y.^2);
mask = X.^2 + Y.^2 > 6;
Z(mask)=NaN;
surf(X,Y,Z),shading interp,colormap(rand(20,3))
%%

[X,Y]=meshgrid(-3:0.05:3,-3:0.05:3);
Z=exp(-X.^2-Y.^2);
surf(X,Y,Z, X.^2+Y.^2+Z.^2), shading interp
colorbar
%%

[X,Y]=meshgrid(-3:0.05:3,-3:0.05:3);
Z=cos(X).*cos(Y); Z(X.*Y > 2 & X.*Y<3)=NaN;
surf(X,Y,Z, X+Y+Z), shading interp
colormap('copper'); colorbar
%%

[X,Y]=meshgrid(-3:0.2:3); Z=exp(-X.^2-Y.^2);
surf(X,Y,Z, gradient(Z)), shading interp, colorbar
% Transparencia alpha(t), t in [0, 1]
% alpha(0) transparente total, alpha(1) opaco
surf(X,Y,Z,gradient(Z)), shading interp, alpha(0.4)
