pyvista.ParametricSuperToroid#
- ParametricSuperToroid(
- ringradius: float | None = None,
- crosssectionradius: float | None = None,
- xradius: float | None = None,
- yradius: float | None = None,
- zradius: float | None = None,
- n1: float | None = None,
- n2: float | None = None,
- **kwargs,
Generate a supertoroid.
ParametricSuperToroid generates a supertoroid. Essentially a supertoroid is a torus with the sine and cosine terms raised to a power. A supertoroid is a versatile primitive that is controlled by four parameters r0, r1, n1 and n2. r0, r1 determine the type of torus whilst the value of n1 determines the shape of the torus ring and n2 determines the shape of the cross section of the ring. It is the different values of these powers which give rise to a family of 3D shapes that are all basically toroidal in shape.
- Parameters:
- ringradius
float
, default: 1 The radius from the center to the middle of the ring of the supertoroid.
- crosssectionradius
float
, default: 0.5 The radius of the cross section of ring of the supertoroid.
- xradius
float
, default: 1 The scaling factor for the x-axis.
- yradius
float
, default: 1 The scaling factor for the y-axis.
- zradius
float
, default: 1 The scaling factor for the z-axis.
- n1
float
, default: 1 The shape of the torus ring.
- n2
float
, default: 1 The shape of the cross section of the ring.
- **kwargs
dict
,optional
See
surface_from_para()
for additional keyword arguments.
- ringradius
- Returns:
pyvista.PolyData
ParametricSuperToroid surface.
See also
pyvista.ParametricSuperEllipsoid
Ellipsoidal equivalent of ParametricSuperToroid.
pyvista.Superquadric
Geometric object with additional parameters.
Examples
Create a ParametricSuperToroid mesh.
>>> import pyvista as pv >>> mesh = pv.ParametricSuperToroid(n1=2, n2=0.3) >>> mesh.plot(color='w', smooth_shading=True)