%3D grafy a vrstevnice
clc; clear;


[X,Y]=meshgrid(-10:0.4:10);
[X2,Y2]=meshgrid(-3:0.2:3);
R=sqrt(X.^2+Y.^2)+eps;
R2=sqrt(X2.^2+Y2.^2);
Z=sin(R)./R;
Z2=X2.*Y2.*exp(-2*R2);

figure(1)
colormap([0 0 0])
% colormap(jet)
meshc(X,Y,Z)
axis square


figure(2)
colormap(jet)
surfc(X2,Y2,Z2)
axis square
shading interp
colorbar

figure(3)
colormap(jet)
pcolor(X2,Y2,Z2)
axis square
shading interp
colorbar

figure(4)
colormap([0 0 0])
contour(X2,Y2,Z2,15)
axis square
shading interp


figure(5)
colormap([0 0 0])
contour3(X2,Y2,Z2,15)
axis square
shading interp


figure(6)
colormap(jet)
pcolor(X2,Y2,Z2)
shading interp
hold on

contour(X2,Y2,Z2,15,'k-')
axis square
hold off

[GX,GY]=gradient(Z2);

figure(7)
colormap([0 0 0])
contour(X2,Y2,Z2,15)
hold on
quiver(X2,Y2,GX,GY)
hold off
shading interp


figure(8)
contour3(X2,Y2,Z2,30)
surface(X2,Y2,Z2,'EdgeColor',[.8 .8 .8],'FaceColor','none')
grid off
view(-15,25)
colormap cool

