ParametricSuperEllipsoid

ParametricSuperEllipsoid(xradius=None, yradius=None, zradius=None, n1=None, n2=None, **kwargs)

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.

Parameters
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.

Returns
pyvista.PolyData

ParametricSuperEllipsoid surface.

Examples

Create a ParametricSuperEllipsoid mesh.

>>> import pyvista
>>> mesh = pyvista.ParametricSuperEllipsoid()
>>> mesh.plot(color='w', smooth_shading=True)
../../../_images/pyvista-ParametricSuperEllipsoid-1_00_00.png