MATLAB Function Reference
  Go to function:
    Search    Help Desk 
coneplot    Examples   See Also

Plot velocity vectors as cones in a 3-D vector field

Syntax

Description

coneplot(X,Y,Z,U,V,W,Cx,Cy,Cz) plots velocity vectors as cones pointing in the direction of the velocity vector and having a length proportional to the magnitude of the velocity vector.

coneplot(U,V,W,Cx,Cy,Cz) (omitting the X, Y, and Z arguments) assumes [X,Y,Z] = meshgrid(1:n,1:m,1:p) where [m,n,p]= size(U).

coneplot(...,s) MATLAB automatically scales the cones to fit the graph and then stretches them by the scale factor s. If you do not specify a value for s, MATLAB uses a value of 1. Use s = 0 to plot the cones without automatic scaling.

coneplot(...,'quiver') draws arrows instead of cones (see quiver3 for an illustration of a quiver plot).

coneplot(...,'method') specifies the interpolation method to use. method can be: linear, cubic, nearest. linear is the default (see interp3 for a discussion of these interpolation methods)

h = coneplot(...) returns the handle to the patch object used to draw the cones. You can use the set command to change the properties of the cones.

Remarks

coneplot automatically scales the cones to fit the graph, while keeping them in proportion to the respective velocity vectors.

It is usually best to set the data aspect ratio of the axes before calling coneplot. You can set the ratio using the daspect command,

Examples

This example plots the velocity vector cones for vector volume data representing the motion of air through a rectangular region of space. The final graph employs a number of enhancements to visualize the data more effectively. These include:

Load and Inspect Data

The winds data set contains six 3-D arrays: u, v, and w specify the vector components at each of the coordinate specified in x, y, and z. The coordinates define a lattice grid structure where the data is sampled within the volume.

It is useful to establish the range of the data to place the slice planes and to specify where you want the cone plots (min, max).

Create the Cone Plot

Add the Slice Planes

Define the View

Add Lighting to the Scene

The light source affects both the slice planes (surfaces) and the cone plots (patches). However, you can set the lighting characteristics of each independently.

See Also

isosurface, patch, reducevolume, smooth3, streamline, stream2, stream3, subvolume



[ Previous | Help Desk | Next ]