Light.intensity#
Examples#
Download Python source code | Download Jupyter notebook
Light the two sides of a cube with lights of different brightness.
>>> import pyvista as pv
>>> pl = pv.Plotter(lighting='none')
>>> _ = pl.add_mesh(pv.Cube(), color='cyan')
>>> light_bright = pv.Light(position=(3, 0, 0), light_type='scene light')
>>> light_dim = pv.Light(position=(0, 3, 0), light_type='scene light')
>>> light_dim.intensity = 0.5
>>> for light in light_bright, light_dim:
... light.positional = True
... pl.add_light(light)
>>> pl.show()