(Solved): 4. (20 marks) A superellipse is defined by the inequality axn+by ...
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 r0? with a=2,b=1 and n=2.5 is shown in the figure below, where ex? and ey? are the unit vectors pointing to the direction of long and short axes, respectively, and ex??ey?. 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?)41?n1?ab???(1+n1?)?, where ?(?) is the Gamma function.