DivideCell Cellzilla2D Home


Divides a cell along a specified line.


Return Value

DivideCell[tissue, j, {{x1,y1}, {x2, y2}}] returns a tissue with cell j divided along the line between the specified points. The line is either extended or truncated to find the endpoints of the new edge. If the line does not intersect the cell (even when extended to infinity) then $Failed is returned.


"Changes"→False (default) Return value is the new Tissue object.

"Changes"→True Return value is {list-of-changes, newTissue}. The list of changes gives the relationship between old and new edge numbers, in the form old→{new1,new2} and {}→new-edge-number for the completely new edge.


[ Download Example as Zipped Mathematica Notebook ]

Implementation Notes

If either endpoint of the new edge occurs at a previously existing vertex, the division line is rotated slightly about its midpoint so that two new vertices will always be created (even though the new edges will be very short).

See Also

[7 June 2017]