Rays Rule

Partitions input region using straight path segments in the manner of ‘rays‘. Intersections of ‘ray’ segments with each other are called junctions, and intersections at iregion boundary – entrancesDelaunay Triangulation is used (related to Voronoi Diagram, which is its dual).

Entrances (boundary intersections) are determined by the list of boundary parameters or selections. Junction placement (ray intersections) is determined by sample distribution radius:

rays(boundary_selections, radius) 
 { RegionList } { PathList } { JunctionList }

Alternatively, a number of samples can be specified, and the algorithm tries to guess the sample radius:

rays(boundary_selections, number_of_samples) 
 { RegionList } { PathList } { JunctionList }

Optionally, minimal offset from junctions to the boundary can be provided:

rays(boundary_selections, ..., junction_offset) 
 { RegionList } { PathList } { JunctionList }
  • boundary selections – list of parameter values within the range [0..1]. For example [0, 0.25, 0.5, 0.75] will place entrances at the corners of a square.
  • radius, number_of_samples – minimum radius between any two junctions, and respectively the number of junctions. Also, see Cells Rule for the explanation with one difference: in Cells Rule radius refers to the distance between quarters, rather than junctions ).
  • offset – centres of the junctions is placed with this minimum distance from the boundary.
  • RegionList, PathList, JunctionList – label selector lists (see Grid Rule for explanation).

Cells Rule

Partitions input region into more natural looking “cell-like” quarters that resemble biological cells. Voronoi Diagram partitioning method is used.

Sample radius determines centre of a cell:

{ RegionList } { PathList } { JunctionList }

Alternatively number of samples can be requested and radius best matching radius will be guessed (this is currently a not very accurate procedure):

 { RegionList } { PathList } { JunctionList }

With an optional smoothing parameter:

cells(..., M(smoothing_factor))
 { RegionList } { PathList } { JunctionList }

Symmetry parameter is added at the end and is also optional:

cells(..., S(symmetry_id))
 { RegionList } { PathList } { JunctionList }
  • radius – minimum distance between any two path junctions; larger radius means fewer junctions. Alternatively number_of_samples can be used:
  • number_of_samples – specify actual number of junctions to place within the region. Algorithm tries to take a guess the appropriate radius, however the actual radius than the ideal one for the appropriate number of samples.
  • smoothing_factor – how much should the cells be smoothed by. Smoothing reduces a cell size.
  • symmetry_id
    • 0: no symmetry
    • 1: x symmetry
    • 2: y symmetry
    • 3: x and y symmetry (which is also a boolean AND of 1 and 2)
  • RegionList, PathList, JunctionList – label selector lists, as in Grid Rule.

Peel Rule

Extrude the subset of the boundary inwards in the input region.

peel(boundary_selection, offset)
 { ExtrudedRegionList } { SubstrateRegionList }
  • boundary_selection (boundary selection) – subset of the input region boundary.
  • offset – how much to peel or extrude. Can be an absolute value, a relative (in percent) or a random range.
  • ExtrudedRegionList, SubstrateRegionList – label selector lists for extruded region and substrate region accordingly. Extruded region is the newly created region and the substrate region occupies the remaining space of the input region.