Conference PaperPDF Available

Combining Geometries and Descriptions A shape grammar plug-in for Grasshopper

Authors:

Abstract and Figures

A persistent challenge to the more widespread use of shape grammars in architectural research is the creation of rules and rule sets for application in design contexts, while leaving space for design creativity despite the limitations of a rule-based system. A hybrid of associative and rule-based approaches may alleviate this. We present one such development, a Grasshopper shape grammar plug-in that embeds a rule-based approach within a parametric modelling environment. It supports shape emergence, visual enumeration of rule application results, and the parametric definition of shapes and shape rules even when selecting a non-parametric rule matching mechanism. Grasshopper's ability to handle geometries and text together allows for external descriptions and labels as attributes to points, enabling definition and application of compound, geometric and description rules. Well-known examples from shape grammar literature are implemented using the plug-in, with a focus on rule definition and application in the context of interaction between the parametric modelling environment and the rule-based interpreter, and simultaneous use of geometry, descriptions, and descriptions as attributes in rules.
Content may be subject to copyright.
Combining Geometries and Descriptions
A shape grammar plug-in for Grasshopper
Bianchi Dy1, Rudi Stouffs2
1,2National University of Singapore
1,2{akidribm|stouffs}@nus.edu.sg
A persistent challenge to the more widespread use of shape grammars in
architectural research is the creation of rules and rule sets for application in
design contexts, while leaving space for design creativity despite the limitations
of a rule-based system. A hybrid of associative and rule-based approaches may
alleviate this. We present one such development, a Grasshopper shape grammar
plug-in that embeds a rule-based approach within a parametric modelling
environment. It supports shape emergence, visual enumeration of rule
application results, and the parametric definition of shapes and shape rules even
when selecting a non-parametric rule matching mechanism. Grasshopper's
ability to handle geometries and text together allows for external descriptions
and labels as attributes to points, enabling definition and application of
compound, geometric and description rules. Well-known examples from shape
grammar literature are implemented using the plug-in, with a focus on rule
definition and application in the context of interaction between the parametric
modelling environment and the rule-based interpreter, and simultaneous use of
geometry, descriptions, and descriptions as attributes in rules.
Keywords: shape grammar, shape grammar interpreter, parametric modelling,
Grasshopper, rule-based, descriptions
INTRODUCTION
Research into parametric or associative modelling
goes back at least as far as Sutherland’s Sketchpad
(Sutherland, 1963). Research into shape grammars is
only slightly younger (Stiny and Gips, 1971) but does
not yet enjoy the same success, with one possible
reason being the persistent challenge of structurally
creating rules and rule sets for application in design
contexts. The hybrid of associative and rule-based
approaches may alleviate this challenge.
We present one such development, a Grasshop-
per shape grammar plug-in that embeds a rule-based
approach within a parametric modelling environ-
ment. I t supports shape emergence, visual enumera-
tion of rule application results, and allows shapes and
shape rules to be defined parametrically, even when
adopting a non-parametric rule matching mecha-
nism. Additionally, the plug-in supports paramet-
ric rule matching and the specification of descrip-
tions, enabling definition and application of descrip-
SHAPE, FORM & GEOMETRY | Concepts - Volume 2 - eCAADe 36 |499
tion rules in tandem with (parametric) shape rules.
This paper focuses on rule application in the context
of interaction between the parametric modelling en-
vironment and the rule-based interpreter, and the si-
multaneous use of geometry and descriptions, both
external and as attributes to geometry, in rules using
the plug-in. Relevant examples are presented.
SORTAL GRAMMARS
Shape grammars come in a variety of forms, with la-
beled shapes (Stiny, 1980), i.e. line segments with
labeled points, as the most basic formalism. “Sor-
tal grammars” integrate a wide variety of forms and
act as a class of formalisms for shape grammars,
using “sortal structures” as representational build-
ing blocks (Stouffs and Krishnamurti, 2001; Stouffs,
2012). These structures are defined as formal com-
positions of other primitive, sortal structures (also
termed “sorts”). Component sorts specify a par tial or-
der relationship on their individuals and forms, thus
defining both matching and arithmetic operations
for rule applications. Shapes may be either objects
or attributes in object-attribute relationships, or both
(or neither, but this case would not count as a shape
grammar).
The organizing structure of sortal grammars en-
ables the implementation of different kinds of shape
grammars, not limited to specific formalisms, design
languages or contexts. As such, using sortal struc-
tures enables a modular implementation of a gen-
eralized, flexible shape grammar interpreter for dif-
ferent grammar forms. This sortal shape grammar
interpreter (“SortalGI”) has been developed as a li-
brary and an API in the Python programming lan-
guage, with graph-based representation for para-
metric shapes, and combinatorial enumeration of po-
tential matches. It supports both parametric and
non-parametric shape grammars, including line seg-
ments, plane segments, points, circular arcs, Bezier
curves, labels, weights, colors, enumerative values,
and (parametric) descriptions, in 2D and 3D.
The shape grammar interpreter is accessible in a
Python development environment; within the Rhino
3D modeling environment [1] through an API; and
as a Rhino/Grasshopper plug-in [2], requiring no pro-
gramming or scripting. Though the entire library
is available within the Rhino 3D modeling environ-
ment, the current API does impose a few restrictions.
The Grasshopper plug-in is currently limited to para-
metric and non-parametric points, line segments,
plane segments, circles, ellipses, Bezier curves, la-
beled (description) points, non-parametric circular
arcs, and descriptions.
THE SORTALGI GRASSHOPPER PLUG-IN
The SortalGI Grasshopper plug-in makes part of
the SortalGI library and interpreter available within
Grasshopper. As such, shape rules may be defined
parametrically even if the selected rule matching
mechanism is non-parametric, as illustrated in the
discussion. Text descriptions may also be defined as
part of rules or shapes alongside geometry, with ded-
icated components for single or multiple rule appli-
cation generations and support for visually enumer-
ating them. All plug-in components are discussed in
this section.
Shapes
The plug-in defines both a rule object and a shape
object. Grasshopper geometries (and text descrip-
tions) are stored in shape objects as sortal data struc-
tures, as Grasshopper geometries do not maintain
text objects very well.
The basic Shape component only accepts
points, line segments, surfaces, polylines and
labeled points. The resulting shape object
and its corresponding geometry are returned.
A dShape variant also accepts standalone text
descriptions (collected through a Panel com-
ponent). Text descriptions are distinguished
by description type; these types are prede-
fined as part of the set-up component (see
section Setup). Descriptions are embedded in
the shape object; these are not visualized in
Rhino or as geometry but are separately ac-
cessible as a list of text.
500 |eCAADe 36 - SHAPE, FORM & GEOMETRY | Concepts - Volume 2
Both prior components accept an optional
reference point, which moves the shape from
the reference point to the origin and is use-
ful for drawing the left-hand-side and right-
hand-side of a rule beside one another rather
than overlapping.
Text Point creates a Rhino text object from a
point and a single-line text. This serves as a la-
beled point (when the text is enclosed within
double quotes) or a description point input to
Shape.
S2G visualizes shape objects as their corre-
sponding geometry. Any descriptions em-
bedded in the shape object that are not part
of labeled points are separately returned as a
list and can be read using the Panel compo-
nent.
Geometric operations such as Move and Rotate are
redefined as Grasshopper components acting upon
shape objects. Each component accepts a shape ob-
ject and any additional data required to inform and
apply the transformation, such as a vector to move a
shape along, and a base plane and angle to rotate a
shape. There are also components to find the union
(Sum), intersection (Product) or complement (Differ-
ence) of two shapes.
Rules
A rule object may constitute either a shape rule, para-
metric or non-parametric, or a compound rule com-
bining a shape rule with one or more description
rules (Stiny, 1981; Stouffs, 2018).
The Rule component constructs a non-
parametric rule object from a rule name and
brief explanation of the rule, a left-hand-side
shape object and a right-hand-side shape ob-
ject. Any mismatch in description types, i.e.
if present in one rule side and absent from
the other rule side, is automatically resolved
by adding an empty description of that type
to the relevant side’s shape object within the
rule. While the right-hand-side of a rule may
be left empty, the left-hand-side must have
a minimum set of geometry and/or descrip-
tions present.
The pRule takes the same inputs as the Rule
component but returns a parametric rule ob-
ject. Parametric rules have different minimum
requirements for the left-hand-side geometry
from non-parametric rules.
Both Rule and pRule outputs are accepted as
‘rule’ inputs and can be deconstructed by the
Rule Info component, which returns a rule’s
left-hand-side and right-hand-side shape ob-
jects, and a multi-line text consisting of the
rule’s GUID component, rule name and rule
description.
Rules can be applied onto shapes by connecting the
relevant rule component corresponding to a rule ob-
ject to the Apply,Apply All, or Derive components (see
section Rule Applications). Alternatively, the Get Rule
component accepts a rule name or names (text sep-
arated by line breaks, through the Panel component)
and returns the corresponding rule object(s). This
output may serve as rule input for all rule application
components.
Rule Applications
The general process for applying a rule starts with
detection and matching of the rule’s left-hand-side
onto the target shape. Should a match or multi-
ple matches be found, rule application involves sub-
tracting the part corresponding to the match from
the target shape, after which the right-hand-side is
added under the same transformation as the left-
hand-side is matched. This transformation is a simi-
larity transformation (translation, rotation, reflection
and/or uniform scaling) for a non-parametric rule. In
the case of a parametric rule, matching relies on a
combinatorial enumeration of potential matches on
the basis of distinguishable elements, that is, the in-
finite carriers of line segments and their intersection
points and the ordering of intersection points (and
endpoints) along the infinite carrier. As such, there is
no explicit transformation, and sufficient correspon-
SHAPE, FORM & GEOMETRY | Concepts - Volume 2 - eCAADe 36 |501
dence must exist between the rule’s left-hand-side
and right-hand-side in order to allow rule application
to succeed.
There are three plug-in components to apply a
rule onto a shape:
The Apply component returns a single rule ap-
plication that can be chosen from all possible
rule applications by inputting an optional rule
application index (the application is randomly
selected, if unspecified).
The Apply All component yields the output
from all possible rule applications in a list.
The Derive component accepts a list of one or
more rule objects, possibly retrieved through
the Get Rule component. The rules are applied
in sequence, each on the result of the pre-
ceding rule application. The desired rule ap-
plication for each step may be chosen by in-
putting an optional list of rule application in-
dices. If unspecified, the applications are ran-
domly selected. The component returns the
list of shape objects resulting from each step
of the derivation.
Next to a rule object and a shape object, all applica-
tion components accept an optional sub-shape ob-
ject to limit potential matches, with rule application
always performed on the entire shape. For Derive,
specifically, a list of sub-shapes may be accepted.
All application components also return a transla-
tion vector or list thereof for visualizing the resulting
shape(s) aside from the original shape. The original
shape object is returned in failure cases, such that any
subsequent rule application may still apply.
Setup
The plug-in includes a Setup component that ini-
tializes the sortal grammar interpreter and controls
some global settings for Grasshopper geometry such
as the text size of labeled points in the Rhino work
space, and the X and Y displacement values used by
the Apply and Apply All components to create trans-
lation vector(s), such that using a Move component,
the resulting shape can be visualized aside from the
original shape at the given distance along the X or Y
axis. The displacement values are optional; default X
and Y values for the translation vector(s) are defined
from the bounding box of the original shape.
Figure 1
Specifying inputs to
the Setup
component.
Figure 2
Specifying inputs to
a Shape (top) and
dShape (bottom)
component.
More importantly, the Setup component takes a list
of description names through the Panel component
(separated by line breaks) to predefine the active de-
scription types that will be used in rules and shapes.
If any description type not present in this list is speci-
fied in a rule or shape definition, the respective com-
ponent raises a warning.
THE PLUG-IN IN ACTION
To get started using the plug-in, first install the sor-
tal library and plug-in. Afterwards, place Setup as the
first component in the Grasshopper file to initialize
502 |eCAADe 36 - SHAPE, FORM & GEOMETRY | Concepts - Volume 2
Figure 3
Defining two
non-parametric
rules (after Knight,
2003, p. 128).
the shape grammar interpreter. Ensure that it runs
first before all other SortalGI components by pressing
CTRL+B while selecting the component.
If any descriptions will be used in the grammar,
these description types must be declared by their
type name as string input to Setup; each description
type is separated with a line break (Fig. 1). This can
also be done later, when description types need to
be added as more rules are developed. Other op-
tional values such as displacementX, displacementY
and textSize can be set to fixed values or sliders at any
time. Changing their inputs will trigger recalculation
of all plug-in components.
Shape Definition
To create a shape, connect one or more components
that represent or collect geometry to the G input of
the Shape or dShape component. The relevant geo-
metric elements will be converted to their sortal rep-
resentation and outputted as shape object S.
For dShape, collect any external descriptions in a
Panel and connect this to the D input. String values
may also be directly stored in D, but they must be sur-
rounded by double quotation marks (“‘”’) to be read
as static strings. Description individuals are declared
by stating the description type first, followed by a
colon (‘:’) and then the description’s value (Stouffs,
2018). Multiple shape descriptions of the same type
can be written in one line by separating them with a
vertical bar (‘|’) per description individual (Fig. 2).
The output G of both shape components con-
tains the pruned geometry present in the output
shape object S, with D containing the external de-
scriptions. Any output geometry from a plug-in com-
ponent (except for Text Point) may be used as geom-
etry input to any Grasshopper component, allowing
interaction between the plug-in and Grasshopper’s
other components.
Rule Definition
The optional reference point input may be used to
reposition the shapes defining the rule sides. In Fig.
SHAPE, FORM & GEOMETRY | Concepts - Volume 2 - eCAADe 36 |503
3, the reference points are indicated by the cross
marks. Specifying a reference point moves the geom-
etry from the reference point to the origin. Moving
both the left-hand-side and right-hand-side shapes
may relate them in space (through overlapping); their
location after movement due to the reference point
is what is stored in the output shape object S.
Both parametric and non-parametric rules are
created using string inputs for the rule name and rule
description, and with rule sides defined by either the
Shape or dShape component, or from any S output of
another plug-in component.
Rule names should not be repeated within the
same Grasshopper file. Both Rule and pRule compo-
nents will raise an error or warning message if the ge-
ometry of the left-hand-side is insufficient or if the
rule name has been repeated.
Rule Application
To apply a rule onto a shape, connect the rule ob-
ject as output by a Rule or pRule component and
any shape object output to any of the rule applica-
tion components described in the section Rule Ap-
plications. Preview geometry of the result(s) is gen-
erated in place; however, translation vectors are gen-
erated based on the given displacement values or the
bounding box of the input shape. The optional sub-
shape input may be used to limit the discovery of rule
applications to a specific region of the initial shape.
A variety of approaches can be taken for rule ap-
plication. Apply or Derive can generate step by step
results; Apply All generates all potential rule applica-
tions for a given rule and initial shape combination.
A short derivation using the two rules from Fig. 3 is
shown in Fig. 4, using the Derive component. The
same derivation can be achieved using a series of
Apply components to generate results step by step.
Conversely, Fig. 5 illustrates the ability of the plug-
in to generate and visualize all possible rule applica-
tions with Apply All. For viewing clarity, the multi-
ple results of a single component are drawn separate
from one another by connecting the relevant rule ap-
plication component to the Move component.
Figure 5
A step by step
derivation (after
Knight, 2003, p.
128) using a single
Derive component.
APPLICATIONS AND DISCUSSION
The value of this shape grammar plug-in stems from
its ability to support shape computations, rule ap-
plications and derivations, and their visual enumer-
ation, within an interaction between parametric or
associative modelling and rule-based generation.
Moreover, it supports the definition and application
of shape and description rules in tandem. In princi-
ple, the plug-in only supports 3D shapes, but 2D is
naturally included as a degenerate 3D case. Next, we
demonstrate a 3D example, using surfaces to repre-
sent 3D blocks.
This example is taken after Stiny (1981) and ex-
Figure 4
The Apply All
component allows
to enumerate all
possible rule
applications (after
Knight, 2003, p.
128).
504 |eCAADe 36 - SHAPE, FORM & GEOMETRY | Concepts - Volume 2
Figure 6
Nine rules to create
designs made up of
blocks from
Froebel’s building
gift 6 (after Stiny,
1981, pp. 260-264).
plores the use of label attributes and external de-
scriptions in tandem with geometry to constrain
matching and to record textual information about
the design. Specifically, the grammar creates designs
made up of blocks from Froebel’s building gift 6 (af-
ter Stiny, 1981, pp. 260-264). The grammar is com-
posed of nine rules; all of them except rules 8 and
9 include description rules. Fig. 6 shows the shape
rules 1 through 8, Fig. 7 shows the description rules
corresponding to shape rules 1, 2, 4 and 7. Note that
Stiny’s grammar consisted of 17 rules as he distin-
guished rules operating in different directions. In-
stead, the rules presented here automatically capture
directional information. Specifically, the description
rules contain references to the corresponding shape
rules that allow these to extract information from the
shape rule application. However, rules 8 and 9 are ad-
ditional and are due to extra labels. Note also that
while Stiny combines various description entities in a
single description rule, separating the entities using
the hash sign (‘#’), for the sake of clarity, these enti-
ties are considered here as separate descriptions and
description types.
Figure 7
Panel texts showing
definitions of
description rules
corresponding to
geometric rules 1, 2,
4 and 7 in Fig. 6
(after Stiny, 1981,
pp. 260-264).
Fig. 8a shows the initial shape, upon which rule
1 is applied iteratively to obtain Fig. 8b. Due to rota-
tional symmetry, there will be four possible applica-
tions for rule 1 at each step. The directionality and
location of rule applications for rule 1 is limited by
SHAPE, FORM & GEOMETRY | Concepts - Volume 2 - eCAADe 36 |505
Figure 8
Labeled shapes and
descriptions
resulting from a
derivation of the
grammar illustrated
in Fig. 6 and Fig. 7
(after Stiny, 1981,
pp. 260-264).
the presence of the labeled points “a” and “b. The
inclusion of a description of type “column_locations”
(Fig. 7) in the initial shape is also necessary to ensure
matching, as rule 1 must first recognize the presence
of this description type in the shape to match suc-
cessfully.
Aside from constraining the geometric side of
the rules, the labeled points “a”, “b”, and c” serve
as links between the geometry and the descrip-
tions. Rule 1 (Fig. 7 and Fig. 8b) records the se-
quence of coordinate locations visited by the rule us-
ing these labeled points and, hence, the complete,
step-by-step history of a labeled shape as it is gen-
erated by the grammar. This information is subse-
quently used in rule 2 to collect certain properties
of the shape or design, such as the number of pil-
lars, the number of walls and the location of the
rooms. In particular, the contents of “column_lo-
cations” help generate the contents of column_-
count” (the number of unique coordinate tuples in
“column_locations”), “wall_count” (the number of
unique segments that can be gathered from col-
umn_locations”), and “room locations” (the loops of
coordinates tuples in column_locations”) (Fig. 8c).
Rules 4 through 6 similarly track the locations of the
‘stiles’, doors’ and ‘windows’ by storing the locations
of two points in a tuple (Fig. 7). Rule 7 draws from
multiple descriptions to determine adjacency infor-
mation, i.e., combining “room_locations”, “door_lo-
cations” and “stile_locations” to obtain adjacency_-
matrix” (the connections between the rooms and the
outside through stiles and doors) (Fig. 8d). Thus, a
block-by-block description of the design can be de-
rived based on these descriptions.
Obtaining this information from the descriptions
is only possible through additional functions such
as length, distance, segments, etc. To this end,
“room_locations”, “wall_count” and column_count”
rely on description functions like “loops”, “segments”,
and “unique” to compute their right-hand-side val-
ues based on the coordinates previously recorded in
“columns_locations. Rule 7 (Fig. 7) illustrates how
the adjacency matrix can be obtained in Fig. 8d with
the “adjacencies” function. The SortalGI library and
plug-in support a number of additional descriptions
functions.
Defining the shapes and shape rules in this ex-
ample parametrically, especially their ratios and di-
506 |eCAADe 36 - SHAPE, FORM & GEOMETRY | Concepts - Volume 2
mensions, e.g., using sliders, allows the same gram-
mar to apply to varying block dimensions. In general,
altering the dimensions of the defining rule shapes
may change the number of rule applications or re-
move the match between the initial shape and a rule.
Fig. 9 and Fig. 10 demonstrate the application of
parametric rules in a short derivation based on the
ice ray lattice grammar by Stiny (1977). There are
five (parametric) rules in this example (Fig. 9). The
first rule identifies the initial shape (a quadrilateral)
and labels its vertices. The succeeding four rules all
behave similarly in that they split the left-hand-side
polygon, be it a quadrilateral, triangle or pentagon,
into two smaller polygons contained by the original
shape.
Figure 9
A SortalGI
adaptation of the
ice ray lattice
grammar by Stiny
(1977) illustrating
the specification of
parametric rules.
As the input polygons to the rules are parametrically
defined in Grasshopper, altering their shape may af-
fect the result by triggering a recalculation of the rule
applications and, thereby, return completely differ-
ent results from prior computations or potentially in-
crease or decrease the number of matches, thus al-
tering the derivation completely. Changing the loca-
tions of the start and end points of the right-hand-
side line segments (“ice rays”) will also trigger a recal-
culation. Specifically, computing new ice rays uses a
point-on-line feature of the sortal library to generate
new line segments. A new point is randomly gener-
ated within a certain range of the line segment and its
precise location cannot be predicted ahead of time.
This feature allows for creativity in that the deriva-
tion is no longer deterministic, but exploratory. How-
ever, one drawback is that prior results are lost, as the
new applications do not retain any history of previ-
ous runs.
The role of labels and descriptions in the exam-
ples is mainly to limit rule application, or to con-
tain information not readily expressed by the geom-
etry. Previous iterations of shape grammar interfaces
have generally had limited capabilities in combining
geometries and descriptions into shapes. The abil-
ity of Grasshopper to handle text and geometry to-
gether allows for combining shapes and descriptions
in shape or rule objects, and as attributes of points
(label descriptions attached to points as created by
the Text Point component). Furthermore, the two de-
scription types may be related, e.g. the label value of
a labeled point may be used in the left-hand-side of
a description rule, thus enhancing the expressiveness
of rule application. This ability is used to great effect
in the description type “index” in Fig. 9, which gen-
erates the integer label for new polygon vertices, to
prevent the polygons from merging and the ice rays
from intersecting one another. It is increased with
every successful application to create distinguishing
polygon attributes; the labeled points at polygon
vertices indicate which polygon(s) the vertices are
part of (see Fig. 9). The letter value of the label varies
based on the polygon type, with “A for quadrilater-
als, “B” for triangles and “C” for pentagons. Labeled
points lying on vertices shared by two or more poly-
gons will have multiple labels, separated from each
other by a vertical bar (‘|’).
CONCLUSION
We have presented a shape grammar plug-in for
Grasshopper that supports both 2D and 3D geome-
tries as well as non-parametric and parametric be-
haviors. Shapes and rules may be defined paramet-
SHAPE, FORM & GEOMETRY | Concepts - Volume 2 - eCAADe 36 |507
rically even in cases where the rule matching mech-
anism is non-parametric. The plug-in also allows
for compound, geometric and description rules to
be defined and applied in tandem on shapes. De-
spite or thanks to its rule-based system, the plug-
in provides room for exploration and unexpected
outcomes, especially when using parametric rules.
There is certainly more opportunity to investigate ad-
ditional components that can further support explo-
ration and may facilitate generation and synthesis on
a larger scale, e.g., an urban scale.
Figure 10
Rule application of
the rules from Fig.
9., demonstrating
both the potential
rule applications
from the same rule,
and generative
variations from the
same derivation.
ACKNOWLEDGMENTS
This work received funding support from Singapore
MOE’s AcRF start-up grant, WBS R-295-000- 129-133.
The authors would like to thank Bui Do Phuong Tung
for his development work on the SortalGI library.
REFERENCES
Knight, T.W. 2003, ’Computing with emergence’, Environ-
ment and Planning B: Planning and Design, 30(1), pp.
125-155
Stiny, G. 1977, ’Ice-ray: a note on the generation of Chi-
nese lattice designs’, Environment and Planning B:
Planning and Design, 4(1), pp. 89-98
Stiny, G. 1980, ’Introduction to shape and shape gram-
mars’, Environment and Planning B: Planning and De-
sign, 7, pp. 343-351
Stiny, G. 1981, A note on the description of designs’, En-
vironment and Planning B: Planning and Design, 8(3),
pp. 257-267
Stiny, G. and Gips, J. 1972 ’Shape grammas and the gen-
erative specification of painting and sculpture’, Pro-
ceedings of IFIP Congress 71, Ljubljana, Yugoslavia,
pp. 1460-1465
Stouffs, R. 2012 ’On shape grammars, color grammars
and sortal grammars’, Proceedings of eCAADe 2012,
Prague, pp. 479-487
Stouffs, R. 2017 A practical shape grammar for Chinese
ice-ray lattice designs’, 2nd International Workshop
on Cultural DNA, Daejoen, South Korea
Stouffs, R. 2018, ’Description grammars: A general nota-
tion’, Environment and Planning B: Planning and De-
sign, 45(1), pp. 106-123
Stouffs, R. and Krishnamurti, R. 2001 ’Sortal grammars
as a framework for exploring grammar formalisms’,
Mathematics and Design 2001, Geelong, Australia,
pp. 261-269
Sutherland, I. 1963, Sketchpad: A man-machine graphical
communication system, Ph.D. Thesis, MIT
[1] https://www.rhino3d.com/
[2] http://www.grasshopper3d.com/
508 |eCAADe 36 - SHAPE, FORM & GEOMETRY | Concepts - Volume 2

Supplementary resource (1)

... On the one hand, the introduction of an additional layer of abstraction, i.e., a user interface, could help humans to more intuitively express their intentions of a rule. Such an abstraction layer may be either graphical or textual (Dy and Stouffs, 2018), as further discussed in Section 5.1. Another remedy is to move from a geometrical to a more object-oriented view of design artifacts. ...
... Equally, the interfaces of spatial grammar interpreters incrementally require less technical knowledge to define geometrically and semantically complex grammars. Hoisl and Shea (2011), Dy and Stouffs (2018) and Grasl (2021) developed largely graphical interfaces to their spatial grammar interpreters, requiring little knowledge of the underlying computational processes. These interfaces can be advantageous when learning a specific implementation of a rewriting formalism or for the rapid prototyping of design grammars departing from their geometrical frontend. ...
Article
Full-text available
Capturing human knowledge underlying the design and engineering of products has been among the main goals of computational engineering since its very beginning. Over the last decades, various approaches have been proposed to tackle this objective. Among the most promising approaches is the application of graph theory for representing product structures by defining nodes representing entities and edges representing relations among them. The concrete meaning of these structures ranges from geometry representations over hierarchical product breakdowns to functional descriptions and flows of information or resources. On top of these graph structures, graph rewriting techniques provide another powerful layer of technology. By enabling the formal definition of rules for transforming graph structures, they allow on the one hand side to formally capture the engineering development process. On the other hand, the assembly of rewriting rules into graph grammars allows for an exhaustive search of the solution space of the engineering problem at hand. In combination with search strategies, an automated optimization of the design under given constraints and objectives can be realized. The paper provides an overview of the current state-of-the-art in graph rewriting and its applications in engineering design, with a focus on the built environment. It concludes with a discussion of the progress achieved and the missing research gaps.
... Even if multiple formalisms are conceived to be used simultaneously, they are generally used in parallel (Li 2001), and any exchange of information between these parallel representations relies on description rules to include references to other descriptions or shapes. Such exchange is fully supported in SortalGI (Dy and Stouffs 2018;Stouffs 2018a). Duarte (2001) conceives of a discursive grammar that combines two grammars sequentially, a programming grammar generating design briefs based on user and site data and a designing grammar using the design brief(s) to generate designs in a particular style. ...
... Beyond its use within the Rhino modeling environment, as presented in this paper, the SortalGI library can be accessed and employed in (at least) two more ways: firstly, within a Python development environment; secondly, as a Rhino/Grasshopper plugin (Dy and Stouffs 2018), requiring no programming or scripting. These offer access to additional functionality and attempt to address some of the restrictions of the visual front end presented in this paper. ...
Chapter
We present a general shape grammar implementation that supports subshape detection and handles lines and labeled points in three-dimensional space. Its front and back ends are both set in the CAD application Rhinoceros3D. Informal observations of designers using the implementation suggest that they are more interested in producing designs to work with than in using the more specialized features of shape grammars. This in turn suggests that researchers who create such implementations have more to learn about how designers use them or would like to do so.
... Boolean operations have been used in computational design to generate building massing through recursion (Coates and Derix, 2014), shape grammars (Dy and Stouffs, 2018;Müller et al., 2006), and parametric approaches (Chen et al., 2018;Huang et al., 2015;Luca et al., 2021) to generate building massing forms. Nonetheless, previous applications are often loosely-constrained or overconstrained in terms of geometrical flexibility, leading to designs that lack either architectural feasibility (e.g., fractal geometries) or typological variability (e.g., buildings only with one subtractive void in a fixed position). ...
... All implementations of shape grammar interpreters approach shape embedding in three ways: a) the database query of the maximal elements that the shapes are made of, see for example, Shape3D ( [50]); GRAM-MATICA ( [7]); GRAPE [19,20]; b) the derivation of the transformation matrix that embeds one shape into another, see for example, SGI [25,26]; SGS [5]; GRAIL [27]; GEdit [46]; and c) a combination of both approaches in some mixed model to enable queries in parametric shape embedding, see for example, SortAl [9,42,44]. The implementation of shape embedding through database query, despite its success in wellstructured cases and design workflows, fails to provide a general solution to the subshape problem because the boundaries of the maximal elements can only be used in combinatorial searches of subshapes using these particular boundaries (endpoints) [33]. ...
Article
The process of shape embedding, that is, the inquiry whether for two shapes u and w there is a transformation f that embeds the shape f(u) in w is the most critical – and elusive – process for all shape grammar interpreters implemented within CAD systems. This paper identifies three major challenges underlying the implementation of shape embedding within a CAD environment and proposes three corresponding solutions. The focus is given here in the calculation of shape embedding for shapes made up of lines in a 2D CAD environment to provide the testbed for the mechanisms proposed. The integration of these three sets of algorithms into one coherent framework produces the blueprint of Shape Machine, a general-purpose shape grammar interpreter implemented in Rhinoceros, a NURBS 2D/3D CAD software. Some preliminary thoughts regarding the impact of the proposed shape-rewrite modeler in CAD industry and more broadly, in design education are given in the end.
... The maximal representation of shapes consisting of lines has been successfully implemented in SGI by implementing line addition operation (Boolean union for lines), and most of the interpreters have been following this method -see for example, SGS [15], GEdit [13], [14], ShaDe [21] and Shape Machine [22]. Some interpreters have adopted a graph representation of maximal lines such as GRAPE [23] and SortAl GI [24] and use hypergraphs [25] to simulate the procedure. And still others, such as Curve-based SGI [26] and QI [16] use algorithms to achieve the maximal representation for Bezier curves and in doing so they solve the problem of maximal representation for lines because straight lines can be viewed as degree one Bezier curves. ...
Chapter
Full-text available
Shape grammar interpreters have been studied for more than forty years addressing several areas of design research including architectural, engineering, and product design. At the core of all these implementations, the operation of embedding—the ability of a shape grammar interpreter to search for subshapes in a geometry model even if they are not explicitly encoded in the database of the system—resists a general solution. Here, a detailed account on various constructions of embedding is provided, including determinate and indeterminate ones, to give a sense of the rising complexity of their implementation in a shape grammar interpreter, and to provide a visual map of the work accomplished in the field so far, and the work ahead too.
... The maximal representation of shapes consisting of lines has been successfully implemented in SGI by implementing line addition operation (Boolean union for lines), and most of the interpreters have been following this method -see for example, SGS [15], GEdit [13], [14], ShaDe [21] and Shape Machine [22]. Some interpreters have adopted a graph representation of maximal lines such as GRAPE [23] and SortAl GI [24] and use hypergraphs [25] to simulate the procedure. And still others, such as Curve-based SGI [26] and QI [16] use algorithms to achieve the maximal representation for Bezier curves and in doing so they solve the problem of maximal representation for lines because straight lines can be viewed as degree one Bezier curves. ...
Conference Paper
Full-text available
Shape grammar interpreters have been studied for more than forty years addressing several areas of design research including architectural, engineering, and product design. At the core of all these implementations, the operationof embedding – the ability of a shape grammar interpreter to search for subshapes in a geometry model even if they are not explicitly encoded in the database of the system – resists a general solution. Here, a detailed account on various constructions of embedding is provided, including determinate and indeterminate ones, to give a sense of the rising complexity of their implementation in a shape grammar interpreter, and to provide a visual map of the work accomplished in the field so far, and the work ahead too.
Thesis
Full-text available
The memory labyrinth is a pavilion that explores the unique intersection of architecture, computational design, and Alzheimer’s disease from its very conception. The pavilion serves as a tangible narrator - acting both visually and spatially - to illustrate the progression of Alzheimer’s disease. Its architectural language draws inspiration from the cognitive deterioration caused by Alzheimer’s, translating the gaps and holes in human memory into physical spaces. Alarming on the isolated and depressive experiences often associated with Alzheimer’s, the pavilion emerges as a collaborative space, encouraging collective interaction and memory-making. In this regard, the pavilion’s overall form arises from a computational approach driven by Alzheimer’s patients’ data. Using an algorithmic process a unique perforation is provoked on its originally continuous shell based on a degree of brain deterioration (Atrophy Scaling Factor), thus creating the possibility for interactive areas. These discrete spaces, positioned via a Wave Function Collapse (WFC), offer visitors a memorable experience as the pavilion becomes a legacy of a data-oriented approach in design, that shapes digital data into physical artifacts. Finally, by fostering interaction, the Pavilion of the Memory Labyrinth aims to counteract the societal isolation often experienced by individuals with Alzheimer’s. Through its architectural configuration, the pavilion lastingly communicates the narrative of Alzheimer’s disease to visitors, enabling a deeper understanding of the condition towards not only awareness but also inclusivity and acceptance.
Chapter
The process of architectural design can be complex due to the engagement of problem-solving with design thinking. However, in computer-aided approaches, there is no effective method of retrieving an understanding of the design process. This research aims to demonstrate a newly developed process-oriented workflow for design generation via retrievable design operations. This concept of retrievable design operations emphasizes design thinking as an accumulation of design strategies expressed as small operational steps. The transformation of design thinking can take place between projects and/or design alternatives through a recomposition of these steps. This paper exemplifies the method by using a proposed toolset on the Rhino-Grasshopper platform to achieve the retrievability of design operations. Intermediate results of this study are presented. Firstly, 3 categories of components in Grasshopper are presented that allow to define an operation-retrievable architectural massing. Secondly, the potential to amplify retrievable design operations into feasible design derivations is demonstrated via 1) transforming design models across different site conditions by retrieving the entire design operations, 2) and switching the individual typology by retrieving corresponding partial design operations.KeywordsTopological OperationsRetrievable Design OperationsComputer-aided Architectural DesignProcess-oriented RepresentationGraph Representation
Article
Full-text available
Bu çalışma, parametrik biçim grameri kullanarak tiyatro-parter düzeni oluşturulmasını, izleyici ve sanatçı arasındaki ilişkiyi yeniden yorumlayarak tasarım aşamasında çeşitliliği sağlamayı ve performans sırasında oluşturulan oditoryum düzenlerinin hareket akışı ile birlikte seyirciye her defasında yeniden yorumlayacağı bir deneyim oluşturmasını planlamaktadır. Parametrik biçim grameri sayesinde kural tabanlı bir tasarım modeli geliştirilerek analog ile dijital arasındaki çizgide konumlanıp, sahne tasarımlarında çeşitliliğin arttırılmasını, seyir deneyimi ile sahne tasarımı arasındaki biçimsel ilişkilerin ve deneyim çeşitliliğinin analiz edilmesini, üretilen alternatif düzenlerin, tek bir salonun çok çeşitli kullanılmasını sağlayarak, performansın sabit düzen ve alternatif düzendeki seyrinin deneyimsel karşılaştırılması hedeflenmektedir. Beden ve mekân ilişkisinin her düzende yeniden oluşturulduğu, farklı senaryolarla verinin parter platformlarının hareketinde karşılık bulacağı bir tasarım aracı önerilmektedir. Türkiye’de bu özellikleri sağlayacak kadar teknik donanıma sahip esnek ve deneysel sahneler bulunmasa da son yıllarda artan ilgiyle birlikte yeni bir tiyatro sahnesi tasarımı için önerilebilecek bir tasarım aracı olarak da değerlendirilebilir.
Conference Paper
Full-text available
Grammar formalisms for design come in a large variety, requiring different representations of the entities being generated, and different interpretative mechanisms for this generation. Most examples of shape grammars rely on labeled shapes, a combination of line segments and labeled points. Color grammars extend the shape grammar formalism to allow for a variety of qualitative aspects of design, such as color, to be integrated in the rules of a shape grammar. Sortal grammars consider a compositional approach to the representational structures underlying (augmented) shape grammars, allowing for a variety of grammar formalism to be defined and explored. In this paper, we revisit and explore an exemplar shape grammar from literature to illustrate the use of different grammar formalisms and consider the implementation of rule application within a sortal grammar interpreter
Article
Shape grammars elucidate the composition of designs and at the same time provide the basis for the description of these designs in other terms.
Article
The definitions pertaining to the shape grammar formalism are developed in detail.
Article
The conventions used to construct traditional Chinese ice-ray lattice designs are investigated. Parametric shape grammars are defined for the recursive generation of these patterns.
Computing with emergence' , Environment and Planning B: Planning and Design
  • T W Knight
Knight, T.W. 2003, 'Computing with emergence', Environment and Planning B: Planning and Design, 30(1), pp. 125-155
Sortal grammars as a framework for exploring grammar formalisms
  • R Stouffs
  • R Krishnamurti
Stouffs, R. and Krishnamurti, R. 2001 'Sortal grammars as a framework for exploring grammar formalisms', Mathematics and Design 2001, Geelong, Australia, pp. 261-269
Description grammars: A general notation' , Environment and Planning B: Planning and Design
  • R Stouffs
Stouffs, R. 2017 'A practical shape grammar for Chinese ice-ray lattice designs', 2nd International Workshop on Cultural DNA, Daejoen, South Korea Stouffs, R. 2018, 'Description grammars: A general notation', Environment and Planning B: Planning and Design, 45(1), pp. 106-123