please change point pt(i*dx*i , j*dy, k*dz); to point pt(i*dx , j*dy, k*dz);
point pt(i*dx*i , j*dy, k*dz);
point pt(i*dx , j*dy, k*dz);