| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink 3D Animation |
| Contents | Index |
| Learn more about Simulink 3D Animation |
| On this page… |
|---|
The Simulink 3D Animation product includes several Simulink models with the associated virtual worlds. These models are examples of what you can do with this software. You can use one of these examples to test the installation of the Simulink 3D Animation software, the VRML viewer, and the VRML editor.
In the demo folder for the software, there is a Simulink model for a two-dimensional inverted pendulum. This model, which you can view in three dimensions with the software, has an interactive set point and trajectory graph.
Before you can run this demo, you have to install the MATLAB, Simulink, and Simulink 3D Animation products as follows:
In the MATLAB Command Window, type
vrpend
A Simulink window opens with the model for an inverted pendulum.

The Simulink 3D Animation viewer opens with a 3-D model of the pendulum.

In the Simulink 3D Animation viewer, from the Simulation menu, click Start. A Trajectory Graph window opens, and a simulation starts running.

In the Simulink 3D Animation viewer, point to a position on the blue surface and left-click.
The pendulum set point, represented by the green cone, moves to a new location. Next, the path is drawn on the trajectory graph, and then the pendulum itself moves to the new location.
In the Simulink 3D Animation viewer, you see the animated movement of the pendulum. Use the viewer controls to navigate through the virtual world, change the viewpoints, and move the set point. For more information about using the Simulink 3D Animation viewer controls, see Simulink 3D Animation Viewer.
In the Simulink window, double-click the Trajectory Graph block.
The Block Parameters: Trajectory Graph dialog box opens.
From the Setpoint mode list, choose Mouse, then click OK.

You can now use the trajectory graph as a 2-D input device to set the position of the pendulum.
Move the mouse pointer into the graph area and click.
The set point (red circle) for the pendulum position moves to a new location.
In the Simulink window, from the Simulation menu, click Stop.
The trajectory for the pendulum is displayed in the graph as a blue line.

Close the Simulink 3D Animation viewer and close the Simulink window.
You can try other examples in Simulink Interface Examples, or you can start working on your own projects.
This model, which can be viewed in three dimensions with the software, has a MATLAB interface to control the figure in a VRML viewer window.
Additional examples are listed in the table MATLAB Interface Examples.
vrmemb
The MATLAB interface displays the following messages:
View the published version of this demo to learn more about "vrmemb.m".
The Simulink 3D Animation viewer opens with a 3-D model.

Use the viewer controls to move within the virtual world, or use the demo dialog box to rotate the membrane. Note that sometimes the Simulink 3D Animation Demo dialog box is hidden behind the viewer window.

![]() | Installing on the Client Computer | Simulink Interface | ![]() |

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