
       implicit integer*4(i-n)
       implicit real*8(a-h,o-z)
       parameter(nmax=1000)
       dimension x(nmax),y(nmax)
       dimension ax(nmax,nmax),bx(nmax,nmax),cx(nmax,nmax)
      
       write(6,'(a,$)')'rint: '
       read(5,*)rint
       write(6,'(a,$)')'rext: '
       read(5,*)rext
       write(6,'(a,$)')'nr: '
       read(5,*)nr
       write(6,'(a,$)')'nt: '
       read(5,*)nt
       write(6,'(a,$)')'angulo: '
       read(5,*)theta
       
       pi=3.141592653589d+00
c       nx=4
c       ny=10
c       hx=15.d+00
c       hy=30.d+00
      
      dtheta=theta/dfloat(nt)
      dr=(rext-rint)/dfloat(nr)

      do i=1,nr+1
          x(i)=rint+dfloat(i-1)*dr
      enddo
      
      do i=1,nt+1
          y(i)=dfloat(i-1)*dtheta
      enddo
      
      do j=1,nr+1
        do i=1,nt+1
          ax(i,j)=x(j)*cos(pi/2.+y(i))
          bx(i,j)=x(j)*sin(pi/2.+y(i))
          cx(i,j)=x(j)*(pi/2.+y(i))
        enddo
      enddo
      
      open(unit=10,file='datos3.txt',status='unknown')

      write(10,'(2i5)')nr,nt
      write(10,*)
      
      do i=1,nt+1
        do j=1,nr
          write(10,100)ax(i,j)
        enddo
        write(10,101)ax(i,nr+1)
      enddo
        write(10,*)      
      do i=1,nt+1
        do j=1,nr
          write(10,100)bx(i,j)
        enddo
        write(10,101)bx(i,nr+1)
      enddo
        write(10,*)      
      do i=1,nt+1
        do j=1,nr
          write(10,100)cx(i,j)
        enddo
        write(10,101)cx(i,nr+1)
      enddo
      
 100   format(e15.6,$)
 101   format(e15.6)
      close(10)
      


      end
      

       