uvisbox.Modules.ConeGlyphs.cone_glyphs
Module Contents
- uvisbox.Modules.ConeGlyphs.cone_glyphs.cone_glyph(positions, ensemble_vectors, point_values=None, percentile=95, scale=0.5, show_edges=True, glyph_color='lightblue', ax=None)[source]
Visualize 3D uncertainty cone glyphs.
- This function orchestrates the three-stage pipeline:
Convert Cartesian → Spherical, compute vector depths, spreads, and PCA
Build superelliptical glyph mesh (vertices, triangles)
Render with pyvista
- Parameters:
positions (numpy.ndarray) – Array of shape (n, 3) The positions of the squid glyphs.
ensemble_vectors (numpy.ndarray) – Array of shape (n, m, 3) The ensemble vectors for each position in Cartesian coordinates.
point_values (numpy.ndarray, optional) – Array of shape (n,) The values associated with each position for coloring.
percentile (float (0-100)) – Percentile of ensemble members to include based on depth ranking. Higher values include more vectors (larger glyphs showing more variation). - percentile=50: Include top 50% deepest vectors - percentile=95: Include top 95% deepest vectors (typical, default) - percentile=100: Include ALL vectors (maximum variation)
scale (float, optional) – The scale factor for the glyphs. Default is 0.5.
show_edges (bool, optional) – Whether to show edges of the glyphs. Default is True.
glyph_color (str, optional) – The color of the glyphs. Default is ‘lightblue’.
ax (pyvista.Plotter, optional) – The pyvista plotter to use. If None, a new plotter will be created.
- Returns:
plotter (pyvista.Plotter) – The pyvista plotter with the drawn squid glyphs.
points (numpy.ndarray) – The points of the squid glyphs.
polygons (numpy.ndarray) – The polygon connectivity for the glyphs.
- uvisbox.Modules.ConeGlyphs.cone_glyphs.cone_glyph_old(positions, ensemble_vectors, point_values=None, percentil=0.95, scale=0.5, show_edges=True, glyph_color='lightblue', ax=None)[source]
Draws uncertainty squid glyphs for the given positions and ensemble vectors in 3D. :param positions: Array of shape (n, 3) The positions of the squid glyphs. :type positions: numpy.ndarray :param ensemble_vectors: Array of shape (n, m, 3) containing Cartesian ensemble vectors for each position. :type ensemble_vectors: numpy.ndarray :param point_values: Array of shape (n,) The values associated with each position for coloring. :type point_values: numpy.ndarray, optional :param percentil: The first percentile for depth filtering. :type percentil: float :param scale: The scale factor for the glyphs. Default is 0.5. :type scale: float, optional :param show_edges: Whether to show edges of the glyphs. Default is True. :type show_edges: bool, optional :param glyph_color: The color of the glyphs. Default is ‘lightblue’. :type glyph_color: str, optional :param ax: The pyvista plotter to use. If None, a new plotter will be created. :type ax: pyvista.Plotter, optional
- Returns:
plotter (pyvista.Plotter) – The pyvista plotter with the drawn squid glyphs.
points (numpy.ndarray) – The points of the squid glyphs.
polygons (numpy.ndarray) – The polygon connectivity for the glyphs.