implicit real*8 (a-h, o-z)
dimension w(3000000),x(3000000),y(3000000),z(3000000),&
&         mesh(1000000,6),narabi(10000,10000)
integer :: j,n
n=8
!nの値は周方向分割数で何角形か入力する
m=20
!mの値は高さ方向分割数で何分割か入力する
!データ入力
print *,"節点数を入力して下さい"
read*, nset !節点数の読み込み
do i=1,nset
!print *,"それぞれの節点を入力して下さい"
read*, w(i),x(i),y(i),z(i)!各節点の座標値の読み込み
end do
print *,30*n*m-6*n*(m-1)+1,",",x(6),",",y(6),",",z(6)
print *,30*n*m-6*n*(m-1)+2,",",x(4),",",y(4),",",z(4)
!iは1から高さ方向分割数の半分の値までを入力する
do i=1,10
print *,30*n*m-6*n*(m-1)-1+4*i,",",x(12*n*i-6*n+2),",",y(12*n*i-6*n+2),",",z(12*n*i-6*n+2)
print *,30*n*m-6*n*(m-1)+4*i,",",x(12*n*i-3*n+2),",",y(12*n*i-3*n+2),",",z(12*n*i-3*n+2)
print *,30*n*m-6*n*(m-1)+1+4*i,",",x(12*n*i+3),",",y(12*n*i+3),",",z(12*n*i+3)
print *,30*n*m-6*n*(m-1)+2+4*i,",",x(12*n*i+3*n+2),",",y(12*n*i+3*n+2),",",z(12*n*i+3*n+2)
end do
print*,30*n*m-6*n*(m-1)+m*2+2,",",x(6*m*n+3*n+7),",",y(6*m*n+3*n+7),",",z(6*m*n+3*n+7)
do i=1,10
print *,30*n*m-6*n*(m-1)+m*2-1+4*i,",",x(36*n*i+6*m*n-21*n+1),",",y(36*n*i+6*m*n-21*n+1),",",z(36*n*i+6*m*n-21*n+1)
print *,30*n*m-6*n*(m-1)+m*2+4*i,",",x(36*n*i+6*m*n-12*n+2),",",y(36*n*i+6*m*n-12*n+2),",",z(36*n*i+6*m*n-12*n+2)
print *,30*n*m-6*n*(m-1)+m*2+1+4*i,",",x(36*n*i+6*m*n-3*n+2),",",y(36*n*i+6*m*n-3*n+2),",",z(36*n*i+6*m*n-3*n-1+2)
print *,30*n*m-6*n*(m-1)+m*2+2+4*i,",",x(36*n*i+6*m*n+6*n+1),",",y(36*n*i+6*m*n+6*n+1),",",z(36*n*i+6*m*n+6*n+1)
end do
end

