ParametricSuperEllipsoid(xradius=None, yradius=None, zradius=None, n1=None, n2=None, **kwargs)[source]#

Generate a superellipsoid.

ParametricSuperEllipsoid generates a superellipsoid. A superellipsoid is a versatile primitive that is controlled by two parameters n1 and n2. As special cases it can represent a sphere, square box, and closed cylindrical can.

xradiusfloat, optional

The scaling factor for the x-axis. Default is 1.

yradiusfloat, optional

The scaling factor for the y-axis. Default is 1.

zradiusfloat, optional

The scaling factor for the z-axis. Default is 1.

n1float, optional

The “squareness” parameter in the z axis. Default is 1.

n2float, optional

The “squareness” parameter in the x-y plane. Default is 1.

**kwargsdict, optional

See surface_from_para() for additional keyword arguments.


ParametricSuperEllipsoid surface.

See also


Toroidal equivalent of ParametricSuperEllipsoid.


Geometric object with additional parameters.


Create a ParametricSuperEllipsoid surface that looks like a box with smooth edges.

>>> import pyvista
>>> mesh = pyvista.ParametricSuperEllipsoid(n1=0.02, n2=0.02)
>>> mesh.plot(color='w', smooth_shading=True)

Create one that looks like a spinning top.

>>> mesh = pyvista.ParametricSuperEllipsoid(n1=4, n2=0.5)
>>> mesh.plot(color='w', smooth_shading=True, cpos='xz')