This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Test the Viewer Installation

Section Overview

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.

Simulink Testing

Before you can run this example, install the MATLAB®, Simulink, and Simulink 3D Animation products as follows:

  1. In the MATLAB Command Window, type

    vrpend 

    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.

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

  3. 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.

  4. In the Simulink window, double-click the Trajectory Graph block.

    The Block Parameters: Trajectory Graph dialog box opens.

  5. 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.

  6. Move the mouse pointer into the graph area and click.

    The set point (red circle) for the pendulum position moves to a new location.

  7. In the Simulink window, from the Simulation menu, click Stop.

    The trajectory for the pendulum is displayed in the graph as a blue line.

  8. 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.

MATLAB Testing

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.

  1. In the MATLAB window, type

    vrmemb 

    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.

  2. 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.

See Also

Functions

Related Topics