c----------------------------------------------
c      arrow2.f
c    
c      subrtn file : pk2subrtn
c      update 2001-10-15
c       
c----------------------------------------------
c      main program  arrow2.f
c      circle2.f     for triangle mesh program
c----( nx: x point, ny: y point )
       parameter (nx=36,ny=100)
c----( rd1: cylinder hankei, rd2: cone hankei, h: cone takasa )
       parameter (rd1=10.0,rd2=18.0,h=30.0)
c----( cx,cy,cz=cone no chusin ten )
       parameter (cx=-0.8*rd2,cy=-0.6*rd2,cz=0)
c----( p: x,y,z no jun ni set   u: r,g,b no jun ni set )
       dimension p(3*nx*ny)
       dimension u(3*nx*ny)
c----( bottom no chusin no color )
       parameter (br=1.0,bg=1.0,bb=0.0)
c----( cone color )
       parameter (cr=0.0,cg=0.0,cb=1.0)
c
       call initvrml
c
c################################( test data )
       pai=3.1415926
       dd=2.0*pai/float(nx)
       ny1=ny-1
c
       do 10  jj=1,ny1
       do 20  i=1,nx
       do 20  j=1,2
       j1=j+jj-1
       i1=3*(i-1)+1+3*nx*(j1-1)
       i2=i1+1
       i3=i1+2
c x houkou
c      rdi=rd1-(jj-1)*0.1
       rdi=rd1
       p(i1)=j1+rdi*sin(jj*pai/ny)
       p(i2)=rdi*sin(2*pai*i/nx)-rdi*cos(jj*pai/ny)
       p(i3)=rdi*cos(i*2*pai/nx)*-1
c
       u(i1)=1.0-(jj-1)*0.001
       u(i2)=(i-1)*0.001
       u(i3)=jj*0.001
   20  continue
   10  continue
c#############################################
c
c      do 100 i=1,100
c
       call arrow2(nx,ny,u,p,rd1,rd2,h,cx,cy,cz,br,bg,bb,cr,cg,cb)
c
c 100  continue
c
       stop
       end
