pyvista.Octahedron

Contents

pyvista.Octahedron#

Octahedron(radius: float = 1.0, center: VectorLike[float] = (0.0, 0.0, 0.0)) PolyData[source]#

Create an octahedron of a given size.

An octahedron is composed of eight congruent equilateral triangles.

Parameters:
radiusfloat, default: 1.0

The radius of the circumscribed sphere for the octahedron.

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

Three-length sequence defining the center of the octahedron.

Returns:
pyvista.PolyData

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

Examples

Create and plot an octahedron.

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

See Platonic Solids for more examples using this filter.