Polar form of generalized superellipse

I am looking for the polar form of the generalized superellipse: $$ \left|\frac{x}{a}\right|^{n_2}+\left|\frac{y}{b}\right|^{n_3}=1 $$ where $a$ and $b$ are the semi major and semi-minor axes. I have been looking for the answer but keep ending up with the Gilies formula:

$$ r(\theta)=\left[\left |{\frac{cos\left( \frac{1}{4}m\theta \right )^{n_2}}{a}} \right | +\left |{\frac{sin\left( \frac{1}{4}m\theta \right )^{n_3}}{b}} \right |\right]^{\frac{-1}{n_1}} $$

which is nice but with this one it is not possible to relate $a$ and $b$ directly to the semi-major and semi-minor axis. I guess it could be converted to the top form if: $$n_1=f(n_2,n_3)$$ but have not found the correct relation yet.

I also found this page: Polar form of a superellipse? but it does not cover the answer completely.


I would caution you about the use of Gielis's formula. Put simply, it is NOT some form of higher mathematics. (See, for example, G.G Szpiro, "The Secret Life of Numbers," p. 157.) Gielis starts with the formula for a circle and then concocts a polar radius composed of six (!) free parameters, and so can create a large number of shapes. My principal objection to Gielis's formula is that it not amenable to mathematical analysis. For example, try to calculate the area under the curve. You can't. By contrast, the superellipse and its various generalizations are truly mathematical.

Let me introduce my own generalization, called 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.

I have the feeling that this is what people actually have in mind when they seek the polar form of the superellipse.

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$). Here is a small version of that animation.

The Hyperspheroid

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