pyvista.examples.downloads.download_action_figure#
- download_action_figure(load=True, *, high_resolution=False)[source]#
Download scan of an action figure.
Originally obtained from Laser Design.
Changed in version 0.45: A decimated version of this dataset with 31 thousand cells is now returned. Previously, a high-resolution version with 630 thousand cells was returned. Use
high_resolution=True
for the high-resolution version.- Parameters:
- loadbool, default:
True
Load the dataset after downloading it when
True
. Set this toFalse
and only the filename will be returned.- high_resolutionbool, default:
False
Set this to
True
to return a high-resolution version of this dataset. By default, adecimated
version is returned with 95% reduction.Added in version 0.45.
- loadbool, default:
- 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()
See also
- Action Figure Dataset
See this dataset in the Dataset Gallery for more info.