Main Content

Display Virtual World and Start Simulation

This example explains how to display a simulated virtual world using the Simulink® 3D Animation™ Viewer on your host computer. The Simulink 3D Animation Viewer is the default and recommended method for viewing virtual worlds. A Simulink window opens with the model of a simple automobile. Automobile trajectory (vehicle position and angle) is viewed in virtual reality:

  1. In the MATLAB® Command Window, type

    vrtut1
    

    A Simulink window opens with the model of an automobile.

    A virtual world viewer also opens with a 3-D model of the virtual world associated with the model.

  2. In the Simulink 3D Animation Viewer, from the Simulation menu, click Run.

    The simulation starts. In the Simulink 3D Animation Viewer, a car moves along the mountain road.

  3. Use the Simulink 3D Animation Viewer controls to move the camera within this virtual world while the simulation is running. For more information on the Simulink 3D Animation Viewer controls, see Simulink 3D Animation Viewer.

  4. In the Simulink 3D Animation Viewer, from the Simulation menu, click Stop.

See Also

Functions

Blocks

Related Topics