Superellipsoid
In mathematics, a superellipsoid (or super-ellipsoid) is a solid whose horizontal sections are superellipses (Lamé curves) with the same squareness parameter , and whose vertical sections through the center are superellipses with the squareness parameter . It is a generalization of an ellipsoid, which is a special case when . Superellipsoids as computer graphics primitives were popularized by Alan H. Barr (who used the name "superquadrics" to refer to both superellipsoids and supertoroids). In modern computer vision and robotics literatures, superquadrics and superellipsoids are used interchangeably, since superellipsoids are the most representative and widely utilized shape among all the superquadrics. Superellipsoids have an rich shape vocabulary, including cuboids, cylinders, ellipsoids, octahedra and their intermediates. It becomes an important geometric primitive widely used in computer vision, robotics, and physical simulation. The main advantage of describing objects and envirionment with superellipsoids is its conciseness and expressiveness in shape. Furthermore, a closed-form expression of the Minkowski sum between two superellipsoids is available. This makes it a desirable geometric primitive for robot grasping, collision detection, and motion planning. Useful tools and algorithms for superquadric visualization, sampling, and recovery are open-sourced here. Special cases 
A handful of notable mathematical figures can arise as special cases of superellipsoids given the correct set of values, which are depicted in the above graphic:

 Cylinder
 Sphere
 Steinmetz solid
 Bicone
 Regular octahedron
 Cube, as a limiting case where the exponents tend to infinity

Piet Hein's supereggs are also special cases of superellipsoids. Formulas

Basic (normalized) superellipsoid 
The basic superellipsoid is defined by the implicit function

The parameters  and  are positive real numbers that control the squareness of the shape. The surface of the superellipsoid is defined by the equation:

For any given point , the point lies inside the superellipsoid if , and outside if . Any "parallel of latitude" of the superellipsoid (a horizontal section at any constant z between -1 and +1) is a Lamé curve with exponent , scaled by , which is

 

Any "meridian of longitude" (a section by any vertical plane through the origin) is a Lamé curve with exponent , stretched horizontally by a factor w that depends on the sectioning plane. Namely, if  and , for a given , then the section is

 

where

In particular, if  is 1, the horizontal cross-sections are circles, and the horizontal stretching  of the vertical sections is 1 for all planes. In that case, the superellipsoid is a solid of revolution, obtained by rotating the Lamé curve with exponent  around the vertical axis. Superellipsoid 
The basic shape above extends from −1 to +1 along each coordinate axis. The general superellipsoid is obtained by scaling the basic shape along each axis by factors , , , the semi-diameters of the resulting solid. The implicit function is 

. Similarly, the surface of the superellipsoid is defined by the equation

For any given point , the point lies inside the superellipsoid if , and outside if . Therefore, the implicit function is also called the inside-outside function of the superellipsoid. The superellipsoid has a parametric representation in terms of surface parameters , . General posed superellipsoid 
In computer vision and robotic applications, a superellipsoid with a general pose in the 3D Euclidean space is usually of more interest. For a given Euclidean transformation of the superellipsoid frame  relative to the world frame, the implicit function of a general posed superellipsoid surface defined the world frame is

where  is the transformation operation that maps the point  in the world frame into the canonical superellipsoid frame. Volume of superellipsoid 
The volume encompassed by the superelllipsoid surface can be expressed in terms of the beta functions ,

or equivalently with the Gamma function , since

Recovery from data 
Recoverying the superellipsoid (or superquadrics) representation from raw data (e.g., point cloud, mesh, images, and voxels) is an important task in computer vision, robotics, and physical simulation. Traditional computational methods model the problem as a least-square problem. The goal is to find out the optimal set of superellipsoid parameters  that minizie an objective function. Other than the shape parameters,  is the pose of the superellipsoid frame with respect to the world coordinate. There are two commonly used objective functions. The first one is constructed directly based on the implicit function

The minimization of the objective function provides a recovered superellipsoid as close as possible to all the input points . At the mean time, the scalar value  is positively proportional to the volume of the superellipsoid, and thus have the effect of minimizing the volume as well. The other objective function tries to minimized the radial distance between the points and the superellipsoid. That is

, where 

A probabilistic method called EMS is designed to deal with noise and outliers. In this method, the superellipsoid recovery is reformulated as a maximum likelihood estimation problem, and an optimization method is proposed to avoid local minima utilizing geometric similarities of the superellipsoids. The method is further extended by modeling with nonparametric bayesian techniques to recovery multiple superellipsoids simultaneously. References

Bibliography 
 Barr, "Superquadrics and Angle-Preserving Transformations," in IEEE Computer Graphics and Applications, vol. 1, no. 1, pp. 11–23, Jan. 1981, doi: 10.1109/MCG.1981.1673799. Aleš Jaklič, Aleš Leonardis, Franc Solina, Segmentation and Recovery of Superquadrics. Kluwer Academic Publishers, Dordrecht, 2000. Aleš Jaklič, Franc Solina (2003) Moments of Superellipsoids and their Application to Range Image Registration. IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS, 33 (4). pp. 648–657
 W. Liu, Y. Wu, S. Ruan and G. S. Chirikjian, "Robust and Accurate Superquadric Recovery: a Probabilistic Approach," 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 2022, pp. 2666–2675, doi: 10.1109/CVPR52688.2022.00270. External links 
 Bibliography: SuperQuadric Representations
 Superquadric Tensor Glyphs
 SuperQuadric Ellipsoids and Toroids, OpenGL Lighting, and Timing
 Superquadratics by Robert Kragler, The Wolfram Demonstrations Project. Superquadrics Recovery Algorithm in Python and MATLAB

Computer graphics
Computer vision
Robotics
Geometry
Geometry in computer vision