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()
../../../_images/pyvista-Property-interpolation-1_00_00.png

Visualize gouraud shading.

>>> prop.interpolation = 'Gouraud'
>>> prop.plot()
../../../_images/pyvista-Property-interpolation-1_01_00.png

Visualize phong shading.

>>> prop.interpolation = 'Phong'
>>> prop.plot()
../../../_images/pyvista-Property-interpolation-1_02_00.png

Visualize physically based rendering.

>>> prop.interpolation = 'Physically based rendering'
>>> prop.plot()
../../../_images/pyvista-Property-interpolation-1_03_00.png