Skip to content

Commit 431215f

Browse files
committed
Try to use vedo in visualization example
1 parent 41e3028 commit 431215f

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

examples/visualization/prism_layer_pyvista.py

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,31 +62,10 @@
6262
)
6363

6464
# Create a pyvista UnstructuredGrid from the prism layer
65-
pv_grid = prisms.prism_layer.to_pyvista()
66-
pv_grid
65+
prism_grid = prisms.prism_layer.to_vedo()
66+
print(prism_grid)
6767

6868
###############################################################################
6969

70-
# Plot with pyvista
71-
plotter = pv.Plotter(lighting="three_lights", window_size=(1000, 800))
72-
plotter.add_mesh(pv_grid, scalars="density")
73-
plotter.set_scale(zscale=75) # exaggerate the vertical coordinate
74-
plotter.camera_position = "xz"
75-
plotter.camera.elevation = 20
76-
plotter.camera.azimuth = 35
77-
plotter.camera.zoom(1.2)
78-
79-
# Add a ceiling light
80-
west, east, south, north = vd.get_region((prisms.easting, prisms.northing))
81-
easting_center, northing_center = (east + west) / 2, (north + south) / 2
82-
light = pv.Light(
83-
position=(easting_center, northing_center, 10e3),
84-
focal_point=(easting_center, northing_center, 0),
85-
intensity=0.3,
86-
light_type="scene light", # the light doesn't move with the camera
87-
positional=False, # the light comes from infinity
88-
)
89-
plotter.add_light(light)
90-
91-
plotter.show_axes()
92-
plotter.show()
70+
# Plot with vedo
71+
prism_grid.show()

0 commit comments

Comments
 (0)