The trinet growth algorithm uses two rewrite rules: 'Refin' essentially replaces a node by a triangle and 'Diags' affects the topology of the network, locally, without changing the number of nodes. These are the first two rules in the three-slot picture on page 1038 of the NKS book, sometimes called T2 and T1; they preserve planarity and, if 'Refin' is used in both directions, they form a complete set that allows you to rewrite any planar trinet into any other. The choice of which rule to apply at each step depends on the sizes of two adjacent polygonal faces of the planar trinet: if one or both faces have less than the threshold parameter value, 'Refin' is applied, which creates a new triangular face and increases the sizes of three existing faces; otherwise, 'Diags' is applied, which decreases by one the sizes of two faces and increases by one the sizes of two other faces. The control parameters 'RefinCode' and 'DiagsCode' are used for deciding where to move the control point when rule 'Refin' or 'Diags' is applied.