# Examples from pyvista.Light.show_actor
# ======================================

# Create a scene containing a cube lit with a cyan spotlight and
# visualize the light using an actor.
import pyvista as pv
pl = pv.Plotter()
_ = pl.add_mesh(pv.Cube(), color='white')
for light in pl.renderer.lights:
    light.intensity /= 5
spotlight = pv.Light(position=(-1, 1, 1), color='cyan')
spotlight.positional = True
spotlight.cone_angle = 20
spotlight.intensity = 10
spotlight.exponent = 40
spotlight.show_actor()
pl.add_light(spotlight)
pl.show()

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

