# Complex function for mapping a circle to a superellipse

I was wondering if anyone knows an analytic complex function that would map a circle to a superellipse, or vice versa. Any ideas, comments, or functions are much appreciated!

Thanks, Kayvan

• Are you asking about the conformal map given by the Riemann mapping theorem? Dec 26, 2014 at 19:09
• Hi Adam, thank you for responding to my question. Unfortunately, mathematics was not my major although I have a lot of passion for it; therefore, I read a little about the Reimann mapping theorem in Wikipedia. It seems that this theorem is about uniquness and states that there should exist a complex function that would generate the conformal mapping that I need. However, I do not know how I can find that function. Do you know how I can approach this problem? Thanks! Dec 26, 2014 at 19:19
• The Riemann map probably cannot be written in terms of elementary functions. There are various recipes for efficient numerical approximation. Dec 26, 2014 at 23:58
• @Shamisen: Thank you for your response. I need an analytic function so I can take derivatives. Dec 29, 2014 at 13:40
• @Shamisen: Thank you for your suggestion. I changed the question accordingly. Dec 29, 2014 at 15:06

As Adam stated, the Riemann mapping theorem provides the function that you are looking for. However, the Riemann mapping will not be given by an explicit formula, except in particularly simple cases. Hence it appears unlikely that there is an explicit function of the form that you are looking for.

However, as also mentioned by Adam, there are a number of quite efficient methods for computing the Riemann map. For practical purposes, I would mention Don Marshall's "zipper" program. I have not used it myself, but a pre-compiled Windows version seems to be available:

https://www.math.washington.edu/~marshall/zipper.html

From the more theoretical point of view, again the problem has been studied quite extensively. The paper by Binder, Braverman and Yampolsky provides a quite careful analysis of its computational complexity: http://arxiv.org/abs/math/0505617

Another recent approach for a fast computation of the Riemann map (by computing a quasiconformal approximation) is due to Chris Bishop: http://link.springer.com/article/10.1007%2Fs00454-010-9269-9 (This is behind a paywall - a free preprint version is available from the author's webpage: http://www2.math.sunysb.edu/~bishop/papers/time.pdf ).

Depending on what precisely you are interested in, there are also many methods from geometric function theory for estimating the Riemann map, or making qualitative statements about its behaviour.

• Is it possible to write it down as, say, a Taylor or other series expansion which converges in the circle, and which has explicit coefficients? That would be the next best thing if an analytic closed form is not possible, imo. Jan 12, 2015 at 5:59
• @mike3 The Taylor series won't be a particularly effective means of computation in many cases. If you need derivatives you're likely to be better off taking numerical derivatives by, e.g., evaluating to either side of your point and using the central derivative formula. Mar 19, 2017 at 16:20

Allow me re-interpret your question and ask more simply for an analytic complex function for a superellipse. This is a subset of a generalized superellipse that I call superconics. The general form is given by

$$f(X) = b(1-c^2|X/a|^q)^{1/p}$$

or its canonical form

$$f(x) = (1-c^2|x|^q)^{1/p}$$

Here, $a$ and $b$ scale the $x$ and $y$ axes, resp. and $c^2=\pm1$. $c^2=1$ corresponds to elliptic and parabolic types and $c^2=-1$ corresponds to hyperbolic types. (More generally, $c^2$ can vary smoothly between.)

The following integral gives the area under the curve, the centroid, moments, and moments of inertia of all the superconics.

$$\int_{-a}^a X^nf^m(X) dX = a^{n+1}b^m\int_{-1}^1 x^nf^m(x) dx$$

First we notice that $a$ and $b$ are superfluous and that we can concentrate on the canonical equation. The results can be scaled appropriately for any $a$ and $b$ afterward according to the factor $a^{n+1}b^m$. Next, and most important, this equation can be solved exactly in terms of known functions, specifically, the Gauss hypergeometric function and the incomplete beta function

$$\int_{-1}^1 x^nf^m(x) dx = \frac{2}{n+1} {_2F_1}(-mp,\frac{n+1}{q};1+\frac{n+1}{q};c^2)$$

$$= \frac{2}{q} (c^2)^{-\frac{n+1}{q}} B(\frac{n+1}{q},mp+1,c^2)$$

Further simplifications accrue when $c^2=1$. To wit, for $m=1, n=0$ we get the area

$$\int_{-1}^1 f(x) dx = \Psi(p,q) = 2\frac{\Gamma(p+1)\Gamma(1+1/q)}{\Gamma(1+1/q)} = \Psi(1/q,1/p)$$

More generally, for arbitrary $m$ and $n$ we substitute $p\to mp$ and $q\to q/(n+1)$. All of the integrals for $c^2=1$ can be expressed solely in terms of the parameter $\Psi$. This is true for bodies of revolution as well as other three-dimensional bodies composed of superconics profiles.

Now, in addition to the above intrinsic equation for the superconics, we can derive the following $parametric$ equation for superconics in the complex plane:

$$z=|\text{sin}^{2/q}(u)|\text{sgn}(\text{sin}(u))+i|(1-c^2\text{sin}(u))^p|\text{sgn}(\text{cos}(u))$$

where $u = [-\pi/2,\pi/2]$ for the upper half plane and $u = [-3\pi/2,\pi/2]$ for the full plane, e.g., a closed curve. The superellipse is given specifically by $q=1/p$ and $c^2=1$.

You can find some illustrations and animations of superconics here: http://web.calstatela.edu/curvebank/superconicncb/superconicncb.htm. There is even an animation of a smooth transition from a sphere to a hyperboloid of one and two sheets using only superconics (with variable $c^2$).

By way of apology, I haven't a lot of experience with MathJax so please let me know if you spot any errors.

• Sorry, how does this relate to the OP's question? Mar 19, 2017 at 0:10
• It gives an analytic complex equation for a superellipse. Mar 19, 2017 at 16:07