The interpreter project


Run a grammar

  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

Design

A design specified by a grammar of two rules.

 


Open a grammar
  1. Open the interpreter. Three windows will appear: the main window, the preview window, and the console. To quit, select File / Exit; don’t click on the X in the upper right corner of the window.
  2. Select File / Open and navigate to the grammar (.dat) file. The grammar will appear in the main window: initial shapes in the upper left, rules below.

Select the initial shape
  1. Click in the blank space on the right of the initial shape. It will become the current shape and appear in plan view on the current-shape canvas.
  2. Click on Iso or Tri to see the current shape in a 3D view (isometric or perspective). If it is too large for the canvas, click on Fit. To admire its 3D wonderfulness, adjust the theta and alpha values.

Calculate the next shapes
  1. Either a) select one rule and Show unique (one rule); or b) select Show unique (all rules). All the possible next shapes will be displayed in the preview window. If there is no next shape, a message box will appear.
  2. Select one of the shapes in the preview window by clicking in the blank space on its right. The current-shape canvas will be updated.
  3. Repeat with the other shapes as much as you like. The shape may be not be completely visible in the preview window, but it will be in the current-shape canvas. If it is too large, click on Fit. The shape displayed on the current-shape canvas is the current shape, and will be the basis of the next rule application.
  4. Repeat steps 1–3 until you are satisfied or until no next shape is possible.

Change your mind
  1. Select Go backward or Go forward to undo and redo rule applications.

Export the derivation and current shape to Rhino
  1. Select Derivation > Save derivation. A Save as dialog box will appear.
  2. Enter the name of the derivation (e.g., ‘test’). The system will add the suffix ‘drv’.
  3. Switch to Rhino.
  4. Select Tools > PythonScript > Run… from the menu bar. An Open file dialog box will appear.
  5. Run the ‘import_derivation’ script. The derivation, from initial shape to final shape, will be drawn in Rhino. If you want just the final shape, run the ‘import_final_shape’ script.
gray line
Contact me

i (at) andrew (dot) li

gray line