Introduction to shape gramamars
Shape grammars perform computations with shapes in
two steps: a recognition of a particular shape and its possible
replacement.
Rules specify the particular shapes to be replaced and
the manner in which they are replaced. Underlying the rules
are transformations that permit one shape to be part of
another. There is one rule associated with this page.
The rule

contains two shapes, separated by an arrow:- the
pattern on the left hand side and the replacement on the
right. The gray marker shows how to align the two
shapes.The rule replaces any triangle similar to the pattern
by the replacement shape suitably transformed. The result is
to move a single triangle of any size, a specific
distancealong its altitude, in a direction perpendicular to
andaway from the base. This can be seen when the two
shapes are drawn as one with a different colors for the
pattern and replacement shapes:

Placing the cursor over the chevron at the left hand side
of the page, changes it to a five-pointed star.
The shape grammar formalism has a long history.
The first papers was formally presented in 1971 and
published in the following year. Since this paper may be
difficult to find, here is an online copy of that paper:
Stiny G, Gips J, 1972, "Shape Grammars and the
Generative Specification of Painting and Sculpture", in C V
Freiman (ed), 1972,Proceedings of IFIP Congress71,
Amsterdam: North-Holland 1460-1465. Republished in O R
Petrocelli (ed), The Best Computer Papers of
1971: Auerbach, Philadelphia 125-135.
It is included in the bibliography of the field of
shape grammars.