| Contents | Index |
| On this page… |
|---|
Interpreting the Camera Projection, Field of View, and Viewpoint Automatically Sizing the Camera Field of View Automatically Setting a Camera Viewpoint |
You must use the menu bar to change the background color of the display window within the SimMechanics visualization window.
Open View, then select Change Background Color. A color palette opens.
Select a color. Click OK to implement your choice. The background color changes immediately.
The color palette for the background is the same as the palette for custom body color. See Customizing Visualized Body Colors in the Customizing Visualization and Animation chapter.
To properly interpret what you see in visualization, imagine that the display window shows the field of view of a camera. The properties of this virtual camera determine most of what you need to know about controlling your view of the model's machines.
Visualization Window Camera Field and Visualized Scene

The visualization window uses orthographic (parallel) projection to reduce a three-dimensional scene to two dimensions on your screen. That is, parallel lines of view representing depth converge to a point only at infinity. The window displays the scene without finite perspective.
The field of view is what you see within the virtual camera frame. The virtual camera's viewpoint is the point and direction from which it views the scene. The virtual camera frame has a size or aperture.
Zooming. Changing the camera frame size or aperture, then shrinking or expanding the overall size of the machines, is the equivalent of zooming in or out. The camera cannot zoom directly, because there is no point of convergence or perspective.
Panning. Panning changes the camera's virtual location without changing its direction of view. It means moving the camera frame horizontally or vertically in a constant virtual plane, maintaining the orientation of the camera frame.
Rotating. Rotating means viewing the scene from a different direction, while maintaining a constant zoom (effective distance from the machines).
A rotation rotates about the center of the geometric bounding box containing all the objects in the field of view. (This geometric center is unrelated to body properties, such as Body coordinate systems or centers of gravity.) The viewpoint is moved to another point on the virtual sphere with this same geometric center. The view direction changes to maintain the geometric center at the center of the display window.
The World CS axis triad always appears at the lower-left corner of the display window.

The directions of the axes indicate orientation only. The position of the axes does not, in general, indicate the position of the World coordinate system (CS) origin.
You can automatically resize the camera's field or aperture size to fit all the visualized objects. This step is equivalent to an automatic zoom. It does not rotate the viewpoint or pan the camera.
To fit the field of view to size, click the Fit to View button on the toolbar. The camera field resizes itself immediately.

You can automatically change your viewpoint of the visualized bodies by clicking one of the six viewpoint buttons on the toolbar. The action applies immediately.
Clicking these buttons is equivalent to setting a plane of view
defined by the World CS axes. Except for the isometric view, these
predefined viewpoints always have one axis perpendicular to the plane
of view (pointing into or out of the plane of view). The isometric
view is a viewpoint direction with equal direction cosines (all
).
The default is the front view, with X pointing right, Y pointing up, and Z pointing out of the plane of view.
| Toolbar Button | Axes and Orientation of View Plane |
|---|---|
| Front View (default) | X points right – Y points up |
| Back View | X points left – Y points up |
| Top View | X points right – Z points down |
| Bottom View | X points right – Z points up |
| Left View | Z points right – Y points up |
| Right View | Z points left – Y points up |
| Isometric View | X points down and right – Y points up – Z points down and left |
The four selection-viewpoint toolbar control buttons enable certain interactions between your mouse and the display window through point-and-click or point-click-hold-and-roll.
These four toolbar-menu controls are mutually exclusive; you can activate at most one of them at a time. The default is for the Select Tool to be active.
Enable a tool by clicking on its button.
Disable all of them by clicking the currently active tool button.
| Function | Tool | How to Use |
|---|---|---|
| Select bodies | Select (default) | Point with the mouse at a visualized body, then click on any mouse button. |
| Viewpoint controls | Rotate | Point with the mouse anywhere in display window. Then left-click, holding the mouse button, and roll mouse. |
| Pan | ||
| Zoom |
With one of the three viewpoint control tools enabled, rolling the mouse produces one of three possible results in the display window.
Rotate Tool. Rolling so that the arrow moves in the display window along a line, rotates the view about that line. Rolling in a more complex figure rotates the view in a more complex way.
Pan Tool. Rolling forward, back, left, or right pans up, down, left, or right, respectively.
Zoom Tool. Rolling forward or back zooms out or in, respectively. You zoom toward or away from the point that you initially clicked on. Rolling left or right does nothing.
See Highlighting Bodies, Body Components, and Body Blocks following.
The four selection-viewpoint tool controls and the computer mouse have a complementary relationship to each other.
In normal mouse control, the left mouse button's function corresponds to the function activated in the menus or toolbar. Depending on which function you activate from the menu or toolbar, you can switch the left mouse button from normal to dynamic mouse control and back. Actively Controlling the Camera Viewpoint preceding explains this case.
In dynamic mouse control, the viewpoint controls are disabled from the menu or toolbar. (Either the Select Tool is enabled, or all four selection-viewpoint controls are disabled from the menu or toolbar.) You can still exercise the viewpoint controls with the three mouse buttons, which are mapped one-to-one to the viewpoint controls.
Note If your mouse has fewer than three buttons, you cannot access the dynamic mouse control functions associated with the missing button or buttons. |
The left mouse button's mapping is more complex.
| Viewpoint Control | Active | How to Use | |
|---|---|---|---|
| Normal: Pan | If Pan Tool is enabled from menu or toolbar | Pan field of view by clicking and holding anywhere in display window and rolling mouse. | |
| Normal: Zoom | If Zoom Tool is enabled from menu or toolbar | Zoom field of view by clicking and holding anywhere in display window and rolling mouse. | |
| Dynamic: Rotate | If Pan and Zoom Tools are disabled from menu or toolbar | If Select Tool is disabled from menu or toolbar: | Rotate viewpoint by clicking and holding anywhere in display window and rolling mouse. |
| If Select Tool is enabled from menu or toolbar: | Rotate viewpoint by clicking and holding on only background
in display window and rolling mouse. Clicking on a visualized body in this case selects the body and has no effect on viewpoint. | ||
The center and right mouse buttons' mappings are always dynamic.
| Mouse Button | Viewpoint Control | Active | How to Use |
|---|---|---|---|
| Center | Dynamic: Pan | If Select Tool is disabled from menu or toolbar: | Pan field of view by clicking and holding anywhere in display window and rolling mouse. |
| If Select Tool is enabled from menu or toolbar: | Pan field of view by clicking and holding on only background
in display window and rolling mouse. Clicking on a visualized body in this case selects the body and has no effect on field of view. | ||
| Right | Dynamic: Zoom | If Select Tool is disabled from menu or toolbar: | Zoom field of view by clicking and holding anywhere in display window and rolling mouse. |
| If Select Tool is enabled from menu or toolbar: | Zoom field of view by clicking and holding on only background
in display window and rolling mouse. Clicking on a visualized body in this case selects the body and has no effect on field of view. |
![]() | Controlling Body and Body Component Display | Communicating with the Model from the Visualization Window | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |