SimMechanics | ![]() ![]() |
Choosing Visualization Options in SimMechanics
You need to make three choices to set up SimMechanics visualization:
You implement these choices via the Mechanical Environment Settings dialog box. From the Simulink menu bar, select Simulation, then Mechanical environment. The Mechanical Environment Settings dialog opens. Click the Visualization tab. The Visualization pane appears below the tab. Keep this dialog open so you can see the visualization options. See Mechanical Environment Settings Dialog Box in the Running Mechanical Models chapter for more information.
The sections of this chapter guide you to making the appropriate visualization choices within SimMechanics. The present section explains the why and how of visualizing the machine's initial state and animating its motion:
You can find more on the body shapes in the next section:
These two sections spell out the procedures for setting up the two SimMechanics visualization tools:
You can bypass the built-in visualization tools of SimMechanics by creating a virtual reality world of your own design to represent your machine's bodies. With Virtual Reality Toolbox, you build a custom interface from your model to the virtual world and animate its virtual bodies:
Uses of the SimMechanics Visualization Tools
The visualization tools of SimMechanics serve two distinct purposes, static and dynamic visualization. In both cases, you can change your observer viewpoint and navigate through the scene. You can change the body properties of the visualization only by changing the corresponding Body blocks in your model. Changing a body's mass, inertia tensor, and coordinate systems can change its visual rendering.
Static Rendering
Static rendering of machines in their initial state, during construction. Either choice is valid:
Dynamic Animation
Animation of machines while the SimMechanics model is running. Use this feature to watch the model's dynamics in three dimensions and visualize motions and relationships more easily than is possible with Scope blocks alone. Running Mechanical Models presents the steps for running SimMechanics models.
Setting Up Static and Dynamic Visualization
Begin configuring the Visualization pane of the Mechanical Environment Settings dialog box:
When diagram changes
option updates the visualized machine immediately upon changes to the Simulink model. For complex models, frequent visualization updates can be slow.
Only at Update diagram
option ignores changes you make to the model until you choose Update diagram in the model window Edit menu. This option allows you to update the visualization in one step after making a large number of changes.
![]() | Visualizing and Animating Machines | Rendering Body Shapes in SimMechanics | ![]() |