% ell.m  96/07/29
%
% Plot of ellipse in xy plane
%
% x^2/4+y^2=1
%

    t=2*pi*(0:50)/50;
    x=2*cos(t); y=sin(t);

    hold off;
    plot(x,y,'w-');  
    hold on;
    axis square;
    axis([-3 3 -3 3]);
    plot([0 0],[-3 3],'w-');
    plot([-3 3],[0 0],'w-');

    t=1;
    p=[2*cos(t); sin(t)]; 
    ale=atan(p(2)/p(1))+pi;
    shift=pi/6;
    plot([0 p(1)], [0 p(2)],'w-');
    len=.25;
    p1=p+len*[cos(ale+shift); sin(ale+shift)]; 
    p2=p+len*[cos(ale-shift); sin(ale-shift)]; 
    plot([p(1) p1(1)],[p(2) p1(2)],'w-');
    plot([p(1) p2(1)],[p(2) p2(2)],'w-');

    text(2.5,-.4,'x');
    text(-.4,2.5,'y');
    text(.8,.35,'r(1)');

    hold off;
