morphogen.models.honeycomb¶
Honeycombs and wood: prismatic cells with walls.
Prismatic cellular solids, the honeycombs of bees and the cells of wood, of cork or of
plant stems, are stiff and strong along their axis for their weight, and compliant
across it (Gibson and Ashby 1997). The model extrudes along an axis a tessellation of
the plane of germs whose cells are bounded by walls of thickness t: the points of a
cell closer than t / 2 to its sides (a wall between two cells is the sum of their
halves). The germs are
hexagonalorsquare: lattices whose cells are hexagonsdwide between opposite walls, or squares of sided, displaced at random by up todisordercell (a periodic box holds whole cells: the lattice stretches to fit it);voronoi: points of a random sequential addition at leastregularityjamming distance apart (Poisson points for 0), one per areasqrt(3) d^2 / 2of a hexagon;wood: the radial files of softwoods, rectangular cells rather than the cells of germs. Along the tangential axis (the second of the plane), filesdwide whose radial walls are straight; along the radial axis (the first), cells whose size and wall thickness vary through the growth rings of widthring_width: from large thin-walled earlywood cells (dacross) to small thick-walled latewood cells (latewood_sizeandlatewood_walltimes those of earlywood, in the lastlatewood_fractionof the ring, after a transition of half that width); each file is shifted by a random fraction of its cells, so that the tangential walls are staggered. Loaded radially, the straight radial walls carry the load; tangentially, the radial walls bend between the staggered tangential ones: with uniform cells the radial modulus is several times the tangential one. Dense latewood bands, continuous along the tangential axis, stiffen it.Rays (
ray_fractionof the volume) are ribbons of parenchyma cells that run radially across the rings between two files:ray_widthcells across (1: the uniseriate rays of softwoods, more for the multiseriate rays of hardwoods) andray_heighthigh along the grain, at random places, never closer than one ray cell along the grain to another ray between the same files or between neighbouring ones. Their cells are boxesray_cell_lengthlong radially,ray_cell_widthwide andray_cell_heighthigh, with wallsray_wallthick. The tracheids pass beside the rays: over the height of a ray, its walls replace the radial wall between the two files, narrowed by half its width each. Rays make the structure three-dimensional.
Walls of uniform thickness t around hexagons or squares of width d take the
fraction 1 - (1 - t / d)^2 of the volume, exactly; around the cells of Poisson germs,
t L_A = 2 t sqrt(lambda) to first order in t (L_A: length of the sides per
unit area, lambda: germs per unit area).
- class morphogen.models.honeycomb.RadialFiles(origin, width, bounds, lengths, periodic: bool, lower)[source]¶
Bases:
objectRectangular cells in files along the first axis of the plane: file
jspans[origin + j width, origin + (j + 1) width)across, its cells the intervals between its consecutivebounds[j]along it (on a periodic box, one period: the last bound is the first plus the length of the box).- property n_files: int¶
- parts(points)[source]¶
Cell and file
jof each point, and its distances to the sides of the cell: along the file, and across it to its radial walls below and above (on the boundariesjandj + 1of the files).
- class morphogen.models.honeycomb.WoodRays(boundary, z, u, cells, width, height, cell_length, cell_height, thickness, period=None)[source]¶
Bases:
objectRays between radial files: ray
rlies on the boundaryboundary[r]of the files (the radial wall between the filesboundary[r] - 1andboundary[r]),widthwide across it, fromz[r]toz[r] + heightalong the grain (the prism axis, ofperiodon a periodic box). Its cells are boxescell_lengthlong radially (their boundaries atu[r]plus multiples of it),width / cellswide andcell_heighthigh, with wallsthicknessthick.- locate(boundary: ndarray, z: ndarray)[source]¶
For points given by a boundary of the files and their coordinate along the grain: the ray on the boundary at their height (-1: none), their height in it, and their distance along the grain to the rays of the boundary (0 within the height of one, inf: none).
- class morphogen.models.honeycomb.PrismaticCells(domain, axis, germs, walls, files=None, **kwargs)[source]¶
Bases:
MicrostructurePrisms along
axisover cells of the plane: the walls (phase 1) are the points closer to the sides of their cell than half its wall thicknesswalls[i], the lumens of the cells phase 0. The cells are those of germs (Voronoi), or rectangles in radialfiles(wood; the germs are then their centres), between which rays may run (files["rays"],WoodRays): the structure is then three-dimensional.- property n_cells: int¶
- property n_rays: int¶
- property ray_fraction: float¶
rays run across the box radially, so that it is their share of the tangential plane (across the files and along the grain).
- Type:
Fraction of the box in rays (their cells and walls), exact
- level_set_at(points, reach: float = inf) ndarray[source]¶
The distance to the sides of the cells minus half their walls at the points (exact within
reachof the walls, at leastreachbeyond).
- 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**3sub-samples per voxel).
- level_set(shape=None, *, voxel_size=None, grid: Grid | None = None) VoxelImage[source]¶
Distance to the sides of the cells minus half their walls: negative in the walls, the signed distance to them near their faces.
- class morphogen.models.honeycomb.Honeycomb(cell_size: float = 1.0, wall_thickness: float = 0.1, arrangement: str = 'hexagonal', regularity: float = 0.7, disorder: float = 0.0, ring_width: float | None = None, latewood_fraction: float = 0.3, latewood_size: float = 0.4, latewood_wall: float = 2.0, ray_fraction: float = 0.0, ray_width: int = 1, ray_height: float | None = None, ray_cell_length: float | None = None, ray_cell_width: float | None = None, ray_cell_height: float | None = None, ray_wall: float | None = None, axis: int = 2)[source]¶
Bases:
ModelPrismatic cells along
axiswith walls ofwall_thickness: hexagonal or square honeycombs, random cells, or the radial files, growth rings and rays of wood.- phases: ClassVar[dict[int, str]] = {0: 'cells', 1: 'walls'}¶
Meaning of the phase indices of the voxel images.
- count_label: ClassVar[str] = 'cells'¶
Objects counted by
expected_count()(fibres, spheres, cells…).
- property ray_cells: dict[str, float]¶
Sizes of the ray cells (
cell_length,cell_width,cell_height) and of the rays (width,height), and thethicknessof their walls.
- ring_profile(x: ndarray) ndarray[source]¶
Latewood share at the positions
x(in rings, from the start of a ring): 0 in earlywood, 1 in latewood, linear through the transition.
- generate(domain: Domain, seed: int | SeedSequence | Generator | None = None) PrismaticCells[source]¶
One realization of the model in
domain.
- property cell_area: float¶