begin ; ; Create some dummy data for the surface plot. ; NX = 21 NY = 21 NZ = 21 xi = (/0.055483, 0.138127, 0.808924,-1.501205,-0.891079, 0.141545,\ 1.068575,-1.392315,-0.612384,-0.395337, 1.726188, 0.698080,\ -0.443068, 1.307718, 1.916745, 1.833857, 1.120456,-1.887692,\ -1.028046, 1.824213,-0.2324901/) yi = (/-1.297098, 1.790521,-1.094333,-1.664418,-0.527787, 1.062716,\ 1.120945, 0.501907, 1.668813, 0.427076, 1.479720, 1.033662,\ -0.577471,-0.336375,-1.494247, 0.949919, 1.031587,-0.725059,\ 0.358226,-0.723472, 1.660146/) zi = (/-0.765465,-1.313089,-0.020937,-0.441481, 1.933836, 0.585894,\ 1.291848,-0.741295, 0.079043, 1.141697, 1.466170, 0.327586,\ -1.199072,-0.145940,-1.149510,-0.363842, 1.827387, 1.027802,\ -1.826411,-1.762566, 0.289010/) wi = xi*xi + yi*yi + zi*zi ; ; Create the output grid. ; xmin = -2.0 ymin = -2.0 zmin = -2.0 xmax = 2.0 ymax = 2.0 zmax = 2.0 ii = fspan(0,20.,21) xo = xmin + (ii/(NX-1)) * (xmax-xmin) yo = ymin + (ii/(NY-1)) * (ymax-ymin) zo = zmin + (ii/(NZ-1)) * (zmax-zmin) ; ; Interpolate. ; wo = dsgrid3s(xi, yi, zi, wi, xo, yo, zo) ; ; Create an X workstation. ; wid = create "wks" ncgmWorkstationClass defaultapp end create ; ; Retrieve the GKS workstation id, which is necessary in order to ; interact with low-level libraries. ; getvalues wid "wkGksWorkId" : gkswid end getvalues ; ; Call tdez3d to draw a 3D plot. ; tdez3d(gkswid,xo,yo,zo,wo,3.,2.,-35.,65.,6) frame(wid) ; Advance the frame. end