pyvista.examples.downloads.download_action_figure#

download_action_figure(load=True)[source]#

Download scan of an action figure.

Originally obtained from Laser Design.

Parameters:
loadbool, default: True

Load the dataset after downloading it when True. Set this to False and only the filename will be returned.

Returns:
pyvista.PolyData | str

DataSet or filename depending on load.

Examples

Show the action figure example. This also demonstrates how to use physically based rendering and lighting to make a good looking plot.

>>> import pyvista as pv
>>> from pyvista import examples
>>> dataset = examples.download_action_figure()
>>> _ = dataset.clean(inplace=True)
>>> pl = pv.Plotter(lighting=None)
>>> pl.add_light(pv.Light((30, 10, 10)))
>>> _ = pl.add_mesh(
...     dataset,
...     color='w',
...     smooth_shading=True,
...     pbr=True,
...     metallic=0.3,
...     roughness=0.5,
... )
>>> pl.camera_position = [
...     (32.3, 116.3, 220.6),
...     (-0.05, 3.8, 33.8),
...     (-0.017, 0.86, -0.51),
... ]
>>> pl.show()
../../../_images/pyvista-examples-downloads-download_action_figure-1_00_00.png

See also

Action Figure Dataset

See this dataset in the Dataset Gallery for more info.