; defines u, v, x, and y restore, filepath('globalwinds.dat', subdir=['examples','data']) data = fltarr(2, 128, 64) data[0, *, *] = u data[1, *, *] = v ; define starting points seeds = [[32, 32], [64, 32], [96, 32]] particle_trace, data, seeds, verts, conn, max_iterations=30 ; plot the underlying vector field velovect, u, v, x, y, color='000000'x, background='FFFFFF'x ; overplot the streamlines i = 0 sz = size(verts, /structure) while (i lt sz.dimensions[1]) do begin nverts = conn[i] plots, x[verts[0, conn[i+1:i+nverts]]], $ y[verts[1, conn[i+1:i+nverts]]], $ color='0000FF'x, thick=2 i += nverts + 1 endwhile end