How do you calculate y coordinates on a rotated super ellipse

178 Views Asked by At

For my work, I am working on a model to predict the length of different bars that you can cut from a super ellipse.

Is it possible to calculate with an analytical solution the $y$-coordinate if $x$ is given on a rotated super ellipse? I have found already this analytical solution for ordinary ellipses with :

$$y = \frac{-\big(\frac{2ab}{c} - \frac{2de}{f}\big) \pm \sqrt{\big(\frac{2ab}{c} - \frac{2de}{f}\big)^2 - 4 \big(\frac{b^2}{c} + \frac{e^2}{f}\big)\big(\frac{a^2}{c}+\frac{d^2}{f}-1\big)}}{2 \big(\frac{b^2}{c} + \frac{e^2}{f}\big)}$$

Where $a=x \cos\alpha$; $b=\sin\alpha$; $c=a^2$; $d=x \sin\alpha$; $e=\cos\alpha$; $f=b^2$.

Is it possible to derive a similar equation for $y$, given the general equation for a super ellipse is:

$$ {(x\cos\alpha+y\sin\alpha)^n\over a^n}+ {(x\sin\alpha-y\cos\alpha)^n\over b^n}=1. $$