uvisbox.Modules.ConeGlyphs.cone_glyphs ====================================== .. py:module:: uvisbox.Modules.ConeGlyphs.cone_glyphs Module Contents --------------- .. py:function:: cone_glyph(positions, ensemble_vectors, point_values=None, percentile=95, scale=0.5, show_edges=True, glyph_color='lightblue', ax=None) Visualize 3D uncertainty cone glyphs. This function orchestrates the three-stage pipeline: 1. Convert Cartesian → Spherical, compute vector depths, spreads, and PCA 2. Build superelliptical glyph mesh (vertices, triangles) 3. Render with pyvista :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) The ensemble vectors for each position in Cartesian coordinates. :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 percentile: 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) :type percentile: float (0-100) :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. .. py:function:: cone_glyph_old(positions, ensemble_vectors, point_values=None, percentil=0.95, scale=0.5, show_edges=True, glyph_color='lightblue', ax=None) 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.