Shape Grammars
Shape Grammars were first invented by George Stiny and James Gips in their 1972 article Shape Grammars and the Generative Specification of Painting and Sculpture. Shape grammars combine shapes and transformation rules to create patterns or in the subdivision of space, and have consequently been used in design and architecture.
James Gips writes that “Shape grammars are a form of “purely visual computation. The primitives in shape grammars are shapes, rather than symbols. The relationships and operations are all spatial (e.g. similarity, rotation) rather than symbolic. One can show the formal equivalence of traditional symbolic computations”. (1999)
Shape grammars are a type of procedural design, and whilst they have not been widely taken up in computer aided design, they are clearly part of the legacy of procedural design. Analogue parametricism and parametric architecture were also being developed around the same time. Further work in this area is often referred to as computing with shapes.
Shape grammars are a visual way of writing the rule sets that underlie algorithms used in design. They capture a computational process graphically, of shapes being added and subtracted in accordance with spatial relation. When designing a shape grammar, one is designing a system for design, that can output many variations.
Basic shape grammars usually consist of a shape which can be comprised of points, lines, or multidimensional polygons, a start rule, transformation rules, which are usually applied recursively, and a termination rule. A shape grammar is a language generator or language recognizer, albite one that works with a visual alphabet, or graphic pattern. Calculating with shapes is both perceptual and computational, it’s about what the graphic representations reveal to us about their computations. One could use shape grammars to analyze and produce recursive geometry such as the Koch Snowflake, Peano curve, and Hilbert curve (Gips, 1975).
“A shape is generated from a shape grammar by beginning with the initial shape and recursively applying the shape rules. The result of applying a shape rule to a given shape is another shape consisting of the given shape with the right side of the rule substituted in the shape for an occurrence of the left side of the rule.” (Gips J and Stiny G, 1972)
Get Catherine Griffiths’s stories in your inbox
Join Medium for free to get updates from this writer.
Shape grammars are a type of formal grammar, and the shapes could also be understood as syntax in language theory or automata states in theoretical computer science, they are also related to l-systems in biology.
Stiny later describes how shape rules complete a spatial analogy: “Shape rules are defined by ostension: any two shapes that are shown one after the other determine a rule. Suppose these shapes are A and B in a given algebra. Then, the rule they define is A → B” (1999)
“Where we use shape grammars exclusively to generate shapes for painting and sculpture, they can also be used to simulate Turing machines and to generate musical scores, structural descriptions of chemical compounds, and the sentences — and their tree structures — in languages defined by phrase structure grammars. Grammar-grammars, where the sentences generated are themselves shape grammars, are possible. While no parsing algorithms have been developed, shape grammars seem applicable to the analysis, as well as the generation, of shapes.” (Gips J and Stiny G, 1972)
Shape grammars can also play a role in the understanding of complexity and emergence, through visualizing the process of simple transformation rules applied iteratively to shapes: “There is a lot of real excitement today about complexity, and how computers help to understand it in extreme cases. It is easy to agree that complexity is a correlate of structure — how are parts divided for counting? — and that it is impossible without it. But as a result, complexity is undefined before rules are applied in actual computations. It may vary widely as computations unfold, and may be irrelevant once they are completed. There are other ways to describe shapes and to talk about how they work”. (Stiny, 1999) Whilst shape grammars have influenced computational design, design can also function in the comprehension of abstract computational processes. Shape grammars link process and product through their explicit rules, and provide a means of exploring these relationships and visualizing computational processes. It is both an analysis problem and a design problem.
Works Cited:
Gips, J. Implementing Shape Grammars with Computers, conference paper presented at The NSF/MIT Workshop on Shape Computation, 1999. Available to download at: http://www.shapegrammar.org/projects.html
Gips, J. Shape Grammars and their Uses Artificial Perception, Shape Generation and Computer Aesthetics, PhD Thesis, 1975, Birkhauser Verlag, Basel und Stuttgart. Available to download at: http://algorithmicaesthetics.org/GipsShapeGrammarsBirkhauser.pdf
Stiny, G. and Gips, J. Shape Grammars and the Generative Specification of Painting and Sculpture, in Proceedings of IFIP Congress 1971, 1972, North Holland Publishing Co. Available to download at http://www.shapegrammar.org/ifip/ifip1.html
Stiny, G. Commentary, in Theoretical Refinements by March, L., conference paper presented at The NSF/MIT Workshop on Shape Computation, 1999. Available to download at: http://www.shapegrammar.org/projects.html










