Fig. 2: Automatic cell surface polarization algorithm.
From: SimuCell3D: three-dimensional simulation of tissue mechanics with cell polarization

For visual clarity, the process is shown in two dimensions. a, The simulation space is discretized with uniformly sized cubic voxels. All voxels that intersect with the cell surfaces are marked as boundary voxels. b, All remaining voxels are clustered with the Hoshen--Kopelman algorithm. c, Voxel clusters are tagged as lumen, cytoplasm or exterior. d, A ray is cast from the center of each face in the outward normal direction. The first voxel (other than a boundary) that it intersects with indicates with which region the face is in contact. e, Facial types are assigned on the basis of the regions with which they are in contact. f, Cross-sectional light-sheet microscopy image of a mouse prostate organoid. Cell polarity is visualized by Ezrin staining (blue, apical side). g, 3D cell segmentation of the organoid. h, Simulated organoid with automatically polarized epithelial surfaces (blue, red). The different membrane regions can possess different surface tensions, bending rigidities, adhesion strengths and repulsion strengths. Scale bars, 15 μm.