morphogen.mesh.regularize

Regularization of cell complexes: removal of the features smaller than a length.

A tessellation has edges, facets and pieces of every size; a mesh must resolve them with elements of their size, or with flat elements. Following the idea of Quey, Dawson and Barbe (2011), the features smaller than delta are removed before meshing:

  • caps — pieces that rise less than delta above a face of the box (cells that barely cross it) — are flattened onto that face: their other facets become faces of the box for the neighbouring pieces. A cap that overhangs its facet on the face cannot be flattened this way; it joins the cell of the neighbour with which it shares its largest facet (its volume changes cell, the geometry is kept);

  • short edges are contracted to a point, the shortest first; when contracting an edge alone would leave an invalid piece (a tiny facet with several short edges), its nearest neighbours are contracted with it.

Each change is kept only if every piece it touches remains a valid star polyhedron (the cones from its centroid over its facets have positive volumes) touching the faces of the box by facets, not along lines. The vertices on the faces of the box stay on them. The faces of a periodic complex remain exact translates of each other: a vertex of a face moves and merges together with its periodic images, and the facet of a flattened cap’s cell on the opposite face is split as the cap’s facet was. The facets become slightly non-planar.

The whole cells of a periodic tessellation (CellComplex.whole) have no caps: only their short edges are contracted, every vertex moving and merging together with its translates, so that the facets bounding their union remain pairs of translates.

morphogen.mesh.regularize.regularize(cx: CellComplex, delta: float) → CellComplex[source]

Complex without the caps and edges smaller than delta (see the module).