uvisbox.Modules.ProbabilisticMarchingTriangles.probabilistic_marching_triangles_vis

Module Contents

uvisbox.Modules.ProbabilisticMarchingTriangles.probabilistic_marching_triangles_vis.visualize_probabilistic_marching_triangles(mesh_data, points, triangle_mesh, ax=None, colormap='viridis')[source]

Visualize probabilistic marching triangles using matplotlib.

This function creates a 2D visualization of the crossing probabilities using matplotlib’s tripcolor for triangular meshes.

Parameters:
  • mesh_data (np.ndarray) – 1D array of shape (n_triangles,) with probabilities of contour presence in each triangle.

  • points (np.ndarray) – 2D array of shape (n_points, 2) representing the coordinates of the points.

  • triangle_mesh (np.ndarray) – 2D array of shape (n_triangles, 3) representing the triangulation of the points.

  • ax (matplotlib.axes.Axes, optional) – The axis to draw on. If None, a new figure and axis will be created.

  • colormap (str, optional) – Colormap for the probability map. Default is ‘viridis’.

Returns:

axmatplotlib.axes.Axes

The axis with the visualized probabilistic isocontour.