First I would like to say that geometry is far away from my domain.


I have encountered a problem that has a geometric formulation and I don't even know if this is a difficult or an easy problem. 


So here it is, let us be given an n-dimensional ellipsoid such that it is centered at the origin, its algebraic equation is : 


$\sum\_{i=1}^{n}\big(\frac{x\_i}{\lambda\_i}\big)^2=1$ with $\sum\_{i=1}^{n}\frac{1}{\lambda\_i^2}=n$. 


What I am looking for is an explicit parametrization (in any coordinate system) of the surface (a curve for n=3) defined by the intersection of this ellipsoid with the unit n-dimensional sphere. 


Ultimately, my goal is to be able to sample uniformly a point on this surface using this parametrization. I believe this problem is so common that it must have been solved somewhere but I couldn't find any reference.



Parametrization of the intersection of an ellipsoid with a sphere
First, you can find an irrational parametrization of the (n-2)-dimensional intersection surface as follows. Projecting along the first coordinate axis to the hyperplane x1=0, you get an ellipsoid in $R^{n-1}$. Now parametrize the new ellipsoid and invert the projection map; you will get a parametrization of the initial surface involving square roots [1]. 


Second, you may ask of a *rational* parametrization, i.e., parametrization by rational functions. Here is the answer in particular cases:


n=3. The curve you consider is called a *cyclic* [2]. It has a rational parametrization with *complex* coefficients only if it is singular. So, for general values of $\lambda\_i$ there is no rational parametrization. 


n=4. The surface you consider is called (an inverse stereographic image of) a *cyclide* [2,1] (not to be confused with a particular case of Dupin cyclide). Generically it is a *del Pezzo surface* of degree 4 from the point of view of complex algebraic geometry. Thus it always has a rational parametrization with *complex* coefficients,
and even a biquadratic one [4]. But not always real coefficients will work because there are cyclides which are irreducible and disconnected simultaneously. As far as I know, no simple parametrization algorithm is available.


More information about algorithms for rational parametrization can be found in [3].


[1] H. Pottmann, L. Shi, M. Skopenkov, [Darboux cyclides and webs from circles](https://arxiv.org/abs/1106.1354), Computer Aided Geom. Design 29:1 (2012), 77-97.  

[2] J. Coolidge, A treatise on the circle and the sphere, AMS Chelsea Publ., 1971.  

[3] J. Schicho, [Rational Parametrization of Surfaces](https://doi.org/10.1006/jsco.1997.0199), J. Symbolic Computation (1998) 26, 1-29.  

[4] J. Schicho, [The multiple conical surfaces](https://eudml.org/doc/222983), Contributions to Algebra and Geometry, Volume 42 (2001), No. 1, 71-87.


