;
; Description: This program illustrates the use of ftsurf.
;
begin
;
; Create the input arrays.
;
nxi = 11
nyi = 17
xi = fspan(0.,1.,nxi)
yi = fspan(0.,1.,nyi)
zi = new((/nxi,nyi/),float)
do i=0,nxi-1
do j=0,nyi-1
zi(i,j) = 0.5 + 0.25*sin(-7.*xi(i)) + 0.25*cos(5.*yi(j))
end do
end do
;
; Set up the output grid.
;
nxo = 31
nyo = 21
xo = fspan(0.,1.,nxo)
yo = fspan(0.,1.,nyo)
;
; Interpolate.
;
zo = ftsurf(xi,yi,zi,xo,yo)
;
; Create workstation object.
;
NCGM=1
X11=0
PS=0
if (NCGM .eq. 1) then
;
; Create an ncgmWorkstation object.
;
wid = create "dsgrid" ncgmWorkstationClass defaultapp
"wkMetaName" : "nm06n.ncgm"
end create
else
if (X11 .eq. 1) then
;
; Create an XWorkstation object.
;
wid = create "dsgrid" xWorkstationClass defaultapp
"wkPause" : "True"
end create
else
if (PS .eq. 1) then
;
; Create a PSWorkstation object.
;
wid = create "dsgrid" psWorkstationClass defaultapp
"wkPSFileName" : "nm06n.ps"
end create
end if
end if
end if
getvalues wid
"wkGksWorkId" : gkswid
end getvalues
;
; Draw plot.
;
xeye = 3.85
yeye = 2.75
zeye = 1.65
drwtd2(gkswid, xo, yo, zo, xeye, yeye, zeye, -6)
end
home |
contents |
defs |
params |
procedures |
exmpls