# Examples from pyvista.Light.cone_angle
# ======================================

# Plot three planes lit by three spotlights with varying cone
# angles.  Use a large exponent to cause a visible angular
# variation of the intensity of the beams.
import pyvista as pv
pl = pv.Plotter(lighting='none')
for offset, angle in zip([0, 1.5, 3], [70, 30, 20]):
    _ = pl.add_mesh(pv.Plane(center=(offset, 0, 0)), color='white')
    light = pv.Light(position=(offset, 0, 1), focal_point=(offset, 0, 0))
    light.exponent = 15
    light.positional = True
    light.cone_angle = angle
    pl.add_light(light)
pl.view_xy()
pl.show()

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

