imat_shp/vtkplot (+FEA)


Purpose

Plot and animate imat_shpand/or result in 3-D space

Syntax

plot(s,fem)
[h,shpout]=plot(shp,fem,group,res,handle,'title',titlestr,'scale',scale,options)

Description

VTKPLOT displays the shapes supplied in the imat_shp object SHP and/or the results stored in the result object RES using the supplied FEM. In general, the model's displacement is determined by the shape, and its contour by the result.

VTKPLOT expects that FEM information is an IMAT_FEM object. If node geometry is not in the global coordinate system, the coordinate system data must be present so PLOT can transform the node coordinates. The input shape coefficients are assumed to be in the FEM's displacement coordinate system(s).

By default, if a shape is present, only the deformed model will be displayed. The undeformed model can be displayed by using the 'Display' menu. The color is either determined by the result, if one was passed in, or by the displacement of the shape. The contour or shape component displayed can be changed using the 'Result' menu.

The Display menu control what is shown on the plot and how. The 'Complex Display' menu controls how complex data is displayed if the displacement shape is complex. Below this, the clipping menus allow you to set up clipping planes for the model. There are four available clipping planes: three aligned with each axis and a general one that is arbitrary. Each can be enabled using the corresponding 'Enable' menu item. To keep the result of the clipping plane, but remove the plane from view, set the 'Set Invisible' option. To flip the side of the plane that is not visible, select the 'Flip Clipping Direction' option. To further customize the view, you can use the 'Element Visibility' GUI to adjust what kinds of elements are shown on the plot. The 'Baseline Model' and 'Result Model' menus contain options for changing how nodes, elements and tracelines are formatted and can be used so set the transparency of the model.

The view menu allows you to snap the view to the difference defined planes. If the toolbar is visible, each of the view options have a corresponding toolbar icon. From this menu you can also use a 'Zoom Box' to zoom into a portion of the model, or turn on the 3D mode where red/blue 3D glasses can be used to view the model.

To export an image of the model or an animation of the mode shape, use the 'Export' menu. If you want to export all of the mode shapes using the current view, use Export->All Slides.

If displacement shapes are present, the 'Animation' menu controls the animation. Here you can set the scale of the animation, and set whether it will animate as a mode shape or animate as a transient result.

Several optional input arguments are supported:

GROUP is an 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 a figure or panel handle. If a figure handle is supplied, the shape will be displayed on the supplied figure after deleting the contents of the figure. If a panel handle is supplied, the shape will be displayed on the supplied panel after deleting the content of the panel.

OPTIONS is a string containing one of the following strings. Multiple options may be specified.

General Options  
'undeformed' Undeformed geometry turned on.
'noundeformed' Undeformed geometry turned off.
'deformed' Deformed geometry turned on.
'nodeformed' Deformed geometry turned off.
'colorbar' Display the color bar.
'nocolorbar' Do not display the color bar.
'notoolbar' Do not display the toolbar.
'nogui' Removes all buttons on plot window.
'noidlines'

Removes ID Line information from plot area.

'cycleshapes' When animating, cycle through each shape. This is useful for animating transient results.
'view'

Set plot view. See imat_vtkplot/view for valid options.

'interactionstyle' Set the interaction style. See imat_vtkplot/interactionstyle for more details.
'title'

This must be followed by a string, which will be the figure title.

'scale'

This must be followed by a number, which will be the scale factor by which to multiply the default deformed display amplitude. For example, a scale factor of 2.0 will double the default deformation.

'names' This must be followed by a cell array of strings the same length as the total number of shapes to be plotted. The strings will replace the 'Mode #' text in the upper left of the plot window. If a single string is passed in, it will be used for all of the modes.
'loop' Logical specifying whether the shape animation should loop.Defaults to false for transient plots. Defaults to true for all others.
'nanimframes'

Must be followed by a positive integer scalar specifying the number of animation frames.

'silent' Suppress output to the Matlab window.
Complex Display Options  
'real' Display the real portion of the complex mode shape.
'imag' Display the imaginary portion of the complex mode shape.
'amp' Display the shape coefficients as a signed amplitude (default).
'complex' Display the shape coefficients as a complex shape. The static display is a signed amplitude, but the animation displays as complex (i.e. each node hits its maximum amplitude at different points in time).

 

The output argument for VTKPLOT is an IMAT_VTKPLOT object. It contains all of the formatting and contents of the plot. If IDLines are modified during the plotting session, and they need to be retrieved, place the handle to the figure into uiwait, and then retrieve the modified imat_shp object once the user is done editing it.

Examples

>> vtkplot(s(1),fem)
>> h = vtkplot(s(1),fem,h,'undeformed')
>> h = vtkplot(shape,fem,h,'title','Mode Shapes','imag','scale',2.3)

See Also

imat_fem/vtkplot, result/vtkplot