uvisbox.Modules.SquidGlyphs.squid_glyphs_mesh
Module Contents
- uvisbox.Modules.SquidGlyphs.squid_glyphs_mesh.squid_glyphs_2d_mesh(positions, stats_2d, scale=0.2)[source]
Build 2D squid glyph mesh from statistics.
Creates arrow-shaped glyphs with three components: 1. Base rectangle (uncertainty in magnitude) 2. Shaft rectangle (tapered middle section) 3. Head triangle (arrow tip)
- Parameters:
positions (numpy.ndarray) – Shape (n, 2) - glyph positions
stats_2d (dict) – From squid_glyphs_2d_summary_statistics()
scale (float) – Glyph scale factor (default: 0.2)
- Returns:
mesh_2d – Contains
pointswith shape (k, 2) andpolygonswith shape (m, 3).- Return type:
dict
- uvisbox.Modules.SquidGlyphs.squid_glyphs_mesh.squid_glyphs_3d_mesh(positions, stats_3d, point_values=None, scale=0.5, resolution=10)[source]
Build 3D squid glyph mesh from statistics.
- Parameters:
positions (numpy.ndarray) – Shape (n, 3) - glyph positions
stats_3d (dict) – From squid_glyphs_3d_summary_statistics()
point_values (numpy.ndarray, optional) – Shape (n,) - scalar values for coloring
scale (float) – Glyph scale factor (default: 0.5)
resolution (int) – Circle resolution (default: 10)
- Returns:
mesh_3d – Contains
pointswith shape (k, 3),polygonswith shape (m, 3), andpoint_valueswith shape (k,).- Return type:
dict
- uvisbox.Modules.SquidGlyphs.squid_glyphs_mesh.squid_glyphs_meshing_3D(pca_components, positions, vectors, spread_min_vectors, median_vectors, spread_max_vectors, scaler_values, glyph_types, scale, resolution, num_of_glyphs)[source]
Build superelliptical squid glyphs for 3D visualization.
Creates glyphs with these components: 1. Base disk (at position) 2. Body cylinder (from base to shoulder) 3. Shaft (tapered section) 4. Head cone (arrow tip)
- Parameters:
pca_components (numpy.ndarray) – PCA components for cross-section shape
positions (numpy.ndarray) – Glyph center positions (n, 3)
vectors (numpy.ndarray) – Ensemble vectors (unused, for compatibility)
spread_min_vectors (numpy.ndarray) – Vector statistics in spherical coordinates
median_vectors (numpy.ndarray) – Vector statistics in spherical coordinates
spread_max_vectors (numpy.ndarray) – Vector statistics in spherical coordinates
scaler_values (numpy.ndarray) – Scalar values for coloring
glyph_types (numpy.ndarray) – Glyph type flags (0=none, 1=full, 2=arrow only)
scale (float) – Overall glyph scale
resolution (int) – Number of vertices per circle
num_of_glyphs (int) – Number of full glyphs to create
- Returns:
points, polygons, points_values – Mesh geometry and scalar values
- Return type:
tuple