Rectangularize Cellzilla2D Home

Description

Converts a Tissue object into another Tissue object that geometrically corresponds to the smallest enclosing rectangule with sides parallel to the coordinate axes.

The algorithm uses a naive projection of vertices to the nearest point on the enclosing rectangle (making boundary cells larger) and then divides all cells above a threshold perpendicularly to their principal axis.

Needs["Cellzilla2D`"];

Return Value

Rectangularize[Tissue]

Options

"Corners"→"Automatic" or {{xmin, ymin}, {xmax, ymax}}, if specified, will use these corners for the bounding rectangle rather than automatically detecting the smallest enclosing rectangle.

"Method"→"Perpendicular" (default) - means project vertices to nearest point on rectangle. Future variants may include other methods of projection or extension.

"Quiet"→False (default) - if true, suppress normal mode messages.

"Randomness"→0.25 (default) - randomization constraint (larger means more randomization) of new vertices that are added. Some new vertices may be added if cells have to be extended a large way; this is done by splitting the cells perpendicular to their main axis. To avoid having long straight lines of cells some randomization is performed.

Example

[ Download Example as Zipped Mathematica Notebook ]

Implementation Notes

Because the cell vertices must be projected to the enclosing rectangle, the areas of the cells around the boundary will increase. To fix this, some cells will be divided into smaller cells.

See Also



[13.Junw.2017 ]