Documentation

streamribbon

3-D stream ribbon plot from vector volume data

Syntax

StreamRibbon(X,Y,Z,U,V,W,Startx,Starty,Startz)
StreamRibbon(U,V,W,Startx,Starty,Startz)
streamribbon(vertices,X,Y,Z,cav,speed)
streamribbon(vertices,cav,speed)
streamribbon(vertices,twistangle)
streamribbon(...,width)
streamribbon(axes_handle,...)
h = streamribbon(...)

Description

StreamRibbon(X,Y,Z,U,V,W,Startx,Starty,Startz)从矢量卷数据中绘制流丝带U,V,W.

The arraysX,Y, 和Z,定义坐标U,V, 和W,必须是单调的,但不需要均匀间隔。X,Y, 和Z必须具有相同数量的元素,就好像由meshgrid.

startx,starty, 和startzdefine the starting positions of the stream ribbons at the center of the ribbons. The sectionSpecifying Starting Points for Stream Plots提供有关定义起点的更多信息。

The twist of the ribbons is proportional to the curl of the vector field. The width of the ribbons is calculated automatically.

StreamRibbon(U,V,W,Startx,Starty,Startz)assumesX,Y, 和Z由表达确定

[X,Y,Z] = meshgrid(1:n,1:m,1:p)

where[m,n,p] = size(U).

streamribbon(vertices,X,Y,Z,cav,speed)assumes precomputed streamline vertices, curl angular velocity, and flow speed.vertices是流线顶点的单元格数(如stream3).X,Y,Z,骑士, 和speedare 3-D arrays.

streamribbon(vertices,cav,speed)assumesX,Y, 和Z由表达确定

[X,Y,Z] = meshgrid(1:n,1:m,1:p)

where[m,n,p] = size(cav).

streamribbon(vertices,twistangle)uses the cell array of vectorstwistanglefor the twist of the ribbons (in radians). The size of each corresponding element ofverticestwistanglemust be equal.

streamribbon(...,width)sets the width of the ribbons towidth.

streamribbon(axes_handle,...)绘制带有手柄的轴对象axes_handleinstead of into the current axes object (gca).

h = streamribbon(...)returns a vector of handles (one per start point) tosurfaceobjects.

Examples

collapse all

Use stream ribbons to indicate the flow in a data set.

loadwind[sx,sy,sz] = meshgrid(80,20:10:50,0:5:15); streamribbon(x,y,z,u,v,w,sx,sy,sz); axis紧的阴影interpview(3); camlight lightingGouraud

Use precalculated vertex data, curl average velocity, and speed to indicate flow.

loadwind[sx,sy,sz] = meshgrid(80,20:10:50,0:5:15); verts = stream3(x,y,z,u,v,w,sx,sy,sz); cav = curl(x,y,z,u,v,w); spd = sqrt(u.^2 + v.^2 + w.^2).*.1; streamribbon(verts,x,y,z,cav,spd); axis紧的阴影interpview(3); camlight; lightingGouraud

Using precalculated data enables you to use values other than those calculated from the single data source. In this case, the speed is reduced by a factor of 10 compared to the previous example.

为流丝带指定扭角

t = 0:.15:15; verts = {[cos(t)' sin(t)' (t/3)']}; twistangle = {cos(t)'}; streamribbon(verts,twistangle); axis紧的阴影interp查看(3)凸轮灯照明Gouraud

Create 3-D arrays and a cone plot.

xmin = 7;xmax = 7;ymin = -7; ymax = 7; zmin = -7; zmax = 7; x = linspace(xmin,xmax,30); y = linspace(ymin,ymax,20); z = linspace(zmin,zmax,20); [x,y,z] = meshgrid(x,y,z); u = y; v = -x; w = 0*x+1; [cx,cy,cz] = meshgrid(linspace(xmin,xmax,30),...linspace(ymin,ymax,30),[-3 4]); h = coneplot(x,y,z,u,v,w,cx,cy,cz,'颤动'); set(h,'颜色','k');

绘制两组流丝带。然后定义视图和照明。

[sx,sy,sz] = meshgrid([-1 0 1],[-1 0 1],-6); streamribbon(x,y,z,u,v,w,sx,sy,sz); [sx,sy,sz] = meshgrid([1:6],[0],-6); streamribbon(x,y,z,u,v,w,sx,sy,sz); shadinginterpview(-30,10) axisoff紧的camprojperspectivecamva(66) camlookat camdolly(0,0,.5,'fixtarget') camlight

在R2006a之前引入

这个话题有帮助吗?