% Read the drogue file produced by fundy
% [uv,omega] = drogin('drog',11);
% load meshall


echo on

N = length(uv);
n = length(meshnod);
nlevel = N/n;

ilevel = 5;

luv= ilevel:nlevel:N;
uvnod = uv(luv,:);

phi = [0:7]*pi/4;
[P,uvp]= meshdom(phi,uvnod(:,4));
PHI = sin(P+uvp);
[P,uvp]= meshdom(phi,uvnod(:,3));

U= uvp.*PHI;

[P,uvp]= meshdom(phi,uvnod(:,6));
PHI = sin(P+uvp);
[P,uvp]= meshdom(phi,uvnod(:,5));

V= uvp.*PHI;

[P,X]=meshdom(phi,meshnod(:,2));
[P,Y]=meshdom(phi,meshnod(:,3));

[mm,nn]=size(X);
x = ones(mm*nn,1);
y = x;
u = x;
v = x;

x(:) = X;
y(:) = Y;
u(:) = U;
v(:) = V;


L = newaxis(meshnod);
l = inaxis(x,y,L);

box=0.001* 10*[0 0; NaN NaN; cos([0:2*pi/6:2*pi]') sin([0:2*pi/6:2*pi]') ];

uperx = .02/10000;
arrowuv2(x(l),y(l),u(l),v(l),uperx,box,L,[0 1 0]);

putunitvec([0.0 .01],uperx,[int2str(1),' cm/s'],'r-')

