spine.vis.cone
Module to convert a point cloud into a cone envelope.
Functions
|
Converts a cloud of points into a 3D cone. |
- spine.vis.cone.cone_trace(points: ndarray, fraction: float = 0.5, num_samples: int = 10, color: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, hovertext: 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, showscale: bool = False, **kwargs: Any) plotly.graph_objs.Mesh3d[source]
Converts a cloud of points into a 3D cone.
This function uses the PCA and the average angle w.r.t. to the point of maximum curvature as a basis to construct a cone.
- Parameters:
points (np.ndarray) – (N, 3) Array of point coordinates
fraction (float, default 0.5) – Fraction of the points contained in the cone (angle quantile)
num_samples (int, default 10) – Number of points sampled along h and phi in the conical coordinate system of the cone. A larger number increases the resolution.
showscale (bool, default False) – If True, show the colorscale of the
plotly.graph_objs.Mesh3dcolor (Union[str, int, float, Sequence], optional) – Color of the cone. Must be provided as one scalar value.
hovertext (Union[int, float, str, Sequence], optional) – Text associated with the cone. Can be a scalar label or a per-vertex sequence of labels.
intensity (Union[int, float, Sequence], optional) – Intensity of the cone colors. Can be a single numeric value or a per-vertex sequence.
showscale – Whether to show the color scale for the mesh
**kwargs (dict, optional) – Additional parameters to pass to the
plotly.graph_objs.Mesh3dobject