A Shape Grammar Interpreter Using Local Coordinates For Subshape Detection

Abstract

Shape Grammars allow us to create complex and intricate recursive images by applying geometric transformations. Instead of rewriting strings as in text based grammars, the production rules directly operate on the geometry of a shape. However, there can be several possibilities where a given rule could be applied to a shape. The existing implementations and theoretical approaches assume that the decision where to apply a rule has to be made manually by the designer. In this work, various heuristics are considered to let the shape grammar interpreter run by itself with minimal user input at the beginning. In addition, a new method of subshape detection is presented based on point comparison in local coordinates, which is needed for the shape grammar interpreter to find subshapes to apply the rules to. This novel detection algorithm and several of the heuristics are implemented in a proof of concept interpreter and editor. They are used to create various images that would have been tedious to do in this detail by manual interaction with the interpreter.