% parab.m 96/08/20
%
% Program to plot the paraboloid z=16-x^2-y^2 for z>=0.
% 
%
    np=25;
    t=16*(0:np)/np;
    subplot(1,2,1)
    [X,Y,Z]=cylinder(sqrt(16-t));
    surf(X,Y,16*Z)
    colormap('white');
    axis([-5 5 -5 5 0 16]); 
    xlabel('x');
    ylabel('y');
    zlabel('z');
%    text(2,-2,15,'z=16-x^2-y^2');
    text(2,-2,15,'R');
    subplot(1,2,2)
    nt=60;
    xmax=5;
    theta=2*pi*(0:60)/60;
    z=4*exp(sqrt(-1)*theta);
    plot(z,'w-');
    xlabel('x');
    ylabel('y');
    hold on
    axis square
    axis([-xmax xmax -xmax xmax]);
    plot([-xmax xmax],[0 0],'w-');
    plot([0 0],[-xmax xmax],'w-');
    text(-2,2,'D');

    hold off
