About shape grammars
The interpreter project
Create a grammar
Run a grammar
Get out of trouble
The Yingzao fashi project
i (at) andrew (dot) li
Now you have an initial shape and a rule. Let’s use them.
Apply a rule
Run ‘apply_rule’. You will be prompted to select:
The current shape. You must select something.
The current subshape. If you want to apply the rule to only a part of the shape and not to the whole shape, select just those lines and labeled points making up the subshape. It is okay to select nothing; it is the same thing as selecting the whole shape.
An existing rule
A new rule. If you want to apply a rule, but haven’t created it yet, you can do it now.
The system will take a moment to think, and then will draw all the possible next shapes, if any. Each shape will be on a new unique layer.
As you generate new shapes, you can create new rules and apply them to the new shapes and generate more new shapes. You might be surprised by what happens.
As you work, you may delete some shapes and end up with empty layers. You can delete these layers by running the script ‘delete_empty_layers’.
When you are finished, save the grammar, along with all the shapes you generated, as a Rhino document.
You can continue working with a grammar that you saved previously.
In Rhino, open the document.
Run ‘initialize’. The system asks whether to initialize the document. Enter ‘n’. The system will load the rules into the engine but not alter the document.
The last several stages in the Nakata derivation, which the curve is inserted into each cell in the right column. The final stage, with the interior grid deleted, is not shown.