User`s guide
View Virtual World on Host Computer
3-13
View Virtual World on Host Computer
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:
WorldInfo { 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:
1
At the MATLAB command prompt, type
vrbounce
The VR Bouncing Ball example is loaded and becomes active.
2
Open your VRML-enabled Web browser. In the address line of the browser, type
http://localhost:8123
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.