Equation of a cylinder with a profile / ellipsoid I have a geometry of a cylinder that is curved along both the lengths where there is generally a height of a cylinder. I am aware of the equation of a cylinder. I wanted to know what could the equation of a curved cylinder be as a function of the x,y, and z coordinates.? Also, could this curved cylinder be called an ellipsoid?
I have attached a geometry herewith along with the dimensions.
2D

3D


Consider the blue curve first

In my notation the small radius is $r=0.01$ and the large radius is $R=0.09$
It is an arc, of radius $R$ and center at $x=R - r$
I use the parameter angle $\theta$ for the sweep angle of the arc from the center.
The coordinates of the arc are
$$ \pmatrix{x \\ y \\ z} = \pmatrix{ (R-r) - R \cos \theta \\ R \sin \theta \\ 0} $$
Now apply a rotation about the y-axis to this arc to get the coordinates of the shape. The parameter angle of the rotation is $\varphi$
$$ \pmatrix{x \\ y \\ z} = \begin{bmatrix} \cos \varphi & 0 & \sin \varphi \\ 0 & 1 & 0 \\ -\sin \varphi & 0 & \cos \varphi \end{bmatrix} \pmatrix{ (R-r) - R \cos \theta \\ R \sin \theta \\ 0}$$
or
$${\rm surf}( \varphi, \theta) = \pmatrix{x=-\cos \varphi ( R \cos \theta - R + r) \\ y=R \sin \theta \\ z=\sin \varphi (R \cos \theta -R + r)} \tag{1} $$
The surface is fully described by the parameters $\theta$ and $\varphi$. If you limit the length of the shape to $\ell$ then you find the limits of $\theta$ from
$$ \tfrac{\ell}{2} = R \sin \theta \tag{2} $$
So $\varphi = 0 \ldots 2\pi$ and $\theta = -\arcsin \left( \tfrac{\ell}{2 R} \right) \ldots \arcsin \left( \tfrac{\ell}{2 R} \right)$.
Here are the results of the parametric surface as viewed from the z-axis, for $R=10$ and $r=1$


From the y coordinate use $\theta = \arcsin \left( \tfrac{y}{R} \right)$
From the z coordinaten use $\varphi = - \arctan \left( \tfrac{z}{x} \right)$
the end relationship is
$$ \boxed{ \sqrt{R^2-y^2}-\sqrt{x^2+z^2}-R+r = 0 } \tag{3} $$
