<s>[INST] Cartesian equation for the curvature of a superellipse? I have an application where I need to determine the curvature of a superellipse at various points along the curve, where the Cartesian form of the superellipse is defined as:
$$\frac{x^n}{a^n}+\frac{y^n}{b^n}=1$$
For an ellipse, the Cartesian equation for the curvature $\kappa$  is easy to find:
$$\kappa= \frac{1}{a^2b^2}\left(\frac{x^2}{a^4}+\frac{y^2}{b^4}\right)^{-{\frac32}}$$
but I have searched and searched and cannot find the Cartesian equation for superellipse curvature.
Could someone point me to a site that has this information?
 [/INST] Using Hessian matrix for implicit function $F(x,y)=0$,
\begin{align}
  F(x,y) &= \frac{x^n}{a^n}+\frac{y^n}{b^n}-1 \\
  F_x &= \frac{nx^{n-1}}{a^n} \\
  F_y &= \frac{ny^{n-1}}{b^n} \\
  \nabla F &=
  \begin{pmatrix}
    F_{x} \\
    F_{y}
  \end{pmatrix} \\
  F_{xx} &= \frac{n(n-1)x^{n-2}}{a^n} \\
  F_{yy} &= \frac{n(n-1)y^{n-2}}{b^n} \\
  F_{xy} &= 0 \\
  \mathbb{H}(F) &=
  \begin{pmatrix}
    F_{xx} & F_{xy} \\
    F_{xy} & F_{yy}
  \end{pmatrix} \\
  \kappa &=
  \frac{
  \begin{vmatrix}
    \mathbb{H}(F) & \nabla F \\
    (\nabla F)^T & 0
  \end{vmatrix}}{|\nabla F|^3} \\
   &=
  \frac{-n^3(n-1) \dfrac{x^{n-2} y^{n-2}}{a^n b^n}
       \left( \dfrac{x^n}{a^n}+\dfrac{y^n}{b^n} \right)}
       {n^3\left( \dfrac{x^{2n-2}}{a^{2n}}+\dfrac{y^{2n-2}}{b^{2n} }\right)^{3/2}} \\
   &= -\frac{(n-1) x^{n-2} y^{n-2}}
       {a^n b^n\left( \dfrac{x^{2n-2}}{a^{2n}}+\dfrac{y^{2n-2}}{b^{2n} }\right)^{3/2}} \\
\end{align}
For $n>1$, $\kappa<0$ implies the centre of curvature being on another side of the outward normal.
</s>