1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
"""Contains vrml examples."""
from __future__ import annotations
from pyvista.examples.downloads import download_file
def download_teapot(): # pragma: no cover
"""Download the a 2-manifold solid version of the famous teapot example.
Returns
-------
str
Filename of the VRML file.
Examples
--------
>>> import pyvista as pv
>>> from pyvista import examples
>>> vrml_file = examples.vrml.download_teapot()
>>> pl = pv.Plotter()
>>> pl.import_vrml(vrml_file)
>>> pl.show()
"""
return download_file('vrml/teapot.wrl')
def download_sextant(): # pragma: no cover
"""Download the sextant example.
Returns
-------
str
Filename of the VRML file.
Examples
--------
>>> import pyvista as pv
>>> from pyvista import examples
>>> vrml_file = examples.vrml.download_sextant()
>>> pl = pv.Plotter()
>>> pl.import_vrml(vrml_file)
>>> pl.show()
"""
return download_file('vrml/sextant.wrl')
def download_grasshopper(): # pragma: no cover
"""Download the grasshoper example.
.. versionadded:: 0.45
Returns
-------
str
Filename of the VRML file.
Examples
--------
>>> import pyvista as pv
>>> from pyvista import examples
>>> vrml_file = examples.vrml.download_grasshopper()
>>> pl = pv.Plotter()
>>> pl.import_vrml(vrml_file)
>>> pl.camera_position = [
... (25.0, 32.0, 44.0),
... (0.0, 0.931, -6.68),
... (-0.20, 0.90, -0.44),
... ]
>>> pl.show()
"""
return download_file('grasshopper/grasshop.wrl')
|