c***********************************************************
c      main program  triangm2.f                            *
c                          /home/g3/inayoshi/VRML/subrtn3  *
c***********************************************************
c      main program  triangm2.f
c      triangm1.f    for triangle mesh program
c----( nx: x point, ny: y point )
c----( p: x,y,z no jun ni set   u: r,g,b no jun ni set )
c      parameter (nx=100,ny=100)
       parameter (nx= 40,ny= 40)
       dimension p(3*nx*ny)
       dimension u(3*nx*ny)
c
       call initvrml
c
c################################( test data )
       pai=3.1415926
       rd=10.0
       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
       p(i1)=i
       p(i2)=j1
       p(i3)=rd*sin(float(i)*dd)
c
       u(i1)=1.0-j1*0.01
       u(i2)=j1*0.01
       u(i3)=i*0.01
   20  continue
   10  continue
c#############################################
c
       call triangm(nx,ny,u,p)
c
       stop
       end
