PHOTON USE
    x
    x1
 
 
    msg(  PLANT generated grid
    gr z 1
    gr z m
    gr y m
    ENDUSE
 
TEXT( 3D snail-like chamber
 
    GROUP 6. Body-fitted coordinates or grid distortion
nx=25;ny=10;nz=20
bfc=t
dumpc(grid);readco(grid) 
CSG1=PHI;CSG2=XYZ;lsweep=1;IDISPA=1
STORE(MARK)
NAMSAT=MOSG

   PLANTBEGIN
real(twopi,littler)
littler=1.0;twopi=2.0*3.14157
RG(1)=TWOPI
    XC=:LITTLER:*FLOAT(J-1)/FLOAT(NY)*   $
                (COS(RG(1)*FLOAT(I-1)/FLOAT(NX))$
                +RG(1)*FLOAT(I-1)/FLOAT(NX)$
                *SIN(RG(1)*FLOAT(I-1)/FLOAT(NX)))
    YC=:LITTLER:*FLOAT(J-1)/FLOAT(NY)*   $
                (SIN(RG(1)*FLOAT(I-1)/FLOAT(NX))$
                -RG(1)*FLOAT(I-1)/FLOAT(NX)$
                *COS(RG(1)*FLOAT(I-1)/FLOAT(NX)))
    ZC=10.*FLOAT(K-1)/FLOAT(NZ)
   PLANTEND

dmpstk=t
DISTIL=T
EX(MARK)=1.000E-10
 LIBREF=507
STOP