Test the Viewer Installation
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 virtual world viewer.
Before you can run this example, install the MATLAB®, Simulink, and Simulink 3D Animation products as follows:
In the MATLAB Command Window, type
A Simulink window opens with the model for an inverted pendulum. This model, which you can view in three dimensions with the software, has an interactive set point and trajectory graph.
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 Run. 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 Stipend 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 virtual world viewer window.
Additional examples are listed in the table MATLAB Interface Examples.
In the MATLAB window, type
The MATLAB interface displays the following messages:
View the published version of this example 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 example dialog box to rotate the membrane. Sometimes the Simulink 3D Animation example dialog box is hidden behind the viewer window.