% plot1.m 96/08/20
%
% Program to flux through a surface
% 

% plot surface

    clg;
    hold off;
    p1=[.5; 1; 1]; 
    p2=p1+[2; 0; 0];
    p3=p2+[0; 2; 0];
    p4=p3+[-2; 0; 0];
    draw3(p1,p2,'w--');
    hold on;
    draw3(p2,p3,'w--');
    draw3(p3,p4,'w--');
    draw3(p4,p1,'w--');
    axis([0 4 0 4 0 4]);
    view(30,10);

% plot blob

    vec=[.75; 1.5; 1.5];
    w1=p1+vec;
    w2=p2+vec;
    w3=p3+vec;
    w4=p4+vec;
    draw3(w1,w2,'w-');
    hold on;
    draw3(w2,w3,'w-');
    draw3(w3,w4,'w-');
    draw3(w4,w1,'w-');
    draw3(p1,w1,'w-');
    draw3(p2,w2,'w-');
    draw3(p3,w3,'w-');
    draw3(p4,w4,'w-');

% Draw normal and F vector

    arrow3(p1,p1+[0; 0; 1],.2); 
    arrow3(p1,p1+vec,.2);
    draw3(p1,p1+[0; 0; 2],'w--');
    draw3(w1,p1+[0; 0; 1.5],'w--');

    xlabel('x');
    ylabel('y');
    zlabel('z');
    plot3([1.5],[2],[0],'o');
    text(1.6,2.1,'(x_0,y_0)');

% text

    text(.1,.4,2.6,'height');
    text(.3,.9,1.5,'n');
    text(1,2,1,'dS');
    text(1,.6,.3,'theta'); 
    text(1,1.8,1.8,'F');

    junk2=[.6; 1.1; 1.5]; 
    junk1=[1.2;.6;.5]; 
    arrow3(junk1,junk2,.1);
