The interpreter project


Set up

  gray line

Home

About me

About shape grammars

Publications

gray line

The interpreter project

Set up

Create a grammar

Run a grammar

Get out of trouble

gray line

The Yingzao fashi project

gray line

Sierpiński grammar in Rhino

Sierpiński gasket

Above: A grammar to generate Sierpiński gaskets. It consists of an initial shape (back left) and two rules (front right, with arrows). Below: A Sierpiński gasket, generated by the same grammar.

 

It’s simple.

  1. Make sure you have Rhino and Windows installed. Use a version of Rhino that can run Python scripts (Rhino v5.8 (or later) for Windows, apparently). To see the version number, in Rhino select Help / About Rhinoceros. Look in the lower right corner, in parentheses.
  2. Download the interpreter package (called ‘interpreter-package’). It contains these items:
    1. The grammar environment (also called the interpreter).
    2. A folder called ‘package’ containing the translator scripts.
    3. Other items, such as documentation and sample grammars.
  3. Check the path names of the interpreter folder and the scripts folder. All names in the path(s) to these two folders must consist only of ASCII characters. Put simply, this means that the parent folder of either or both of these two folders must have an English name. This also applies to the grandparent folder, the great-grandparent folder, and so on up to the root. Don’t use names like ‘文法’ or ‘グラマー’ or even ‘grámmar’ (which has a letter with an accent). Use only the English input method; with other methods you can input English letters, but they may not have the ASCII codes.
  4. Set the Python module search path. In Rhino, open the Python script editor (Tools / PythonScript / Edit). In the Python script editor, select Tools / Options / Files. Press ‘+’ and navigate to the folder containing the folder ‘package’. (This is the folder ‘interpreter-package’, unless you changed the name.) Restart Rhino.

If you’re hot to trot, now is a good time. If, on the other hand, you’d like to read some more instructions, go to the next page.

gray line
Contact me

i (at) andrew (dot) li

gray line