imat_ctrace/vtkplot


Purpose

Plot coordinate trace arrows in 3-D space using VTK.

Syntax

vtkplot(ctrace,fem)
handle = vtkplot(ctrace,fem,group,handle,sfact,color,'title',titlestr,'silent','doflabels','nodelabels')

Description

VTKPLOT displays a coordinate trace on a FEM using VTK. Translational degrees of freedom are displayed with arrowhead tips, and rotational degrees of freedom are displayed with sphere tips.

CTRACE is an IMAT_CTRACE. FEM is an IMAT_FEM object from which the locations and directions of the coordinates in the CTRACE will be extracted. If node geometry is not in the global coordinate system, the coordinate system structure must be present so VTKPLOT can transform the node coordinates. VTKPLOT returns the handle to the IMAT_VTKPLOT object that allows you control the plot display.

GROUP is an optional IMAT_GROUP containing group information. If supplied, you will be able to display subsets of your FEM based on the elements in the group(s).

HANDLE is the IMAT_VTKPLOT handle containing the display. If it is provided, the coordinate trace arrows will be placed on this display, using the supplied FEM to locate the arrows.

You can change the arrow color by passing in an optional input argument COLOR. If COLOR is a scalar string, all of the arrows will be plotted in that color. You can also specify individual colors for each arrow by passing in a cell array of strings or a vector of integers of length(CTRACE) corresponding to the I-deas color specifications. If COLOR is an Nx3 matrix, it is interpreted as an RGB matrix (range 0-1), where N is length(CTRACE). If COLOR is not specified, the color of the FEM nodes referenced in CTRACE is used.

SFACT is a scale factor for scaling the arrow size. A scale factor of 1 corresponds to the default arrow size.

Other valid display and format arguments and their descriptions are shown in the table below.

General Options  
'title' Must be followed by a string containing the figure title. If a title is not specified, the coordinate trace name and description will be used if they are set.
'doflabels' Display DOF direction labels of the DOF in the supplied coordinate trace.
'nodelabels' Display node labels of the nodes in the supplied coordinate trace.
'rgb' Color-code the DOF arrows by direction. The X and RX directions are colored red, Y and RY directions are colored green, and Z and RZ directions are colored blue.
'silent' Do not print progress messages when displaying the shape.

 

Formatting only applies to the coordinate trace arrows. To modify the formatting of the FEM, first plot the undeformed geometry using imat_fem/plot, then pass in the handle returned by imat_fem/plot to PLOT. Currently rotational DOF are plotted the same way as translational DOF.

Two optional output arguments are supported. HP is the handle of the uipanel in which the plot is displayed. HL contains the handles of the lines and patches that define the arrows.

Examples

>> vtkplot(ctrace,fem)
>> h = vtkplot(t,fem,h,'blue','title','This is the title')

See Also

imat_fem/vtkplot, imat_vtkplot, ideas_colormap