Java Reference
In-Depth Information
number of knobs, buttons, sliders, and connectors, creation of a realistic 3D instrument and
experiment is an inherently complicated task. Thus, to do this as efficiently as possible, we
have developed a large API library for creating various controls and components needed
in the instruments and virtual laboratory.
Apart from the room and instrument geometry, three important and difficult issues to
bear in mind in such an application are navigating behavior, collision detection and picking
behavior. Specifically, navigating behavior controls how the user is able to walk around
in the virtual laboratory as well as the positions and angles of the view platform, as when
the user attempts to get a better view. The use of appropriate collision detection ensures
that the user is not able to traverse any solid objects such as walls, tables, and instruments,
while a customized picking behavior is necessary for the user to adjust the controls on the
instruments precisely.
Note that besides the use of Java 3D to create the 3D virtual scene, the complete applica-
tion also requires other software components for the control of actual physical instruments.
Also, there is a need to stream real-time experimental data from the actual equipments in
the remote laboratory to the client.
system reference model and WorkInG prIncIple
Before giving details of the Java 3D code in the application, we will first briefly discuss the
framework for the creation of the Web-based 3D real time experimentation. As shown in
Figure 3, this framework makes use of Java 3D to produce an applet to combine with Java
for 3D visualization and the realization of a network connection on the client side.
Note that, usually, 3D visualization consists of both geometry and behavior objects. The
former will include picked, moved, animated and static objects, while the latter consists of
navigating, collision detection, picking, and animating behaviors.
scene Graph and maIn applet
As discussed in earlier chapters, the programming model in Java 3D is based on the use of
scene graph, which provides a simple and flexible mechanism for representing and render-
ing scenes. Basically, the scene graph gives a complete description of the entire scene, and
is makes up of Java 3D objects, called nodes, arranged in a tree structure. The scene graph
of the 3D experiment is given in Figure 4.
In Figure 4, TG denotes a TransformGroup object, BG denotes a BranchGroup object,
S denotes a Shape3D object, and B denotes a Behavior object. There is one higher level BG
object for hosting all the visual objects, which include an oscilloscope, a signal generator,
Search WWH ::




Custom Search