Graphics Reference
In-Depth Information
streamtube(X,Y,Z,U,V,W,startx,starty,startz)
streamtube(U,V,W,startx,starty,startz)
streamtube(vertices,X,Y,Z,divergence)
streamtube(vertices, divergence)
streamtube(vertices,width)
streamtube(vertices)
streamtube(…,[scale n])
h = streamtube(…)
Draws tubes from vector volume data (U, V, W) whose
coordinates are (X, Y, Z) arrays; (startx, starty, startz)
indicate the start positions of the tubes. If the parameters
vertices and divergence are used, then it is expected that
[X Y Z] of vertices are sized as meshgrid(1:n, 1:m, 1:p) where
[M N P] = size(divergence); width indicates the width of the
tubes (which may be affected by a scale parameter n)
fvc = surf2patch(h)
fvc = surf2patch(Z)
fvc = surf2patch(Z,C)
fvc = surf2patch(X,Y,Z)
fvc = surf2patch(X, Y, Z, C)
fvc = surf2patch(…,'triangles')
[f,v,c] = surf2patch(…)
Converts a given surface returning faces, vertices and color
structure into the patch formatted structure fvc. The object
can be given even as a surface in its different forms. You can
also create triangular faces using the triangles argument.
[Nx, Ny, Nz, Nv] = subvolume(X,Y,Z,V,limits)
[Nx, Ny, Nz, Nv] = subvolume(V,limits)
Nv = subvolume (…)
Extracts a subset of the volume V (X, Y, Z) using the given
limits (limits = [xmin, xmax, ymin, ymax, zmin, zmax])
lims = volumebounds(X,Y,Z,V)
lims = volumebounds(X,Y,Z,U,V,W)
lims = volumebounds(V)
lims = volumebounds(U,V,W)
Gives coordinates and boundaries of colors for the volume V
(U, V, W) whose coordinates are (X, Y, Z) arrays.
v = flow, v = flow(n) or v = flow(x,y,z)
Generates fluid flow data that is useful in functions that
present volume data. When the x, y, and z parameters are
used, the speed profile is evaluated.
A first example are vectors that depict speed using cones in a vector field (Figure 4-1 ) from the default MATLAB
data set wind.mat using the code below:
>> load wind
xmin = min(x(:)); xmax = max(x(:)); ymin = min(y(:));
ymax = max(y (:)); zmin = min(z(:));
daspect([2 2 1])
xrange = linspace(xmin,xmax,8);
yrange = linspace(ymin,ymax,8);
zrange = 3:4:15;
[cx cy cz] = meshgrid(xrange, yrange, zrange);
hcones = coneplot(x,y,z,u,v,w,cx,cy,cz,5);
set(hcones,'FaceColor','red','EdgeColor','none')
Search WWH ::




Custom Search