pyvista.examples.downloads.download_cloud_dark_matter_dense#

download_cloud_dark_matter_dense(load=True)[source]#

Download a particles from a simulated dark matter halo.

This dataset contains 2,062,256 particles.

Parameters:
loadbool, default: True

Load the dataset after downloading it when True. Set this to False and only the filename will be returned.

Returns:
pyvista.PointSet | str

DataSet or filename depending on load.

Examples

Download the dark matter cloud and display its representation.

>>> import numpy as np
>>> from pyvista import examples
>>> pc = examples.download_cloud_dark_matter_dense()
>>> pc
PointSet (...)
  N Cells:    0
  N Points:   2062256
  X Bounds:   7.462e+01, 7.863e+01
  Y Bounds:   1.604e+01, 2.244e+01
  Z Bounds:   8.893e+01, 9.337e+01
  N Arrays:   0

Plot the point cloud. Color based on the distance from the center of the cloud.

>>> pc.plot(
...     scalars=np.linalg.norm(pc.points - pc.center, axis=1),
...     style='points_gaussian',
...     opacity=0.030,
...     point_size=2.0,
...     show_scalar_bar=False,
...     zoom=2,
... )
../../../_images/pyvista-examples-downloads-download_cloud_dark_matter_dense-1_00_00.png

See also

Cloud Dark Matter Dense Dataset

See this dataset in the Dataset Gallery for more info.

Cloud Dark Matter Dataset

Plotting Point Clouds

More details on how to plot point clouds.