morphogen.models.bouligand

Bouligand structures: twisted plywoods of fibres.

The fibrous composites of arthropod cuticles (chitin), of fish scales and of the osteons of bone (collagen) stack layers of parallel fibres, each layer turned by a small angle from the one below (Bouligand 1972): the fibre direction describes a helicoid along the stacking axis. Cracks follow the twisting fibres, which spreads the damage and makes the dactyl club of the mantis shrimp so impact tolerant (Weaver et al. 2012); helicoidal laminates of carbon fibres borrow the arrangement.

Layer k (thickness h) holds parallel cylinders of radius r at the spacing s, in the direction theta_0 + k delta (delta: the pitch angle) at a random offset. The fibres of a layer do not overlap (2 r <= s), nor those of consecutive layers (2 r <= h): the volume fraction of fibres is pi r^2 / (s h).

A periodic box holds a whole number of half-turns of the helicoid, and fibre families that are periodic in its plane: the fibres normal to (a / L_u, b / L_v) (integers a, b) at the spacing 1 / |(a / L_u, b / L_v)|. The number of layers and the pitch are those closest to the asked thickness and pitch, and each layer takes the periodic family closest to its direction and spacing (a larger box gets closer); the directions and spacings taken are those of the realization.

morphogen.models.bouligand.periodic_families(lengths, spacing: float, least: float)[source]

Fibre families that are periodic in a rectangle of sides lengths: the fibre direction (degrees, in [0, 180)) and the spacing of each, at least least.

class morphogen.models.bouligand.BouligandStructure(domain, axis, radius, thickness, origin, angles, spacings, offsets, **kw)[source]

Bases: Microstructure

Layers of parallel fibres along axis: layer k spans [z0 + k h, z0 + (k + 1) h), its fibres the cylinders of radius r around the lines of its mid-plane in the direction angles[k] (degrees from the first axis of the plane), at the spacing spacings[k], one of them through offsets[k] along their normal.

property n_layers: int
level_set_at(points, reach: float = inf) → ndarray[source]

The signed distance to the fibres (negative inside).

signed_distance(points) → ndarray[source]

Distance to the fibres (negative inside): the distance to the nearest axis of the layers around each point, minus the radius.

contains(points) → ndarray[source]

Whether points lie in phase 1.

voxelize(shape=None, *, voxel_size=None, grid: Grid | None = None, supersampling=1)[source]

Phase image (uint8), or partial volume fractions of phase 1 (float32) when supersampling > 1 (supersampling**3 sub-samples per voxel).

level_set(shape=None, *, voxel_size=None, grid: Grid | None = None) → VoxelImage[source]

Signed distance to the fibres (exact: the union of the cylinders of the layers around each point).

summary() → dict[source]

Counts and sizes describing the realization.

property pitch_angle: float

Mean rotation from one layer to the next (degrees).

class morphogen.models.bouligand.Bouligand(fiber_radius: float = 0.05, fiber_spacing: float | None = None, layer_thickness: float | None = None, pitch_angle: float = 15.0, start_angle: float | None = None, axis: int = 2)[source]

Bases: Model

Bouligand (twisted plywood) structure: layers of parallel fibres, each turned by pitch_angle from the one below, stacked along axis.

phases: ClassVar[dict[int, str]] = {0: 'matrix', 1: 'fibres'}

Meaning of the phase indices of the voxel images.

count_label: ClassVar[str] = 'layers'

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

property spacing: float
property thickness: float
generate(domain: Domain, seed: int | SeedSequence | Generator | None = None) → BouligandStructure[source]

One realization of the model in domain.

expected_count(domain: Domain) → float[source]

Number of layers across the domain.

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

Theoretical morphological characteristics known in closed form (may be empty).

Some values depend on the domain (e.g. the intensity implied by a number of cells).