# tdez3d

tdez3d uses Tdpack entries to draw an isosurface on a specified workstation.

## Synopsis

procedure tdez3d(
wid[1]    : graphic,
x[*]      : float,
y[*]      : float,
z[*]      : float,
u[*][*][*]: float,
value[1]  : float,
rmult[1]  : float,
theta[1]  : float,
phi[1]    : float,
ist[1]    : integer
)

## Arguments

wid
An NCL workstation identifier for where you want to draw your surface. The identifier wid is the value returned from an NCL call that created a workstation.
x
A 1-dimensional array specifying X-coordinate values.
y
A 1-dimensional array specifying X-coordinate values.
z
A 1-dimensional array specifying Z-coordinate values.
u
A 3-dimensional array specifying functional values at the X, Y, and Z coordinate values in the first three arguments. The values of u are stored with the first dimension varying the fastest, i.e. u(i,j,k) is the data value at (x(i),y(j),z(k)) for i=0, dimsizes(x), j=0,dimsizes(y), and k=0,dimsizes(z).
rmult, theta, phi
Values specifying an eye position (the point from which the isosurface will be viewed); these values are defined as follows:

• rmult is a multiplier of the diagonal length (DL) of the smallest box containing the surface to be drawn.
• theta is an angle (in degrees) in the XY plane measured positive counter-clockwise from the X axis
• phi is an angle (in degrees) measured from the positive Z axis toward the XY plane.

Thus, the coordinate (rmult*DL,theta,phi) is the spherical coordinate for the eye position. If rmult = theta = phi = 0., a default eye position ( 2.5,-55.,70.) is chosen.

The point looked at is calculated to be the midpoint of the box determined by the x, y, and z array limits.

ist
A style index defining the colors used to shade the isosurface. The legal values for ist are as follows:

istDescription
1produce a wire-frame surface

If ist is positive, then black is used for the background color and white for the foreground color; if ist is the negative of any of the above values, then white is used for the background color and black for the foreground color. If ist falls outside of the legal range, it is defaulted to 6.

## Description

When tdez3d is called, a color table is defined for the workstation specified by wid in the first argument. This color table will supersede any color table that has been previously defined. The color table that is defined is:

Color indexColors
0black if IST is positive; white if IST is negative
1white if IST is positive; black if IST is negative
2red
3green
4blue
5cyan
6magenta
7yellow
8-37grayscale from white to black

tdez3d does not call frame.

## Example

The following code fragment:

;
;  Create an X11 workstation.
;

wid = create "tdez3d_example" xWorkstationClass defaultapp
"wkPause" : True
end create

;
;  Draw isosurface plot.
;
tdez3d(wid, xo, yo, zo, u, 1., 0., 0., 0., 6)
frame(wid)
will draw an isosurface plot of the u array (with isovalue 1.) in shades of cyan with a black background using a default eye position.

### Reference Manual Control Panel

\$Revision: 1.4 \$ \$Date: 1998/11/11 23:32:23 \$