pyvista.examples.planets.load_mars#

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

Load the planet Mars as a textured Sphere.

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

Mars dataset.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> mesh = examples.planets.load_mars()
>>> texture = examples.planets.download_mars_surface(texture=True)
>>> pl = pv.Plotter()
>>> image_path = examples.planets.download_stars_sky_background(
...     load=False
... )
>>> pl.add_background_image(image_path)
>>> _ = pl.add_mesh(mesh, texture=texture)
>>> pl.show()
../../../_images/pyvista-examples-planets-load_mars-1_00_00.png