morphogen.models.branching

Branching networks grown by space colonization: vascular trees, roots, corals.

Blood vessels, the airways of lungs, the roots and crowns of plants grow toward the tissue or the space they serve. The space colonization algorithm (Runions, Lane and Prusinkiewicz 2007) grows a tree toward attraction points scattered in the volume (the cells that call for vessels, the light the crown seeks): at each step, every point pulls the node of the tree nearest to it within the influence distance d_i; each pulled node grows a branch of length D toward the mean direction of its points, and the points closer to the tree than the kill distance d_k are reached and removed. The growth stops when no point is left within reach of the tree.

The radii follow Murray’s law (1926): the radius of a vessel to the power n is the sum of those of its branches, from tips of radius r_t: n = 3 minimizes the work of a laminar flow and the volume of blood (Murray), n = 2 keeps the cross-section area (the pipe model of trees, da Vinci’s rule). A root then has the radius r_t N^(1/n) for the N tips it feeds. In a periodic box the tree grows on the torus.

morphogen.models.branching.murray_radii(parents: ndarray, tip: float, exponent: float) → ndarray[source]

Radius of the segment ending at each node: tip for the tips, and Murray’s law r^n = sum of r_child^n above (the parents come before their children).

class morphogen.models.branching.BranchingNetwork(n_attractors: int = 2000, step: float = 0.02, influence: float | None = None, kill: float | None = None, roots: int = 1, root_position: str = 'face', tip_radius: float = 0.004, murray_exponent: float = 3.0, max_steps: int = 2000, axis: int = 2)[source]

Bases: Model

Branching network grown toward n_attractors random points by space colonization (segments of step), with Murray’s law for the radii.

phases: ClassVar[dict[int, str]] = {0: 'tissue', 1: 'vessels'}

Meaning of the phase indices of the voxel images.

count_label: ClassVar[str] = 'segments'

Objects counted by expected_count() (fibres, spheres, cells…).

property influence_distance: float
property kill_distance: float
grow(rng, size: ndarray, periodic: bool) → _Tree[source]

Grow the trees in the box [0, size) (on the torus if periodic).

generate(domain: Domain, seed: int | SeedSequence | Generator | None = None) → PrimitiveUnion[source]

One realization of the model in domain.

expected_count(domain: Domain) → float | None[source]

Mean number of objects of the model in domain (None when undefined).

Used to express RVE sizes as numbers of fibres, grains or cells (Dirrenberger et al. 2014, Table 10).

theory(domain: Domain | None = None) → dict[str, float][source]

The radius of a root feeding N tips is r_t N^(1/n): the exponent of Murray’s law and the area ratio of a symmetric branching, 2^(1 - 2/n).