$$\left|\frac{x}{a}\right|^n+\left|\frac{y}{b}\right|^n=1,\qquad\quad n\gt2$$ $$\text{can be rewritten as}$$ $$x(t)=a\,\cdot\,\left|\cos(t)\right|^{2/n}\quad\vee\quad x(t)=-a\,\cdot\,\left|\cos(t)\right|^{2/n}$$ $$y(t)=b\,\cdot\,\left|\sin(t)\right|^{2/n}\quad\vee\quad y(t)=-b\,\cdot\,\left|\sin(t)\right|^{2/n}$$
How is it that the equation of a superellipse can be rewritten as above. I do understand that they use $\cos^2 t+sin^2 t=1.$ However, I don't understand why $a$ and $b$ can be negative or positive?
Both the parametic expressions satisfy the superellipse equation, the ones with the positive sign represent the superellipse in the first quadrant, the ones x-negative and -positive in the second, and so on.
Indeed:
$$\left|\frac{x}{a}\right|^n+\left|\frac{y}{b}\right|^n=\left|\frac{\pm a\,\cdot\,\left|\cos(t)\right|^{2/n}}{a}\right|^n+\left|\frac{\pm b\,\cdot\,\left|\sin(t)\right|^{2/n}}{b}\right|^n= \\=\left|\pm 1\,\cdot\,\left|\cos(t)\right|^{2/n}\right|^n+\left|\pm 1\,\cdot\,\left|\sin(t)\right|^{2/n}\right|^n=|\pm 1|\,\cdot\,\left|\cos(t)^{2/n}\right|^n+|\pm 1|\,\cdot\,\left|\sin(t)^{2/n}\right|^n=\\=\cos^2(t)+\sin^2(t)=1$$
Suppose wlog $a,b >0$ otherwise just switch the sign, thus we have
Firt quadrant $t\in[0,\frac{\pi}{2})$: $$\begin{cases} x(t)=a\,\cdot\,\left|\cos(t)\right|^{2/n} \\ y(t)=b\,\cdot\,\left|\sin(t)\right|^{2/n} \end{cases}$$
Second quadrant $t\in[\frac{\pi}{2},\pi)$: $$\begin{cases} x(t)=-a\,\cdot\,\left|\cos(t)\right|^{2/n} \\ y(t)=b\,\cdot\,\left|\sin(t)\right|^{2/n} \end{cases}$$
Third quadrant $t\in[\pi,\frac{3\pi}{2})$:
$$\begin{cases} x(t)=-a\,\cdot\,\left|\cos(t)\right|^{2/n} \\ y(t)=-b\,\cdot\,\left|\sin(t)\right|^{2/n} \end{cases}$$
Forth quadrant $t\in[\frac{3\pi}{2},2\pi)$: $$\begin{cases} x(t)=a\,\cdot\,\left|\cos(t)\right|^{2/n} \\ y(t)=-b\,\cdot\,\left|\sin(t)\right|^{2/n} \end{cases}$$