Virtual Reality Toolbox    

View a Virtual World with a Web Browser on the Client Computer

The Virtual Reality Toolbox allows you to simulate a process on a host computer while running the visualization of the process on a client computer. You view the virtual world on the client computer using a Web browser. This client computer is connected to the host computer through a network using the TCP/IP protocol. This means you need to know the name or IP address of the host computer you want to access from the client computer.

Viewing a virtual world on a client computer might be useful for remote computing, presentation of the results over the Web, or in situations where it is desirable to distribute computing and graphical power.

This example explains how to display a simulated virtual world on a client computer. In this case, the client computer is a PC platform with the blaxxun Contact plug-in. The same procedure can be used to view a virtual world remotely on an SGI platform with Cosmo Player. However, blaxxun Contact is the only supported VRML plug-in. In this example, a Simulink window opens with the model of a simple automobile. The automobile trajectory (vehicle position and angle) is viewed in virtual reality:

  1. On the host computer, in the MATLAB Command Window, type
  1. A Simulink window opens with the model of an automobile.

  1. Double-click the VR Sink block. This block is in the right part of the model window.
  1. A Block Parameters: VR Sink dialog box opens.

  1. Select the Allow remote access to world check box.
  1. Note This option allows any computer connected to the network to view your model. You should never select this box when you want your model to be private or confidential.

  1. Click OK.
  2. On the client computer, open your VRML-enabled Web browser. In the Address line, enter the address and Virtual Reality Toolbox port number for the host computer running Simulink. For example, if the IP address of the host computer is 192.168.0.1, enter
  1. To determine your IP address on a Windows system,

    To determine your IP address on a UNIX system, type the command

    Click OK. An IP Configuration dialog box opens with a list of your IP, mask, and gateway addresses.

    Alternatively, for Windows platforms, you can open a DOS shell and type ipconfig.

    The Web browser displays the main Virtual Reality Toolbox HTML page. There is only one virtual world in the list because you only have one Simulink model open.

  1. Click Car in the Mountains.
  1. The Web browser displays a 3-D model of the virtual world associated with the model.

  1. On the host computer, in the Simulink window, from the Simulation menu, click Start.
  1. On the client computer, the animation of the scene reflects the process simulated in the Simulink diagram on the host computer.

    You can tune communication between the host and the client computer by setting the Sample time and Transport buffer size parameters.

  1. Use the Web browser controls to move within this virtual world while the simulation is running.
  2. On the host computer, in the Simulink window, from the Simulation menu, click Stop. On the client computer, close the Web browser window.


  View a Virtual World with a Web Browser on the Host Computer MATLAB Interface