# How to parametrize the intersection of an ellipsoidal surface and a sphere?

Suppose you have an ellipsoid given by the set,

$$\left\{ x \in\mathbb{R}^3 \mid x^TQx = 1 \right\}$$

where $$Q = \mbox{diag}(a,b,c)$$. Is there a way to parametrize the set

$$\left\{ x \in \mathbb{R}^3 \mid \|p-x\| = k, x^TQx = 1 \right\}$$

where $$Q = \mbox{diag}(a,b,c)$$, $$p\in\mathbb{R}^3$$, and $$k$$ is a real number. In the case I care about, $$a=b$$, but I am unsure if that simplifies the problem much, and the general case might be helpful to others. Notice if $$a=b=c$$ the set is a circle and it is relatively easy to parametrize.

• If $\|p\|$ is large, the set you're hoping to parameterize may well be empty, so you have to expect at least a few "if" clauses in any solution. Commented Jul 21, 2020 at 12:45
• @Hughes I am interested in the case where the intersection is a closed curve. Commented Jul 21, 2020 at 13:32
• I don't think that there is a nice solution. You could express all points $(x,y,z)$ on the sphere as a function of two variables $u$ and $v$ by means of a stereographic projection. Then use $u$ as the parameter and solve $ax^2+by^2+cz^2=1$ for $v,$ which will require to solve a quartic equation. Commented Jul 21, 2020 at 14:13
• @Reinhard Meier I agree with you ; this quartic equation will probably be factorizable in the special case where $p$ is situated so as to generate 2 intersection curves (for example when $p$ is at the origin). Commented Jul 23, 2020 at 7:19