I'm exploring the transformation of a 2D unit circle into a lemniscate (infinity symbol) by fixing two antipodal points and "twisting" the circle (in the 3rd dimension) such that the orthogonal pair of antipodal points meet at the origin. The total perimeter length $2\pi$ should be preserved during the transformation.
The unit circle in the $xy$-plane is described by:
$$ x = \cos(\theta), y = \sin(\theta), z = 0, $$
where $\theta \in [0, 2\pi)$.
I seek an exact mathematical formulation for this transformation. The primary challenge is in defining the function for the $z$-coordinate, $f(\theta)$, which should modify the curve's height without changing its length.
I would appreciate any advice, references, or ideas on how to approach this.