pyvista.DataSetFilters.texture_map_to_sphere#

DataSetFilters.texture_map_to_sphere(
center=None,
prevent_seam=True,
inplace=False,
name='Texture Coordinates',
progress_bar=False,
)[source]#

Texture map this dataset to a user defined sphere.

This is often used to define a sphere to texture map an image to this dataset. The sphere defines the spatial reference and extent of that image.

Parameters:
centersequence[float], optional

Length 3 iterable of floats defining the XYZ coordinates of the center of the sphere. If None, this will be automatically calculated.

prevent_seambool, default: True

Control how the texture coordinates are generated. If set, the s-coordinate ranges from 0 to 1 and 1 to 0 corresponding to the theta angle variation between 0 to 180 and 180 to 0 degrees. Otherwise, the s-coordinate ranges from 0 to 1 between 0 to 360 degrees.

inplacebool, default: False

If True, the new texture coordinates will be added to the dataset inplace. If False (default), a new dataset is returned with the texture coordinates.

namestr, default: “Texture Coordinates”

The string name to give the new texture coordinates if applying the filter inplace.

progress_barbool, default: False

Display a progress bar to indicate progress.

Returns:
pyvista.DataSet

Dataset containing the texture mapped to a sphere. Return type matches input.

Examples

See Applying Textures.