Esempio n. 1
0
# Cool Volume Examples
# ++++++++++++++++++++
#
# Here are a few more cool volume rendering examples

head = examples.download_head()

p = pv.Plotter()
p.add_volume(head, cmap="cool", opacity="sigmoid_6")
p.camera_position = [(-228.0, -418.0, -158.0), (94.0, 122.0, 82.0),
                     (-0.2, -0.3, 0.9)]
p.show()

###############################################################################

bolt_nut = examples.download_bolt_nut()

p = pv.Plotter()
p.add_volume(bolt_nut, cmap="coolwarm", opacity="sigmoid_5")
p.show()

###############################################################################

frog = examples.download_frog()

p = pv.Plotter()
p.add_volume(frog, cmap="viridis", opacity="sigmoid_6")
p.camera_position = [(929., 1067., -278.9), (249.5, 234.5, 101.25),
                     (-0.2048, -0.2632, -0.9427)]
p.show()
Esempio n. 2
0
 def test_download_bolt_nut():
     data = examples.download_bolt_nut()
     assert isinstance(data, pyvista.MultiBlock)
Esempio n. 3
0
 def __init__(self):
     self._example_data = examples.download_bolt_nut()
     _ExampleLoader.__init__(self)