pyvista.Property.interpolation#

property Property.interpolation: InterpolationType[source]#

Return or set the method of shading.

Defaults to pyvista.plotting.themes._LightingConfig.interpolation.

One of the following options.

  • 'Physically based rendering' - Physically based rendering.

  • 'pbr' - Alias for Physically based rendering.

  • 'Phong' - Phong shading.

  • 'Gouraud' - Gouraud shading.

  • 'Flat' - Flat Shading.

This parameter is case insensitive.

Examples

Set interpolation to physically based rendering.

>>> import pyvista as pv
>>> prop = pv.Property()
>>> prop.interpolation = 'pbr'
>>> prop.interpolation
<InterpolationType.PBR: 3>

Visualize default flat shading.

>>> prop.interpolation = 'Flat'
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/7e2fffe836c3935de62328336c278d550c30dc8d/93acd/_images/pyvista-property-interpolation-1_00_00.png

Visualize gouraud shading.

>>> prop.interpolation = 'Gouraud'
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/518240b5146b5bd224d0de3252cb26c82be00171/2a11b/_images/pyvista-property-interpolation-1_01_00.png

Visualize phong shading.

>>> prop.interpolation = 'Phong'
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/518240b5146b5bd224d0de3252cb26c82be00171/745f0/_images/pyvista-property-interpolation-1_02_00.png

Visualize physically based rendering.

>>> prop.interpolation = 'Physically based rendering'
>>> prop.plot()
https://d33wubrfki0l68.cloudfront.net/d441731604ec1f2a2eb0e7b812e714847b8415bf/b3d90/_images/pyvista-property-interpolation-1_03_00.png