pysdic.display_projected_elements_areas#

display_projected_elements_areas(mesh, camera, *, warp_by=None, signed=False, annotate=False, n_points_per_element=None, cmap='viridis', clim=None, fontsize=6, figsize=None, title=None, show=True)[source]#

Display the area in pixels² of the projection of each element of a surface mesh (see compute_projected_elements_areas()), on the sensor of a camera or on the image of a view.

With annotate=True, the area of each element is written at the projection of its center. With n_points_per_element, the density of integration points of each element (points per pixel, \(n / A_e\)) is also given, to choose the number of integration points: about 1 point per pixel on the smallest elements uses all the pixels without oversampling.

Parameters:
  • mesh (pysdic.Mesh) – The surface mesh (with an element type), of dimension \(E\) equal to the input dimension of the camera.

  • camera (Union[pysdic.Camera, pysdic.View]) – The camera, or a view (drawn on its image).

  • warp_by (Optional[Union[str, ArrayLike]], optional) – The displacement of the vertices (name of a vertex property or array of shape \((N_v, E)\)).

  • signed (bool, optional (default: False)) – Whether to display the signed areas (negative for the elements seen from the back).

  • annotate (bool, optional (default: False)) – Whether to write the area (and the density) in each element.

  • n_points_per_element (Optional[Integral], optional) – The number of integration points per element: the range of the density is added to the title, and to the annotations.

  • cmap (str, optional (default: "viridis")) – The colormap of the areas.

  • clim (Optional[Tuple[Real, Real]], optional) – The color limits. By default, set automatically.

  • fontsize (Real, optional (default: 6)) – The font size of the annotations.

  • figsize (Optional[Tuple[Real, Real]], optional) – The size of the figure in inches (width, height). Default: (8, 6).

  • title (Optional[str], optional) – The title of the figure. By default, the range of the areas (and of the density).

  • show (bool, optional (default: True)) – Whether to show the figure.

Returns:

The figure.

Return type:

matplotlib.figure.Figure