Skip to content

streamtube

plot · scripts/plot/draw/streamtube.m

: h = streamtube (x, y, z, u, v, w, sx, sy, sz)
: h = streamtube (u, v, w, sx, sy, sz)
: h = streamtube (…, options)
: h = streamtube (vertices)
: h = streamtube (vertices, width)
: h = streamtube (vertices, width, options)
: streamtube (ax, …)

Draw stream tubes.

From the start points (sx, sy, sz) streamlines are traced through the 3-D vector field (u, v, w) (arrays with rows along y, columns along x, pages along z; the coordinates default to the indices). Each streamline becomes a tube whose cross-section grows and shrinks with the divergence of the field. Alternatively vertices is a cell array of N-by-3 vertex lists, with an optional width (a scalar, a vector with one value per vertex, or a cell array of those).

options is scale (default 1, a factor on the tube width) or [scale n], where n (default 20, at least 3) is the number of points around the tube. The result is a column vector of surface handles, one per streamline with at least two vertices; the surface data are (n+1)-by-(number of vertices) arrays.