We have along the z-axis the movement from Z1 to Z'. We take infinitesimal slices parallel to the xy-plane
Along the x-axis we have the movement from some value of x depending upon ratio of Z'/Z1-Z0 to x = D on the right. I think the proper function for x on the left is x = D * (2Z'-Z1-Z0)/(Z1-Z0). You can see that if Z' = Z0, then x = -D, which is expected for a full circle. If Z' = Z1+Z0/2 or halfway across, then x = 0, a semicircle as expected and if Z' = Z1, then x = D or at the right hand side. It is important to realize that we're taking the area of circle segments, and the circle is segmented by a vertical line that depends upon the value of Z' at the moment. We consider the area of the circle to the right of this vertical line in the xy-plane
However this value of starting x will decrease as we move along the z axis from Z' to Z1, where x = D and the area will decrease to 0.
Along the y-axis we have the movement from -y to +y where y is either the bottom or top of a circle of radius D. We can simplify y to run from 0 to +y at the top of the circle and double this area.
If I am not making a mistake, I believe the integral is
for z = Z' to Z1 the integral of ( for x = D*(2z-Z1-Z0)/(Z1-Z0) to D ( 2 * integral of (for y = 0 to sqrt(D^2-x^2) dy ) ) dx ) dz
Can someone who has a symbolic algebra program check this? I hope the triple integral is readable.