pyvista.Icosahedron

Contents

pyvista.Icosahedron#

Icosahedron(radius=1.0, center=(0.0, 0.0, 0.0))[source]#

Create an icosahedron of a given size.

An icosahedron is composed of twenty congruent equilateral triangles.

Parameters:
radiusfloat, default: 1.0

The radius of the circumscribed sphere for the icosahedron.

centersequence[float], default: (0.0, 0.0, 0.0)

Three-length sequence defining the center of the icosahedron.

Returns:
pyvista.PolyData

Mesh for the icosahedron. Cell scalars are defined that assign integer labels to each face (with array name "FaceIndex").

Examples

Create and plot an icosahedron.

>>> import pyvista as pv
>>> tetra = pv.Icosahedron()
>>> tetra.plot(categories=True)
../../../_images/pyvista-Icosahedron-1_00_00.png

See Platonic Solids for more examples using this filter.