User`s guide

Virtual Reality World and Dynamic System Examples
1-31
of time-based temperature distribution in an L-shaped metal block is used. The data is
then sent to the virtual world. This forms an animation with relatively large changes.
This is a step-by-step example. Shown are the following features:
Reshaping the object
Applying the color palette to represent distributed parameters across an object shape
Working with VRML text objects
Animating a scene using the MATLAB interface
Synchronization of multiple scene properties
At the end of this example, you can preserve the virtual world object in the MATLAB
workspace, then save the resulting scene to a corresponding VRML file or carry out other
subsequent operations on it.
Heat Transfer Visualization with 2-D Animation (vrheat_anim)
This example illustrates the use of the Simulink 3D Animation MATLAB interface to
create 2-D offline animation files.
You can control the offline animation recording mechanism by setting the relevant
vrworld and vrfigure object properties. You should use the Simulink 3D Animation
Viewer to record animations. However, direct control of the recording is also possible.
This example uses the heat distribution data from the vrheat example to create an
animation file. You can later distribute this animation file to be independently viewed by
others. For this kind of visualization, where the static geometry represented by VRML
IndexedFaceSet is colored based on the simulation of some physical phenomenon, it is
suitable to create 2-D .avi animation files. The software uses the avifile function to
record 2-D animation exactly as it appears in the viewer figure.
There are several methods you can use to record animations. In this example, we use
the scheduled recording. When scheduled recording is active, a time frame is recorded
into the animation file with each setting of the virtual world Time property. Recording
is completed when you set the scene time at the end or outside the predefined recording
interval.
When using the Simulink 3D Animation MATLAB interface, you set the scene time as
desired. This is typically from the point of view of the simulated phenomenon equidistant
times. This is the most important difference from recording the animations for virtual