morphogen.models.planar

Tessellations of a plane: the cells of the layered and prismatic bio-inspired models (the tablets of nacre, honeycombs, the cells of wood).

A point x of the plane belongs to the cell of its nearest germ g_i. Its distance to the side shared with the cell of g_j is (|x - g_j|^2 - |x - g_i|^2) / (2 |g_j - g_i|), and the smallest of these is its distance to the boundary of its (convex) cell; the germs whose side is closer than r lie within |x - g_i| + 2 r of the point, so that the nearest germs suffice (as for the tessellations of space). On a periodic rectangle the germs are taken once: a cell is not bounded by its own images, so that a rectangle one cell wide makes the cells continuous across it.

morphogen.models.planar.RSA_JAMMING_2D = 0.547

Fraction of the plane covered by discs at the jamming limit of their random sequential addition (Feder 1980): the densest random packing that RSA reaches.

class morphogen.models.planar.PlanarCells(germs, lengths, periodic: bool, origin=(0.0, 0.0))[source]

Bases: object

Voronoi cells of germs in a rectangle of the plane, periodic or not (the germs of a window larger than the rectangle, then).

property tree: cKDTree
locate(points, reach: float = inf) → tuple[ndarray, ndarray][source]

Cell (germ index) of each point and its distance to the boundary of the cell, exact up to reach and at least reach beyond (inf: a single cell).

morphogen.models.planar.hardcore_germs(n: int, lengths, distance: float, rng) → ndarray[source]

n points of the periodic rectangle [0, lengths), at least distance apart (random sequential addition of discs; uniform points for no distance).

morphogen.models.planar.jamming_distance(n: int, area: float) → float[source]

Distance between n points of an area at the jamming limit of their random sequential addition.

morphogen.models.planar.plane_axes(axis: int) → tuple[int, int][source]

The two axes orthogonal to axis, in increasing order.

morphogen.models.planar.pixel_centres(grid, axes: tuple[int, int]) → tuple[ndarray, tuple[int, int]][source]

Centres of the voxels of a grid projected on the plane of axes: an array of points (row-major over the two axes) and the shape of the pixel image.

morphogen.models.planar.axis_centres(grid, axis: int) → ndarray[source]

Coordinates of the voxel centres along axis.