Render a depth image#
Plot a depth image as viewed from a camera overlooking the “hills” example mesh.
import matplotlib.pyplot as plt import pyvista as pv from pyvista import examples # Load an interesting example of geometry mesh = examples.load_random_hills() # Establish geometry within a pv.Plotter() p = pv.Plotter() p.add_mesh(mesh, color=True) p.store_image = True # permit image caching after plotter is closed p.show()
Record depth image without and with a custom fill value
Visualize depth images
Total running time of the script: ( 0 minutes 0.851 seconds)