c This is my first attempt to convert xyz (Cartesian) to .obj format,
c initially aimed at reproducing a duct

       program main
       integer i,j,k,l,m,n,ij,nx,nth,nv
       parameter(nx=60,nth=32,nv=nx*nth)
       real*8 a,b,c,d,e,x(nv),y(nv),z(nv),aa(nv)

c       nv=nx*nth   ! number of vertices (more or less)

       open(7,file='solution.sol')
       open(8,file='solution.dat')
       do i=1,nx
         do j=1,nth
          ij=(i-1)*nth + j          ! Should range from 1,...,nv
          read(7,*)x(ij),y(ij),z(ij),aa(ij)!read in coords+data
          write(8,*)x(ij),y(ij),z(ij),aa(ij)!write coords+data
         end do
       end do

       end
