!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
begin procedure show-window-xv
  ! XV
  user\go xv
  !
  define integer iy npanel
  let npanel abs((true%last[1]-true%first[1]+1)/true%step[1])
  !
  define image win 'cube%dir%tmp''cube%name'"-wind.vlm" read
  define real xpos['win%dim[2]'] vleft['win%dim[2]'] vright['win%dim[2]']
  let xpos[ix] win%convert[2,2]+(ix-win%convert[1,2])*win%convert[3,2]
  greg1\set blanking win%blank[1] win%blank[2]
  !
  define integer jw
  for ipanel 1 to npanel
     ! Define plane corresponding to window 'iwindow'
     let iy true%last[1]-true%step[1]*(ipanel-1)
     ! Go to the corrresponding directory
     gtvl\change directory <greg<p'ipanel'
     let jw 1
     for iw 1 to win%dim[1]/2
        let vleft  win['jw',,iy]
        let vright win['jw+1',,iy]
        greg1\connect xpos vleft
        greg1\connect xpos vright
        let jw jw+2
     next iw
  next ipanel
  gtvl\change directory <greg
  !
  gtvl\lens
  !
end procedure show-window-xv
!
begin procedure show-window-vy
  ! VY
  user\go vy
  !
  define integer ix npanel
  let npanel abs((true%last[1]-true%first[1]+1)/true%step[1])
  !
  define image win 'cube%dir%tmp''cube%name'"-wind.vlm" read
  define real ypos['win%dim[3]'] vleft['win%dim[3]'] vright['win%dim[3]']
  let ypos[iy] win%convert[2,3]+(iy-win%convert[1,3])*win%convert[3,3]
  greg1\set blanking win%blank[1] win%blank[2]
  !
  define integer jw
  for ipanel 1 to npanel
     ! Define plane corresponding to window 'iwindow'
     let ix true%last[1]-true%step[1]*(ipanel-1)
     ! Go to the corrresponding directory
     gtvl\change directory <greg<p'ipanel'
     let jw 1
     for iw 1 to win%dim[1]/2
        let vleft  win['jw',ix,]
        let vright win['jw+1',ix,]
        greg1\connect vleft  ypos
        greg1\connect vright ypos
        let jw jw+2
     next iw
  next ipanel
  gtvl\change directory <greg
  !
  gtvl\lens
  !
end procedure show-window-vy
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
if .not.exist(cube%name) then
  define character cube%name*256 /global
endif
if .not.exist(cube%type) then
  define character cube%type*12 /global
endif
let cube%name 'name'
let cube%type 'type'
let name 'cube%dir%raw''name'
let type lmv
if ("&1none".eq."xvnone") then
   @ show-window-xv
else if ("&1none".eq."vynone") then
   @ show-window-vy
else
   @ show-window-xv
   @ show-window-vy
endif
let name 'cube%name'
let type 'cube%type'
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
