The patterns on the tree

See also

Implementation examples: