Interpolation: How to generate 3D objects from 2D cross-sections? Consider a sphere sitting on an $xy$-plane, and take 2D slices parallel to the $xy$-plane at various heights of z. Suppose we take 10 slices, evenly spaced along the $z$-axis, and now have 10 images of circles each with a corresponding $z$. 

My goal would be a function that could learn from these 10 slices, such that if I were to input a new value of z, it would draw a circle (that is ideally close to the correct circle at that height). 

Would there be a way to train something like a neural network to take the height z as the input, and output circles corresponding to the slice of a sphere at a particular height?

Such a method should scale to multiple dimensions. For example, if I had some multidimensional object I wished to reconstruct using slices of that object. Note that the parameter corresponding to slices may now be a vector.

EDIT:
The goal is to interpolate between 2D shapes that do not have simple analytic solutions. For example, one image is a circle and another is a rectangle.

The problems I am facing are where there are no simple analytic solutions for new shapes as a function of z. Imagine that there exists a very rugged non-linear 3D object (like the cross section of a person) - but we can only determine a few slices of this object as it is computationally expensive for some reason. We wish to interpolate between these few slices and generate a 3D object. Such a solution should also work for strange multidimensional shapes beyond 3D.
A neural network is not a good choice for this.  For this task, you can get a much better solution by analytically solving for the unknown radius of the sphere.  In particular, if the radius of the sphere is $s$, then a slice at height $z$ will have radius $r$, where these three variables satisfy the equation

$$(s-z)^2 + r^2 = s^2.$$

Re-arranging, we find

$$s = {z^2 + r^2 \over 2z}.$$

So, you can solve immediately for the radius of the sphere.  Once you know the radius of the sphere, you can predict the radius of other slices at any height of your choice, using the above equations a second time.



You could certainly train a neural network to interpolate, given enough training data.  For instance, the input to the neural network might be 6 images: the three slices "above" z, and the three "below", and the output is a bunch of slices interpolated between the one above z and the one below; where each image is a picture of the slice.  However I'm not sure how well this will work, and it will likely require a lot of training data to have any chance whatsoever of being useful, so you might do better to look for some other solution.