TEXT(Helical-pipe grid, made by DO loop :B102 TITLE originated by dbs April '93 nx=8;ny=6;nz=12 bfc=t mesg(create helical grid? y/n readvdu(ans,char,y) if(:ans:.eq.y) then mesg(this q1 creates a helical grid by means of a DO loop real(xx,yy,zz,zfac,snxx,csxx,littler,bigr) real(twopi,xxc,yyc,zzc,yyy,cszz,snzz) littler=0.2;bigr=1.0;twopi=2.0*3.14157 gset(d,nx,ny,nz) nx ny nz do ii=1,nx+1 ii xx=twopi*(ii-1)/nx snxx=sin(xx) csxx=cos(xx) do jj=1,ny+1 yy=littler*(jj-1)/ny xxc=yy*csxx yyy=yy*snxx do kk=1,nz+1 zfac=(kk-1)/nz zz=twopi*zfac cszz=cos(zz) snzz=sin(zz) yyc=(bigr+yyy)*cszz zzc=(bigr+yyy)*snzz xc(ii,jj,kk)=xxc+zfac*2.0*littler yc(ii,jj,kk)=yyc zc(ii,jj,kk)=zzc enddo enddo enddo else mesg(read a grid file? y/n readvdu(ans,char,n) if(:ans:.eq.y) then + nx=12;ny=6;nz=24 + readco(xyz) endif endif view(j,ny+1) gview(p,1,1,1);gdraw