Home /
Expert Answers /
Computer Science /
4-20-marks-a-superellipse-is-defined-by-the-inequality-axn-by-pa934

4. (20 marks) A superellipse is defined by the inequality $???ax????_{n}+???by????_{n}?1,$ where $x$ and $y$ are the Cartesian coordinates, and $a$ and $b$ are the length of long and short axes with $n>2$ the deformation parameter. An example of a superellipse centered at $r_{0}$ with $a=2,b=1$ and $n=2.5$ is shown in the figure below, where $e_{x}$ and $e_{y}$ are the unit vectors pointing to the direction of long and short axes, respectively, and $e_{x}?e_{y}$. All vectors here are column vectors.
Use Matlab toolbox numerically to calculate the area $S$ of a superellipse for given $a$ and $b$. For $a=2,b=1$, plot $S$ as a function of $n?[2,10]$, and compare your result with the analytical formula $S=?(21?+n1?)4_{1?n1?}ab???(1+n1?)?,$ where $?(?)$ is the Gamma function.