%for problem VC2 3
clear all;close all

[x,y] = meshgrid(-2:0.4:2,-2:0.4:2);
a = cos(0:.1:2*pi);
b = sin(0:.1:2*pi);
u=x; v=-y;

figure(1)
plot(a,b,'g'); hold on
quiver(x,y,u,v)
axis([-2 2 -2 2]);
axis('square')
title('Vector flow');


%Contour plots
%[x,y] = meshgrid(-2:0.1:2,-2:0.1:2);
T=(x.^2-y.^2)/2;
%figure(2)
plot(a,b,'g'); hold on
axis('square')
h=contour(x,y,T,20);


title('Iso-potentials and flux')

print 'VC2_3' -depsc2
