3D Scalar Field

This section covers the most basic data structure in OpenDX, the "Field", which contains "components". A valid Field contains at minimum the components "data", "positions", and "connections". For each "element" in the data component, there is a corresponding "element" in the position and connections component. An element can be a scalar, vector, or matrix.

In this section the Construct module is used to create a field. From the top menu bar, select File, Open Program, type /usr/local/swss/Lab7/nets/*.net in the Filter section, the file 3DScalar.net, and OK.

You should see a set of green boxes on the VPE canvas. Double click on the green Construct module box. You will see user-defined options used to create a Field. The text placed in the boxes tell the Construct module to create a grid with intersection points at [0,0,0], [1,0,0], [2,0,0], [0,1,0], [0,2,0], ... [2,2,2]. Associated with these grid points are the (scalar) data elements 1.0, 2.0, 3.0, 4.0, 5.0, ... 27.0, respectively. Select the "Description" or "Help on Syntax" buttons for more information.

Execute the network by typing CTRL-E (or Execute, Execute Once on the top VPE menu bar). A message window will pop up with the output of the Print module.   Study the output in the message window. Notice that the positions component of the field is represented by words. For regular grids, OpenDX stores the grid positions in this form. This is done to conserve memory; OpenDX does not allocate memory for the grid points values until it is necessary (usually during the rendering of an image).

The connections component is also represented in a compact form. The connections component tells OpenDX how the grid points are connected. We will return to the connections component later in this exercise.

There is also a box component. This component is used by the Image module so it knows the spatial extent of the object represented by the Field. This box values are analogous to the values that represent the bounding box in the header of an encapsulated postscript file (.eps).

Next, render this Object by connecting the output tab of "Construct" to the input tab of "ShowConnections", which is in turn connected to an "Image" module, and finally type CTRL-E. You should see a window with yellow lines that represent grid point connections. The ShowConnections module adds a component to the field on its input that describes how the connection lines should be rendered (e.g., color, transparency) and passes this to the Image module which uses this rendering information.  Rotate the image slight to see that it is indeed three dimensional.  Draw an axes in the image window by selecting (in the image menu bar) Options, AutoAxes, AutoAxes enabled, Frame On, Grid on, OK. Then type CTRL-E.

Things to do