texture_map_to_sphere

StructuredGrid.texture_map_to_sphere(center=None, prevent_seam=True, inplace=False, name='Texture Coordinates', progress_bar=False)

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
centertuple(float)

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

prevent_seambool, optional

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. Default True.

inplacebool, optional

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, optional

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

progress_barbool, optional

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.