%CDS301
%example of stream particle animation
%use Matlab build-in wind data
%

clear; clf

%load the 3-D vector data
load wind

%define the seed points
[sx sy sz]=meshgrid(110,20:5:50,5);


%create the stream lines to indicate particle paths
verts=stream3(x,y,z,u,v,w,sx,sy,sz);
sl=streamline(verts);

%define the view
view(-10.5,18)
daspect([2 2 0.125])
axis tight
box on

iverts=interpstreamspeed(x,y,z,u,v,w,verts,0.05);
set(gca,'drawmode','fast');
streamparticles(iverts,15,...
    'Animate',10,...
    'ParticleAlignment','on',...
    'MarkerEdgeColor','none',...
    'MarkerFaceColor','red',...
    'Marker','o')
    




