%Level Curves Demo

figure;
[X2,Y2]=meshgrid(-2:.1:2);
Z2=sqrt(9-X2.^2-Y2.^2);
contour(X2,Y2,Z2)
title('Level curves of f(x,y)=sqrt(9-x^2-y^2)')


figure;
[C2,h2]=contour(X2,Y2,Z2);
clabel(C2,h2)
title('Level curves of f(x,y)=sqrt(9-x^2-y^2) with labels.')

figure
contour3(X2,Y2,Z2)
title('Level curves of f(x,y)=sqrt(9-x^2-y^2) at actual height.')