streamtube

Draws 3-D stream tubes whose width follows the divergence of the flow.

Category: Graphics > 2-D and 3-D Plots

Syntax

h = streamtube(X, Y, Z, U, V, W, startx, starty, startz)

Computes streamlines and draws a tube around each.

h = streamtube(verts, width)

Draws tubes of the given width along existing vertices.

Description

A tube widens where the flow spreads out and narrows where it converges, so its cross-section tracks the divergence of the field. Tubes are surfaces, so lighting and shading work on them.

Input arguments

X, Y, Z, U, V, W
Grid and vector components.
startx, starty, startz
Starting points.
verts, width
Vertices from stream3 and a tube width.

Output arguments

h
Handles of the tube surfaces.

Example

One tube

[x, y, z] = meshgrid(-2:1:2);
u = -y;
v = x;
w = 0*z + 0.1;
h = streamtube(x, y, z, u, v, w, 1, 0, 0);
view(3)
disp(numel(h))
Output
     1

See also

stream3 streamribbon streamline camlight