Example — Displaying Curl with Stream Ribbons

What Stream Ribbons Can Show

Stream ribbons illustrate direction of flow, similar to stream lines, but can also show rotation about the flow axis by twisting the ribbon-shaped flow line. The streamribbon function enables you to specify a twist angle (in radians) for each vertex in the stream ribbons.

When used in conjunction with the curl function, streamribbon is useful for displaying the curl angular velocity of a vector field. The following example illustrates this technique:

1. Select a Subset of Data to Plot

Load and select a region of interest in the wind data set using subvolume. Plotting the full data set first can help you select a region of interest.

load wind
lims = [100.64 116.67 17.25 28.75 -0.02 6.86];
[x,y,z,u,v,w] = subvolume(x,y,z,u,v,w,lims);

2. Calculate Curl Angular Velocity and Wind Speed

Calculate the curl angular velocity and the wind speed.

cav = curl(x,y,z,u,v,w);
wind_speed = sqrt(u.^2 + v.^2 + w.^2);

3. Create the Stream Ribbons

4. Define the View and Add Lighting

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS