Solid Geometry (Simple) Problem. How do I compute the radius of a circle generated by an intersection between an ellipsoid and a plane? I'm getting crazy. I'm not a mathematician but I need such an answer to implement a functionality in my project.
More precisely my question is the following. I have an ellipsoid (a spheroid actually) of which I know the measure of the axis. Now, a plane intersects the spheroid perpendicularly to on axis (the different one from the other two). On the top of the spheroid I now hav a circle, with a radius. I know at which height the plane has intersected the spheroid, it is possible to compute the radius of this circle, depending on the height at which it intersect the spheroid?
 A: Certainly. If the spheroid isn’t in standard position—centered on the origin and the $z$-axis as the odd-length axis, then translate and rotate so that it is. The equation of the plane will now be of the form $z=k$. Substituting this into the transformed spheroid equation $${x^2+y^2\over a^2}+{z^2\over b^2}=1$$ gives you the equation of a circle, which you can rearrange into the standard-looking $$x^2+y^2 = a^2\left(1-{k^2\over b^2}\right).$$ The quantity on the right-hand side is the square of the circle’s radius.  
There are other ways to compute this, but they also effectively involve transforming the spheroid into a more convenient form.
A: Model of the spheroid:
Assume the points on the spheroid are described by
$$
(x/a)^2 + (y/a)^2 + (z/c)^2 = 1
$$
which means the center is at the origin and the spheroid has the axes $a$ and $c$.
Model of the plane:
The plane can be modeled as
$$
d
= n \cdot u
= (0,0,1) \cdot (x, y, z) 
= 0\cdot x + 0 \cdot y + 1 \cdot z
= z
$$
which is a plane with unit normal vector $n$ and distance $d$ from the origin.
The intersection curve:
Then the intersection consists of all points fulfilling both equations.
So we have
$$
(x/a)^2 + (y/a)^2 + (d/c)^2 = 1 \\
z = d
$$
This can be rearranged into
$$
x^2 + y^2 = a^2 \left( 1 - (d/c)^2 \right) = r^2 \\
z = d
$$
which are the equations of a circle in the $x$, $y$ plane at height $d$ with radius
$$
r = a \sqrt{1 - \left(\frac{d}{c}\right)^2}
$$
if $d < c$.
Update:

You can fiddle with the model here.
