pyvista.Property.diffuse#

property Property.diffuse: float[source]#

Return or set the diffuse lighting coefficient.

Default pyvista.plotting.themes._LightingConfig.diffuse.

This is the scattering of light by reflection or transmission. Diffuse reflection results when light strikes an irregular surface such as a frosted window or the surface of a frosted or coated light bulb. Must be between 0 and 1.

Examples

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.diffuse = 0.2
>>> prop.diffuse
0.2

Visualize default diffuse light.

>>> prop.diffuse = 1.0
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/7e2fffe836c3935de62328336c278d550c30dc8d/6c645/_images/pyvista-property-diffuse-1_00_00.png

Visualize diffuse at 0.5.

>>> prop.diffuse = 0.5
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/c168d3e33a1952844215b360602e0068ef01d088/66a09/_images/pyvista-property-diffuse-1_01_00.png

Visualize diffuse at 0.0.

>>> prop.diffuse = 0.0
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/f7d677d1d57de9f1195361dd9825d0415da34e33/f11a3/_images/pyvista-property-diffuse-1_02_00.png