Superquadric#

Superquadric(center=(0.0, 0.0, 0.0), scale=(1.0, 1.0, 1.0), size=0.5, theta_roundness=1.0, phi_roundness=1.0, theta_resolution=16, phi_resolution=16, toroidal=False, thickness=0.3333333333333333)[source]#

Create a superquadric.

Parameters
centeriterable, optional

Center of the superquadric in [x, y, z].

scaleiterable, optional

Scale factors of the superquadric in [x, y, z].

sizefloat, optional

Superquadric isotropic size.

theta_roundnessfloat, optional

Superquadric east/west roundness. Values range from 0 (rectangular) to 1 (circular) to higher orders.

phi_roundnessfloat, optional

Superquadric north/south roundness. Values range from 0 (rectangular) to 1 (circular) to higher orders.

theta_resolutionint, optional

Number of points in the longitude direction. Values are rounded to nearest multiple of 4.

phi_resolutionint, optional

Number of points in the latitude direction. Values are rounded to nearest multiple of 8.

toroidalbool, optional

Whether or not the superquadric is toroidal (True) or ellipsoidal (False).

thicknessfloat, optional

Superquadric ring thickness. Only applies if toroidal is set to True.

Returns
pyvista.PolyData

Superquadric mesh.

See also

pyvista.ParametricSuperEllipsoid

Parametric superquadric if toroidal is False.

pyvista.ParametricSuperToroid

Parametric superquadric if toroidal is True.

Examples

>>> import pyvista
>>> superquadric = pyvista.Superquadric(scale=(3., 1., 0.5),
...                                     phi_roundness=0.1,
...                                     theta_roundness=0.5)
>>> superquadric.plot(show_edges=True)
../../../_images/pyvista-Superquadric-1_00_00.png