ParametricSuperToroid#
- ParametricSuperToroid(ringradius=None, crosssectionradius=None, xradius=None, yradius=None, zradius=None, n1=None, n2=None, **kwargs)[source]#
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
,optional
The radius from the center to the middle of the ring of the supertoroid. Default is 1.
- crosssectionradius
float
,optional
The radius of the cross section of ring of the supertoroid. Default = 0.5.
- xradius
float
,optional
The scaling factor for the x-axis. Default is 1.
- yradius
float
,optional
The scaling factor for the y-axis. Default is 1.
- zradius
float
,optional
The scaling factor for the z-axis. Default is 1.
- n1
float
,optional
The shape of the torus ring. Default is 1.
- n2
float
,optional
The shape of the cross section of the ring. Default is 1.
- **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 >>> mesh = pyvista.ParametricSuperToroid(n1=2, n2=0.3) >>> mesh.plot(color='w', smooth_shading=True)