load_planet

Contents

load_planet#

load_planet(radius=1.0, lat_resolution=50, lon_resolution=100)[source]#

Load a planet or celestial body as a sphere with texture coordinates.

All planets are geometrically identical spheres. Textures are loaded and applied separately; see the download_*_surface functions.

Added in version 0.49.

Parameters:
radiusfloat, default: 1.0

Sphere radius.

lat_resolutionint, default: 50

Set the number of points in the latitude direction.

lon_resolutionint, default: 100

Set the number of points in the longitude direction.

Returns:
pyvista.PolyData

Sphere mesh with texture coordinates.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> mesh = examples.planets.load_planet()
>>> texture = examples.load_globe_texture()
>>> image_path = examples.planets.download_stars_sky_background(load=False)
>>> mesh.plot(texture=texture, background=image_path)
../../../_images/pyvista-examples-planets-load_planet-48b53d5ac32f6fbf_00_00.png

See also

Planet Dataset

See this dataset in the Dataset Gallery for more info.

3D Earth and Celestial Bodies

Example plot of the solar system.