spine.vis.hull

Module to convert a point cloud into an convex hull envelope.

Functions

hull_trace(points[, color, intensity, ...])

Converts a cloud of points into a 3D convex hull.

spine.vis.hull.hull_trace(points: ndarray, color: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, intensity: bool | int | float | generic | Sequence[bool | int | float | generic] | ndarray | None = None, hovertext: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, showscale: bool = False, alphahull: float = 0, **kwargs: Any) plotly.graph_objs.Mesh3d[source]

Converts a cloud of points into a 3D convex hull.

This function represents a point cloud by forming a mesh with the points that belong to the convex hull of the point cloud.

Parameters:
  • points (np.ndarray) – (N, 3) Array of point coordinates

  • color (Union[str, int, float, Sequence], optional) – Color of the hull. Can be a single Plotly color or numeric value.

  • intensity (Union[int, float, Sequence], optional) – Color intensity of the hull along the colorscale axis. Can be a single numeric value or a per-vertex sequence.

  • hovertext (Union[int, float, str, Sequence], optional) – Text associated with the hull. Can be a scalar label or a per-vertex sequence of labels.

  • showscale (bool, default False) – If True, show the colorscale of the plotly.graph_objs.Mesh3d

  • alphahull (float, default 0) – Parameter that sets how to define the hull. 0 is the convex hull, larger numbers correspond to alpha-shapes.

  • **kwargs (dict, optional) – Additional parameters to pass to the underlying plotly.graph_objs.Mesh3d object