c********************************************************************
c      mcubvrm.f    - PointLight -                                  *
c                                                                   *
c         cube main program                                         *
c         subroutine : mcubsub.f                                    *
c********************************************************************
       PARAMETER(NX=268,NY=134,NZ=134)
       parameter(nx2=nx+2,ny2=ny+2,nz2=nz+2)
       parameter(xl=80.0,yl=40.0,zl=40.0)
       parameter(nol=12,itap=8,ico=7)
       parameter(last=1,mb=2,nb=8,iviewp=100)
c             *** mb: mabikisu
       parameter(mxl=nx/mb+1,myl=ny/mb+1,mzl=nz/mb+1)
c
       dimension u(mxl,myl,mzl)
       dimension ic(10),aa(20),zmin(9),zmax(9)
c
       DATA ZMIN/-3.0E-2,     0.0,      0.0,    0.0, -0.0294,
     1           -1.0E-3, -0.8E-4,-3.000E-4,    0.0/
       DATA ZMAX/ 3.0E-2,1.032E-6,   1.0E-3, 1.0E-3,  0.0294,
     1            1.0E-3,  0.8E-4, 3.000E-4, 1.0E-5/
c
       open(21,file='mdd1n720.data',
     1         access='sequential',form='unformatted')
c
c
       dx=xl/float(nx-1)
       dy=yl/float(ny-1)
       dz=zl/float(nz-1)
       px=-1*dx*(nx/2)/2
       py=-1*dy*ny/2
       pz=-1*dz*nz/2
       x0=-1*dx*(nx/2)/2
       y0=-1*dy*ny/2
       z0=-1*dz*nz/2
       ix=px
       iy=py
       iz=pz
c
       call initvrml
       call viewp(iviewp)
       call backgr1(0.3,0.2,0.4)
       call pointlight(0.0,0.0,iviewp)
c
c
       do 10 m=1,itap
       read(21,end=99) u
       if (m.ne.1 .and. m.ne.8)   go to 10
c
       umin=ZMIN(3)
       umax=0.5*ZMAX(3)
c
       do 12 k=1,mzl
       do 12 j=1,myl
       do 12 i=1,mxl
c
       u(i,j,k)=(u(i,j,k)-umin)/(umax-umin)
c
   12  continue
c
c
       ua=0.2
c
c
       ic(1)=m
       ic(2)=mxl
       ic(3)=myl
       ic(4)=mzl
       aa(1)=ua
       aa(8)=xl
       aa(9)=yl
       aa(10)=zl
       aa(11)=x0
       aa(12)=y0
       aa(13)=z0
c
c
       call csuba(ic,aa,u,mxl,myl,mzl)
c
   10  continue
   99  continue 
c
       stop
       end
