PLT3D plots a 2 dimensional array as a surface scribed with a linear grid parallel to the x and y axes, i.e., a mesh. Hidden lines are supressed. Transformation from the array indices (i,j) to (x,y,z) is:
x = xl * .5 * float(2*j-n-1)/float(n-1) y = yl * .5 * float(2*i-m-1)/float(m-1) z = zs * (a(i,j) + z0) Thus, (1,1) is (-xl/2,-yl/2) (m,1) is (-xl/2,+yl/2) (1,n) is (+xl/2,-yl/2) (m,n) is (+xl/2,+yl/2) xplotted = x*cos(az) - y*sin(az) + x0 yplotted = x*sin(az)*sin(al) + y*sin(az)*sin(al) + z*cos(al)+y0
The common block PLT3B returns these transformation parameters so that the plotted location (xp,yp) of a point (i,j,zr) may be computed as:
xp = a1 * j + a2 * i + a3 yp = b1 * j + b2 * i + b3 * zr + b4
The dimension of the second set of working arrays is dependent on the surface complexity -- the greater the surface complexity, the greater l2 must be. As a minimum, l2 > l. See also NXTVU and HLT3D.
CALL PLT3D (a,md,nd,m,n,w,l,w2,l2,al,az,xl,x0,yl,y0,zs,z0,ierr) a (R): array of values to be plotted dimensioned a(md,nd) md,nd (I): array dimensions m,n (I): size of data in array to be plotted w (R): working array dimensioned w(l) l=>4*min(m,n) l (I): working array dimension w2 (R): working storage array dimensioned w2(l2) l2 (I): working storage array dimension (see note) al (R): viewing altitude angle az (R): viewing azimuth angle xl,yl (R): length of unprojected axes (plot units) x0,y0 (R): plot origin zs (R): z coordinate scale factor z0 (R): z coordinate offset ierr (I): (returned) error code = 0 : ok = 1 : l2 not large enough in NXTVU = 2 : l not large enough COMMON /PLT3B/ a1,a2,a3,b1,b2,b3,b4