pyvista.examples.examples.load_spline

Contents

pyvista.examples.examples.load_spline#

load_spline()[source]#

Load an example spline mesh.

This example data was created with:

>>> import numpy as np
>>> import pyvista as pv
>>> theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
>>> z = np.linspace(-2, 2, 100)
>>> r = z**2 + 1
>>> x = r * np.sin(theta)
>>> y = r * np.cos(theta)
>>> points = np.column_stack((x, y, z))
>>> mesh = pv.Spline(points, 1000)
Returns:
pyvista.PolyData

Spline mesh.

Examples

>>> from pyvista import examples
>>> spline = examples.load_spline()
>>> spline.plot()
../../../_images/pyvista-examples-examples-load_spline-1_00_00.png

See also

Spline Dataset

See this dataset in the Dataset Gallery for more info.