cellcomplex.property_topomesh.analysis.compute_topomesh_triangle_properties

cellcomplex.property_topomesh.analysis.compute_topomesh_triangle_properties(topomesh, positions=None, verbose=False)[source]

Compute an usual set of properties over the faces of a PropertyTopomesh.

The function computes several geometrical properties assuming the structure passed as argument is a PropertyTopomesh representing a triangular mesh. The area, perimeter and eccentricity of each triangular face is computed and the corresponding properties updated in the structure.

Parameters
  • topomesh (cellcomplex.property_topomesh.PropertyTopomesh) – The structure on which to compute the property.

  • positions (dict, optional) – A position dictionary if the property (‘barycenter’,0) is empty.

Returns

Return type

None

Note

The PropertyTopomesh passed as argument is updated.

Example

>>> from cellcomplex.property_topomesh.example_topomesh import square_topomesh
>>> from cellcomplex.property_topomesh.analysis import compute_topomesh_triangle_properties
>>> topomesh = square_topomesh(side_length=1)
>>> compute_topomesh_triangle_properties(topomesh)
>>> print topomesh.wisp_property('area',2)
{0: 0.5, 1: 0.5}