[CESCG logo] Visualization over the Internet

Andreas Kolb

ak@teleweb.at
Institute of Computer Graphics
Vienna University of Technology
Austria
[CESCG logo]

4. VizWiz

4.1 Introduction

To describe a scientific visualization tool in detail the Java applet VizWiz [Viz], developed at the University of California San Diego, is introduced here in a brief way. As a Java applet VizWiz is completely platform independent and usable over the whole world wide web. It provides basic interactive scientific visualization functionality, such as isosurfaces, cutting planes and elevation plots. The data can be uploaded into the applet by the user via the applet’s web server and the visualization is generated and can be investigated interactively as shown below.

Figure 7: The VizWiz user interface

The unique feature of VizWiz is that it makes interactive scientific visualization possible for any data set across the internet. The viewer’s only prerequisite is a Java enabled browser which are wide spread and available without any fee like Netscape’s Communicator or Microsoft’s Explorer. VizWiz is not only a useful platform independent visualization system but also a demonstration of both the pros and contras of implementing such a complex application as a Java applet.

4.2 Motivation of development

Plenty of scientific visualization tools are available today but all of these applications share a major disadvantage – they are platform dependent. Even some of them are released for multiple platforms, but they are only ported from the source, native platform onto other platforms. This means great work due to the structure of visualization systems. They are graphic intense and often use platform if not even hardware specific routines that are not portable easily. Additionally, developers of multi-platform systems must test the code on every platform, support every version separately and – of course – have deep insights into every platform they develop for. If changes or new releases are made they have to bee made and tested for every platform, too. VizWiz as a Java applet has only to be developed, coded and tested once and also works on every Java supporting platform ranging from a simple 486 PC’s to a SGI or SPARCstation. Nowadays there is no way to perform 3D visualizations on such a wide variety of platforms with so little overhead for both the user and the programmer.

Another main disadvantage of most of the visualization systems out by now is that they must be download or purchased and installed by the user before they can be used or tested. Although this is not really difficult but very annoying, time intense and often disappointing when the system does not meet with the users requirements. In other words it is not possible at all to try out a tool without downloading it, installing and configuring it. Making an application tool available as a Java applet copes with that problem as it runs automatically when the web page in which it is implemented is download by the viewer’s browser. VizWiz also automatically load a sample data set which can be immediately used to get in touch which various functions of VizWiz. Another motivation to develop a system using Java was that VizWiz is resident on the internet and nor locally on the viewer’s machine and can be used from everywhere through the internet.

As a conclusion the main topics of the motivation developing using Java were to provide

4.3 VizWiz and Java

Java has been rumored as the language that will enable a shift in storage of application from the desktop to the internet. The powerful combination of CGI scripts and the WWW itself opens a wide range of possible applications. But these applications have a shared feature. They are based on user input into an HTML form and thus are not interactive in the sense a Java applet makes possible. The main problem while developing VizWiz in Java was that a Java applet is not allowed to access the file system on the machine it is executing for security reasons. How the developers cope with that problem is explained in the next chapter.

4.4 Goals and implementation

As briefly mentioned in the chapter about motivation of development there were several goals the developers wanted to archive which are explained in detail below:

  1. The tool had to be completely platform independent.
  2. It had to be uncomplicated and easy to use, especially the first time.
  3. It had to provide the expected basic set of 3D visualization functionally.
  4. Its performance had to be acceptably interactive and its graphic acceptable attractive, even on low end machines.
  5. Users had to be able to easily use this tool to visualize their own data sets.

4.4.1 Platform independence

Although it is impossible to archive real platform independence, Java is the best way to approximate it. The major problem using Java was the performance as the only way to implement 3D graphics without requiring that the user have installed any supporting software besides a Java enabled browser is to use the standard Java API. As Java programs are interpreted and not executed directly they are generally slower than their counterparts in native code would be. But the loss of performance due to the interpretation is only the smallest one. All the windowing and graphics code VizWiz uses are made through Java which means by software rather than by machine specific accelerators and other hardware. As VizWiz is both computationally and graphically intensive sacrificing of direct hardware graphics support bears the major loss in performance.
This problem will be solved in future releases with the Java 3D API since it will enable to take advantage of 3D hardware.

4.4.2 Ease of initial use

Using Java for developing VizWiz the applet is downloaded automatically and running it the first time is no more difficult than simply visiting a web page. The developers cope with the security problem that Java applets are not granted direct file access in a very special way. This feature is very understandable from the security aspect but is a very hindering one when developing a useful application where it is necessary and obvious for "normal" programs to load data from the users machine and save settings, outputs and temporary files. VizWiz uses CGI scripts and HTML forms to solve this explained in point 5.4.5 "Visualization of users data"

4.4.3 Visualization functionality

As VizWiz needed to provide a set of basic visualization functions the developer included support for isosurfaces, cutting planes, point clouds and elevation plots. All the surface functions are polygon surfaces which can either be filled or visualized using a wireframe. All visualization objects are implemented in the same manner as a set of vertices and connection indices. Additionally a base color for each line or polygon is specified. Furthermore, all visualization services use the same rendering engine which makes it easy to add new services.

In addition to the static position of every polygon two more parameters are calculated by VizWiz. A color based on the base color and the angle the polygon makes with the light source and a distance from the camera used for polygon sorting during rendering.

The control panel on the left side of the window allows to change parameters affecting the display like resolution, scaling and loading files. On the right side there is an inspector panel which is context sensitive, a different one for each object, which allows to change individual parameters for the particular display object. The display area in the center shows the actual visualization and can be rotated by dragging the mouse over it.

4.4.4 Interactivity

To archive both an adequate performance and an interactive visualization tool various techniques had to be used while developing VizWiz. To compensate the loss of performance due to Java’s inability to use potential 3D hardware the developers used smart caching to avoid duplication of computations, simplified rendering and interactive resolution control through the control panel.

4.4.5 Visualization of users data

As VizWiz is running in standard browsers like Netscape or Internet Explorer it has no direct access to the file system of the viewers machine. HTML is not entirely restricted from reading the local file system so the developers used a HTML/CGI workaround to upload the viewers data. The name of the file containing the data to be visualized can be entered by the viewer into an HTML form and the contents of the selected file will be uploaded to the VizWiz server and processed by a CGI script. This script reads the data and generates a new file on the server which is readable by the VizWiz applet and downloadable by the viewer.