pyvista.ParametricTorus

pyvista.ParametricTorus#

ParametricTorus(
ringradius: float | None = None,
crosssectionradius: float | None = None,
**kwargs,
) PolyData[source]#

Generate a torus.

Parameters:
ringradiusfloat, default: 1.0

The radius from the center to the middle of the ring of the torus.

crosssectionradiusfloat, default: 0.5

The radius of the cross section of ring of the torus.

**kwargsdict, optional

See surface_from_para() for additional keyword arguments.

Returns:
pyvista.PolyData

ParametricTorus surface.

Examples

Create a ParametricTorus mesh.

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