pyvista.Light.positional#
- property Light.positional[source]#
Return or set whether the light is positional.
The default is a directional light, i.e. an infinitely distant point source. A positional light with a cone angle of at least 90 degrees acts like a spherical point source. A positional light with a cone angle that is less than 90 degrees is known as a spotlight.
Attenuation and cone angles are only used for positional lights. The
exponent
property is only used for spotlights. Positional lights with a cone angle of at least 90 degrees don’t show angular dependence of their beams, but they display attenuation.If the light is changed to directional, its actor (if previously shown) is automatically hidden.
Examples
Create a spotlight shining on the origin.
>>> import pyvista as pv >>> light = pv.Light(position=(1, 1, 1)) >>> light.positional = True >>> light.cone_angle = 30