<jupyter_start><jupyter_text>Eye Dome LightingEye-Dome Lighting (EDL) is a non-photorealistic, image-based shading techniquedesigned to improve depth perception in scientific visualization images.To learn more, please see `this blog post`_.<jupyter_code># sphinx_gallery_thumbnail_number = 1
import pyvista as pv
from pyvista import examples<jupyter_output><empty_output><jupyter_text>StatueEye-Dome Lighting can dramatically improve depth perception when plottingincredibly sophisticated meshes like the creative commons Queen Nefertitistatue:<jupyter_code>nefertiti = examples.download_nefertiti()
nefertiti.plot(eye_dome_lighting=True, cpos=[-1, -1, 0.2], color=True)<jupyter_output><empty_output><jupyter_text>Here we will compare a EDL shading side by side with normal shading<jupyter_code>p = pv.Plotter(shape=(1, 2), border=False)

# With eye-dome lighting
p.subplot(0, 0)
p.add_mesh(nefertiti, color=True)
p.enable_eye_dome_lighting()
p.add_text("Eye-Dome Lighting", font_size=24)
p.camera_position = [-1, -1, 0.2]

# No eye-dome lighting
p.subplot(0, 1)
p.add_mesh(nefertiti, color=True)
p.add_text("No Eye-Dome Lighting", font_size=24)
p.camera_position = [-1, -1, 0.2]

p.show()<jupyter_output><empty_output><jupyter_text>Point CloudWhen plotting a simple point cloud, it can be difficult to perceive depth.Take this Lidar point cloud for example:<jupyter_code>point_cloud = examples.download_lidar()<jupyter_output><empty_output><jupyter_text>And now plot this point cloud as-is:<jupyter_code># Plot a typical point cloud with no EDL
p = pv.Plotter()
p.add_mesh(point_cloud, color="tan", point_size=5)
p.show()<jupyter_output><empty_output><jupyter_text>We can improve the depth mapping by enabling eye dome lighting on therenderer with :func:`pyvista.Renderer.enable_eye_dome_lighting`.<jupyter_code># Plot with EDL
p = pv.Plotter()
p.add_mesh(point_cloud, color="tan", point_size=5)
p.enable_eye_dome_lighting()
p.show()<jupyter_output><empty_output><jupyter_text>The eye dome lighting mode can also handle plotting scalar arrays:<jupyter_code># Plot with EDL and scalar data
p = pv.Plotter()
p.add_mesh(point_cloud, scalars="Elevation", point_size=5)
p.enable_eye_dome_lighting()
p.show()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup