Normally, you view a virtual world by double-clicking the VR Sink in the Simulink® model. The virtual world opens in the Simulink 3D Animation™ Viewer or your VRML-enabled Web browser, depending on your DefaultViewer setting. For more information on setting your default viewer, see Set the Default Viewer.
Alternatively, you can view a virtual world in your Web browser by selecting an open virtual world from a list in your Web browser. You can display the HTML page that contains this list by connecting to the Simulink 3D Animation host. This is the computer on which the Simulink 3D Animation software is currently running. You do not need a VRML-enabled Web browser to display this page.
Note that a virtual world appears on this list in your Web browser only if the vrworld Description property contains a string. If this property is empty for a virtual world, that world is not accessible from the remote host. The simplest way to set a world description is to define the virtual world VRML file WorldInfo node and fill in the title field for that node. You can set up the WorldInfo node to look like the following:
title "My First World"
info [ "Author: XY" ]
The vrworld object uses the title string in the VRML file for the Description property of the vrworld object. You can change this property with the Simulink 3D Animation MATLAB® interface (vrworld/set).
The following procedure describes how to connect to the Simulink 3D Animation host:
The VR Bouncing Ball example is loaded and becomes active.
Note To connect to the main HTML page from a client computer, type http://hostname:8123, where hostname is the name of the computer on which the Simulink 3D Animation software is currently running.
The following page is loaded and becomes active.
The main HTML page for the Simulink 3D Animation product lists the currently available (active) virtual worlds. In this example, the VR Bouncing Ball virtual world appears as a link.
The VR Bouncing Ball virtual world appears in your Web browser.
From the main HTML page, you can select one of the listed available worlds or click the reload link to update the status of the virtual worlds supported by the software. This page does not require the VRML capabilities from the browser; it is a standard HTML page. Nevertheless, when you click one of the virtual world links in the list, the browser has to be VRML-enabled to display the virtual world correctly and to communicate with the Simulink 3D Animation product.