2. Visualization Techniques


2.1 Introduction to the Vis software

Introduction to IBM Visualization Data Explorer (DX) software will be done in several steps. In Section 2.1 we start by explaining the user interface and programming primitives of the language, then we discuss the external and internal data model. We will then explain several example programs starting in Section 2.2.

2.1.1 The user interface components and dataflow design.

This section is intended to be a brief introduction to the terminology and use of DX. It is not intended to replace IBM documentation or the very complete tutorial supplied with DX.If you have installed DX on your UNIX system and obtained a trial key you can type "dx -tutor" in a shell window on your workstation to start DX in tutorial mode.

On startup, DX presents the user with a Visual Program Editor (VPE) window. The VPE holds a visual representation of a program to be executed by DX. A DX program is represented in the VPE by a block diagram which shows functional units, called "modules" (or in the IBM documentation "tools") connected by lines or (or in the IBM documentation "arcs"). Modules are selected from a hierarchical menu on the left side of the VPE, then dropped onto the design area by a mouse click. Connections are made by dragging a line from a module output to a module input with the mouse.

In addition to the VPE there are several other important windows which DX uses:

A typical use of DX is to import some data, perhaps transform the data, extract visible geometry from the data (e.g. turn a vector field into arrows) and render the geometry (make a picture). It is impossible to describe the combinations of modules you might use, but we will describe the functions of a selected modules in section 2.2 through 2.6 in the context of specific programs. It is certainly useful to copy and modify the programs given below. In order to construct new programs using all of the features of DX, you will need to learn how DX represents data. Section 2.1.4 is a short introduction, but you will need to experiment and read the IBM documentation.


2.1.2 The functions of specific dataflow modules.

A summary of the modules which are supplied with DX shows a wide range of function. A few general aspects of the modules will be explained here, with specific examples below in sections 2.2 to 2.6. There are also some module tutorials from Worchester Polytechnic Institute.

A DX program must:

In addition, a program may:


2.1.3 The external data model.-- Getting data into DX

DX can accept external data in several formats including flat arrays written by C of FORTRAN, CDF, netCDF, HDF and native DX formats. (See also Data Explorer file formats.) We will consider here just two dataset formats:

Details and examples of data input.


2.1.4 The internal data model.

The DX data structures are designed to be very flexible. A variety of gridding schemes are supported, in n-dimensions, with scalar, vector, or tensor data, and multiple datasets defined on the same spatial grid.

The basic unit of data organization is the "field". A field consists (minimally) of positions in space and data at each of the positions. Usually a field also includes connections which form an interpolation grid so that a data value may be interpolated from the existing positions to other points in space.

Information in a field is organized as several named "components". All fields have a "positions" component and most have "data" and "connections" components. There may, however, be many components in one field including "normals", "colors", "invalid positions" and "opacities". Each component consists of a header and an array. The array stores the actual values of the component, while the header describes the array.

Modules in DX may:

Fields may be combined together in "groups" and later refered to by name or index. Groups may be further combined to produce very complex hierarchies. A DX program always combines all objects together so that one group is submitted to the Image module for viewing.

An example showing various data structures using the VisualObject module may help clarify the various structures and show you how to investigate your own DX programs.

Details and examples of the internal data structure.


2.2 A simple particle system

A program to visualize a particle system must be able to show the positions and sizes of the particles, and must be able to show supporting information about the calculation. In the following example, a simplified, 2D, billiards system was simulated, and the time sequence of ball positions stored in files. A DX program shows a minimal scheme to visualize the balls and the walls of the table.

The following link loads DX and runs the Data Explorer program explained above to import a time-series of particle positions. If you have never used this DX launcher from the Web before be sure to read (footnote.1). After the program loads and starts, press the forward-play button on the "VCR control" (sequencer). The program will load a series of 120 simulation steps and animate them.

Exercises using and extending the basic particle program described above.


2.3 Scalar Fields

A program to visualize a scalar field must extract a viewable entity from the field. This DX program extracts isosurfaces from a 3D field, and contour lines from a 2D field derived by taking a 2D slice out of the 3D field. One of the exercises below shows how to view a scalar field without extracting an explicit surface, but rather by volume rendering.

The following link loads DX and runs a program to image a scalar field. If you have never used this DX launcher from the Web before be sure to read (footnote.1). When the program is running you can rotate the viewpoint by clicking and dragging in the image window. You can also change the control panel values and recompute an image by clicking on the Execute menu and choosing the "Execute Once" item. You will get an error if all three components of the "Clipplane normal" are set to zero.

Exercises using and extending the basic program described above.


2.4 Vector fields

A program to visualize a vector field must extract viewable entities from the field. This DX program extracts both vector glyphs and streamlines from the field.

The following link loads DX and runs a program to image a vector field. If you have never used this DX launcher from the Web before be sure to read (footnote.1). Try changing the start point of the streamlines.

Exercises using and extending the basic program described above.


2.5 Human-designed objects

There are many ways to build objects for computer graphic display, just as there are many ways to build objects in the real world. This section will directly cover two techniques:

2.5.1 Polyhedral surfaces

To specify a polyhedron from 3D vertex coordinates, you need the coordinates and a list describing how the vertices are connecte to form faces of the polyhedron. The process is described in detail. There is an applet which allows you to interactively design polyhedra from their coordinates. We will also show how to perfrom this operation in DX.

A program to construct polyhedran surfaces needs to convert a list of vertices and faces into DX field structure for display or manipulation. This DX program builds the DX data structures for polyhedra.

The following link loads DX and runs a polyhedron designer program. If you have never used this DX launcher from the Web before be sure to read (footnote.1). When you start the program, it will be loaded with the data to produce a tetrahedron. The initial control panel has two interactors. The one on the left is a list of the vertices of the tetrahedron. The interactor on the right speifies triplets of these vertices (by index number) for each of the four faces. You can modify, add, or delete vertices and faces using the interactor controls.

Exercises using and extending the polyhedron program described above.

2.5.2 Parametric surfaces

A parametric surface is a surface defined as a 3-vector function of two variables:
S = [ f(v,w), g(v,w), h(v,w) ]
With 0.0 <= (u,v) <= 1.0
One way of thinking of of such a function is that you start with a square rubber sheet of unity size (in u,v space) then bend and stretch it to some 3D shape which passes through some (x,y,z) points. There is an applet which allows you to try some predefined functions or define your own. You can think of the continuous functions as moving a finite number of vertices through space, and dragging along connections between them which define small polygons. A parametric equation thus gives you a way to construct complex surfaces made of many polygons without having to specify (by hand) the coordinates of all the vertices.

A program to construct parametric surfaces needs to specify three scalar function for each of the x,y,and z coordinates as a function of (u,v). This DX program builds a parametric surface.

The following link loads DX and runs a parametric surface designer. If you have never used this DX launcher from the Web before be sure to read (footnote.1). The default control panel setting are for a torus. Modifying the x,y and z expressions will modify the shape drawn.

Exercises using and extending the parametric surface program described above.

2.5.3 Other Object construction Resources

Other techniques are covered in the documentation for a graphics course taught at Cornell University. Refering to that page, lab exercises:

1 -- Building a simple polygonal object.
2 -- Parametric Surfaces.
3 -- Transformations and Hierarchical Modeling.
11 -- Implicit Surfaces and Constructive Solid Geometry.
deal with building surfaces. If you intend to run any of the programs given in these course pages, be sure to follow the directions given in the section Getting Started. Particularly note that the DX programs must be explicitly downloaded before they may be run and that a few DX macros must be downloaded first.

There is a page of DX macros which generate various objects including quadric surfaces, clock faces, regular polyhedra, and annotation overlays,



Go Back to
Section 1.0


Go Forward to
Section 3.0


footnote.1 -- A link to start DX running requires some modifications to your Netscape environment.