Rahul Sharma (Editor)

Superquadrics

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Superquadrics

In mathematics, the superquadrics or super-quadrics (also superquadratics) are a family of geometric shapes defined by formulas that resemble those of ellipsoids and other quadrics, except that the squaring operations are replaced by arbitrary powers. They can be seen as the three-dimensional relatives of the Lamé curves ("Superellipses").

Contents

The superquadrics include many shapes that resemble cubes, octahedra, cylinders, lozenges and spindles, with rounded or sharp corners. Because of their flexibility and relative simplicity, they are popular geometric modeling tools, especially in computer graphics.

Some authors, such as Alan Barr, define "superquadrics" as including both the superellipsoids and the supertoroids. However, the (proper) supertoroids are not superquadrics as defined above; and, while some superquadrics are superellipsoids, neither family is contained in the other.

Implicit equation

The basic superquadric has the formula

| x | r + | y | s + | z | t = 1

where r, s, and t are positive real numbers that determine the main features of the superquadric. Namely:

  • less than 1: a pointy octahedron with concave faces and sharp edges.
  • exactly 1: a regular octahedron.
  • between 1 and 2: an octahedron with convex faces, blunt edges and blunt corners.
  • exactly 2: a sphere
  • greater than 2: a cube with rounded edges and corners.
  • infinite (in the limit): a cube
  • Each exponent can be varied independently to obtain combined shapes. For example, if r=s=2, and t=4, one obtains a solid of revolution which resembles an ellipsoid with round cross-section but flattened ends. This formula is a special case of the superellipsoid's formula if (and only if) r = s.

    If any exponent is allowed to be negative, the shape extends to infinity. Such shapes are sometimes called super-hyperboloids.

    The basic shape above spans from -1 to +1 along each coordinate axis. The general superquadric is the result of scaling this basic shape by different amounts A, B, C along each axis. Its general equation is

    | x A | r + | y B | s + | z C | t 1

    Parametric description

    Parametric equations in terms of surface parameters u and v (longitude and latitude) are

    x ( u , v ) = A g ( v , 2 r ) g ( u , 2 r ) y ( u , v ) = B g ( v , 2 s ) f ( u , 2 s ) z ( u , v ) = C f ( v , 2 t ) π 2 v π 2 , π u < π ,

    where the auxiliary functions are

    f ( ω , m ) = sgn ( sin ω ) | sin ω | m g ( ω , m ) = sgn ( cos ω ) | cos ω | m

    and the sign function sgn(x) is

    sgn ( x ) = { 1 , x < 0 0 , x = 0 + 1 , x > 0.

    Plotting code

    The following GNU Octave code generates a mesh approximation of a superquadric:

    References

    Superquadrics Wikipedia