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:

  1. You can separately choose static and/or animated visualization:
  2. Choose the updating mode in the Update machine pull-down menu. The visualization tools reflect changes to the Simulink model by either immediate or delayed update:
  3. Implement your visualization choices at any time by clicking Apply. Clicking OK applies your choices and closes the dialog box. A visualization window opens.
  4. Refresh the entire visual scene at any time by selecting Update diagram from the model window Edit menu.

  Visualizing and Animating Machines Rendering Body Shapes in SimMechanics