Hostname: page-component-745bb68f8f-cphqk Total loading time: 0 Render date: 2025-02-11T01:25:55.199Z Has data issue: false hasContentIssue false

Unveiling the structure of the Marrakech Medina: A shape grammar and an interpreter for generating urban form

Published online by Cambridge University Press:  19 September 2007

José P. Duarte
Affiliation:
ICIST, Instituto Superior Técnico, Technical University of Lisbon, Lisbon, Portugal
João M. Rocha
Affiliation:
CHAIA, Universidade de Évora, Évora, Portugal
Gonçalo Ducla Soares
Affiliation:
ICIST, Instituto Superior Técnico, Technical University of Lisbon, Lisbon, Portugal
Rights & Permissions [Opens in a new window]

Abstract

This paper describes research carried out to develop a parametric urban shape grammar for the Zaouiat Lakhdar quarter of the Medina of Marrakech in Morocco. The goal is to create the basis for a system that could capture some features of the existing urban fabric and apply them in contemporary urban planning and architectural design. The methodology used is described, from the initial historical analysis and fieldwork to the identification of three subgrammars necessary to encode the complexity of the urban preexistences: the urban grammar, the negotiation grammar, and the housing grammar. Top-down and bottom-up approaches to grammar design are analyzed and compared. The bottom-up urban grammar developed is then described, and a hand derivation of the existing urban fabric is proposed. Visual, symbolic, and tagged computer implementations of shape grammars are briefly discussed and a novel design generated by the tagged interpreter is presented.

Type
Research Article
Copyright
Copyright © Cambridge University Press 2007

1. INTRODUCTION

This paper describes research carried out to develop a parametric shape grammar able to capture, and replicate in other contexts, some of the urban, architectural, and morphological characteristics of the ancient fabric of the Marrakech Medina, namely its Zaouiat Lakhdar quarter. This research is part of a larger project that aims at incorporating shape grammars (Stiny, Reference Stiny1980) with an existing generative design system based on genetic algorithms (GAs). The project's final goal is to develop a computational system able to generate novel urban and housing configurations that are more environmentally sustainable and energy efficient, while respecting certain cultural and spatial qualities as captured by the shape grammar. The final computational model should act at two different scales: the urban scale, where the layout of a neighborhood is outlined; and the architectural scale, where the interior typology of individual houses is defined. The development of two other grammars required for describing the whole urban structure—the patio house grammar and the negotiation grammar—will be presented elsewhere. The research described in this paper is focused on the creation of a shape grammar to describe the urban features of the specific quarter of the Marrakech Medina referred to above.

There were three reasons for choosing the Marrakech Medina as the case study for this experiment. First, this particular urban fabric was attractive because of the intricate connections between the urban configurations and the patio houses (Figs. 13). Second, previous work (Rocha, Reference Rocha1995) on the Zaouiat Lakhdar quarter, aimed at characterizing morphologically and architecturally the urban and architectural patterns of this area, suggested that a stylistically coherent corpus of designs existed, and that it had enough variety and richness to fit the research objectives. Third, the population increase that occurred in Marrakech during the last decades, as in most north African and Middle East cities, has led to an uncontrolled urban growth that produced urban environments lacking the spatial richness found in historical vernacular areas. Thus, this research intends to provide a computational framework that can assist designers in the design of urban environments that maintain traditional spatial and compositional principles while satisfying the requirements of contemporary life.

Fig. 1. A partial map of the Marrakech Medina. The shaded area delineates the Zaouiat Lakhdar, the quarter selected as a case study. Its boundaries are well defined by four major commercial streets. Below is the Mosque Ben Youssef (12th century) and attached to the right, belonging to the same complex, is the Medersa Ben Yussef.

This research draws on previous implementation of a generative system using GAs (Caldas, Reference Caldas2001, Reference Caldas2005) and on the application of shape grammars to customized mass housing (Duarte, Reference Duarte2001, Reference Duarte2005), but the work presented here takes the Marrakech Medina as its architectural precedent.

Fig. 2. The plan of Zaouiat Lahdar. (1) The lots bordering the outer streets are mainly used for shops and public facilities. (2) The inner lots are accessed by (3) narrow, zigzagged, dead-end streets, called derbs, which are occupied by patio houses. The derbs are partially covered by (4) sabbats.

2. HISTORIC AND CULTURAL CONTEXT

In Islam, Muslims pray toward the K ba in Mecca, the sacred direction or qibla. The correlation between the qibla and the street pattern is important to understand the relationships among the religious buildings and the surrounding fabric. If the Mosque was built first, as it often is the case in many Islamic cities, then the street pattern would evolve around and from the Mosque. The foundation of Marrakech is related to an important sub-Saharan caravan route, and when it became the capital of the Almoravids in 1107 it already had 100,000 inhabitants (Bonine, Reference Bonine1990; Mortada, Reference Mortada2003). The origin of the Zaouiat Lakhdar quarter, one of the oldest in the Medina, is related with the construction of the Ben Youssouf Mosque in the 12th century. Cities of Muslim origin share specific culture and social values which are embedded in their everyday system of social organization, and, therefore, in architecture as well. In this section, we identify and put forward a succinct contextualization of these cultural and religious values that have to be taken in consideration in any interpretation of Islamic architecture. Social and cultural characteristics of urban planning and architecture as well as many aspects of Islamic social behavior are related to the Islamic law (shar ah), and certain principles found in urban environments of Islamic cities are a tribute to shar ah. They are clearly founded in the basic source of the shar ah, the Qu an and the sunnah (life of the Prophet), whereas others stem from traditional building codes related to, inheritance and endowment laws. This set of religious and social values and rules determine many of the social patterns of Islamic society and its urban and architectural spatial configurations. An utmost Islamic condition is that a strong social relationship is underlined by the concept of brotherhood, which has frequently been mentioned in the Qu an, and that family is the most fundamental element of Muslim society, where strong family ties are expected to last. This partially explains the organization of domestic architectural spaces that are close to each other and contain a multifunctional space surrounding a courtyard. It also partially explains the unsolved familiar tribal problems found in certain areas, which can lead to spatial arrangements such as the closing of a derb, a dead-end street, the change of its direction, the destruction of a house for its division, or decisions about land division among family members and disputes of inheritance goods. Islamic societies have building and urban codes that are organized with criteria that strongly differs from those in the Western world. Islam through its shar ah has provided principles that determine the way of life of Muslim communities and individuals, which in turn, shapes the urban environment. Oleg Grabar says in his study on traditional Muslim urban environment, “It is Islam which gave resilience to the Muslim city and to its bourgeoisie, not because it was necessarily aware of all urban problems but because it had the abstract form in which all of them could be resolved” (Grabar, Reference Grabar and Lewis1976, p. 100). These laws, which are constantly applied in everyday life, form a dynamic set of rules that actuate in a bottom up fashion to shape the urban tissue. This tradition deserves to be preserved, but at the same time, encoded in more contemporary ways of living within the Islamic culture. By this we mean to secure better sanitary conditions, including adequate infrastructures and proper access to daylight and natural ventilation, while maintaining the basic formal structure of the urban fabric and the houses.

Fig. 3. An aerial north–south view of Zaouiat Lahdar, showing the intricate fabric of derbs and patio houses.

3. METHODOLOGY

The methodology used to develop the computer model of the Zaouiat Lakhdar quarter, particularly the urban grammar described in this paper, encompassed the three preliminary steps described below: analysis of previous work carried out to infer basic shape rules, development of an experimental computer program encoding these rules, and fieldwork to collect additional information to complete the rules.

3.1. Previous work

In previous work it was hypothesized that the Marrakech Medina urban tissue, as other Islamic cities, was organized as a progression from public space to progressively more private realms (Fig. 4), until reaching the privacy of the patio house, the predominant urban type in this part of the Medina (Rocha, Reference Rocha1995). The patio is the place where the outdoor activities of the family take place. The patio is also the means to provide daylight and ventilation to the house, contrary to traditional European configurations in which the main external space is the street, and buildings are lit and ventilated primarily through street-facing facades. External housing facades in the Marrakech Medina are mostly closed, with very little openings. Because lighting and ventilation requirements are not significant in the design of street-facing facades, privacy does not become an issue either, and street width can be considerably reduced. The street thus becomes mainly a device for physically accessing the house entrance, causing it to become very narrow and often covered with constructions from the first floor on, called sabbats, thereby generating corridor-like configurations called derbs.

Fig. 4. Views of the of the Zaouiat Lakhdar quarter showing (a) a surrounding street, (b) a derb, (c) a sabbat, and (d) a patio house.

3.2. Experimental program

Following the initial hypothesis mentioned above, several conjectural attempts were carried out to simulate what could have been the urban growth of Marrakech. The idea was not so much to reach a final and conclusive model but to explore the problem and to identify modeling issues. A simple shape grammar composed of ten parametric rules was developed. Then, it was encoded into a computer program implemented in AutoLISP to observe the behavior of the model simulating urban growth, defined by the successive and iterative application of rules. Finally, the program was run with 50, 100, 200, 500, and 1000 iterations (Fig. 5). Four problems could be observed. First, growth became too slow, preventing the polygon representing the neighborhood to be filled in completely. Second, derbs grew in all directions, whereas in Zaouiat Lakhdar they tended to follow predominant directions. Third, the distance between “parallel” derbs was not controlled, causing a considerable variation of the plots' depth. Fourth, the limits of adjacent lots did not abut. Running the program showed that assuring that lots abutted posed a major challenge in the development of the grammar and its implementation. These impacted the subsequent fieldwork, which tried to gather information to solve the second and third problems, and the choice of computer implementation in order to overcome the first and fourth ones.

Fig. 5. The output of an experimental computer program encoding a basic urban grammar for the Marrakech Medina after (a) 100, (b) 200, (c) 500, and (d) 1000 iterations. [A color version of this figure can be viewed online at www.journals.cambridge.org]

3.3. Fieldwork

To collect additional information that permitted completion of the grammar, a field trip to Marrakech took place in early 2005. Four sources of information were explored. The first consisted in surveys of the site based on laser measurements, digital photos, and hand drawings. These surveys permitted acquisition of rigorous information regarding the length and width of the derbs, the height of the sabbats, and the location and size of doors. The second source was documents and drawings obtained at the Agence Urbaine de Marrakech and at the Inspection Général des Monuments, such as an aerial photo of the city taken in 1950 and the plan of the Medina in digital format. The third source was interviews with local experts, which permitted gathering speculative information regarding the genesis of the neighborhood and the reasons for certain spatial configurations. Finally, the fourth source was a satellite photo of Marrakech acquired from QuickBird. The analysis of these sources of information led to the elaboration of a more accurate plan (Fig. 6).

Fig. 6. Plans of Zaouiat Lakhdar based on collected information showing the main directions of the urban fabric and the location of (left) derbs, sabbats, lots, house entrances, and patios and (right) which lots are accessed by which derbs. [A color version of this figure can be viewed online at www.journals.cambridge.org]

4. URBAN GRAMMAR, NEGOTIATION GRAMMAR, AND HOUSE GRAMMAR

The view of the Medina of Marrakech suggested an organic and almost chaotic city growth. However, a close analysis unveiled a well-established order with repeated urban patterns. For example, the way lots are placed on derb corners are similar. Such patterns are not geometrically but topologically similar, meaning that they can differ in the values of parameters like the angles and dimensions of lots and derbs. Consequently, it was possible to capture the variety of patterns into a reduced number of parametric schematas to develop a parametric shape grammar (Knight, Reference Knight1998).

At the outset, it was considered necessary to deal with both the urban scale and the scale of the house. As such, the development of two independent grammars was foreseen: an urban grammar that would account for the layout of the derbs and the definition of lots, and a housing grammar that would account for the functional organization of the houses. As the study evolved, it was realized that these two grammars could not be fully independent. In fact, the functional organization of the houses seemed to be partly responsible for the geometry of their perimeter. Moreover, the perimeter of different floors in the same house did not always match. Therefore, preestablished quadrilateral lots could not account for the generation of existing houses. This consideration of an interaction between the design of the houses and the urban layout and a third grammar was proposed as a result. This grammar, called “negotiation grammar,” mediates between the other two grammars and regulates the permutation of spaces between adjacent lots according to the necessities of their owners. It is not certain that this “negotiation” between neighbors took place as not enough historical evidence was found. However, considering the close families ties that characterize Islamic society, to consider that it did exist seems reasonable. In fact, only a society with this tight-knit social environment could have produced such complex spatial configurations. Figure 7 illustrates the different stages reached by these grammars, and the urban grammar will be described in this paper.

Fig. 7. The three stages reached by the subgrammars: (left) urban grammar, (center) negotiation grammar, and (right) patio house grammar.

5. PREVIOUS URBAN GRAMMARS

Other urban grammars have been developed in the past. Catherine Teeling (Reference Teeling1996) designed a grammar to encode the generation of urban form using a specific section of the docklands in Friedrichshafen, Germany, as a case study. She proposed a top-down approach where the recursive division of quadrilaterals into one or more quadrilaterals described the analyzed urban layout. Subsequent tests showed that the grammar also could account for the generation of other existing sections of the city. Beirão and Duarte (Reference Beirão and Duarte2005) also addressed the topic of urban grammars in a design studio held at Lisbon Technical University School of Architecture. The goal was to use urban grammars as a methodology for flexible urban design. The idea was that urban planning could evolve by first defining a system of rules and then by designing solutions based on such rules in response to particular contexts. The authors' claim was that the recourse to a grammar-based system would guarantee order while maintaining flexibility. Students in the studio approached the problem both in top-down and bottom-up fashions. In top-down approaches, they created rules first to generate large grids and then to progressively divide them into smaller urban units. In bottom-up approaches, they devised rules that first created smaller urban units and then aggregated them to form the urban fabric in a nondeterministic way. In the latter case, the final shape of the plan was not determined at the outset, but depended on the particular size and shape of the urban units inserted during the design process. Because implementation was not a concern, the problems of nondeterminism raised by bottom-up approaches were not addressed; consequently, the grammars developed by the students, however interesting from a designer's viewpoint, were simplified and incomplete. In the next section, we discuss ways of overcoming these problems.

6. INFERRING AND STRUCTURING THE GRAMMAR

Given the scale of the Medina of Marrakech, the development of the grammar raised two problems: one related to the inference process, and the other to the structuring of the grammar.

In previous studies, shape grammars were developed based on a corpus of different designs within a given style. The type and scale of designs ranged from Chinese windows (Stiny, Reference Stiny1977) to Palladian villas (Stiny & Mitchell, Reference Stiny and Mitchell1978). In the current study, the goal was to develop a grammar that generated urban layouts, a design of a considerably larger scale. The Medina is composed of many neighborhoods, and although these might look similar, they are quite varied in terms of morphology, street layout, urban culture, and way of living. Zaouiat Lakhdar, one of the oldest neighborhoods, has a relatively well-preserved urban fabric, and its inhabitants seem to enjoy a healthy balance of safety, community life, and relative economic welfare. It has a derb-based configuration with two dominant orthogonal directions. The unique characteristics of Zaouiat Lakhdar made it the most appealing of all the visited neighborhoods, and so it was selected as the model for the development of the urban grammar. As such, the corpus of existing designs was restricted to a single design. To overcome this limitation, the strategy used to infer the grammar was to divide the neighborhood into sectors by considering that the cluster of lots accessed by a particular derb formed a sector. This permitted the creation of a corpus of several partial designs.

Structuring the grammar required a decision on whether to follow a bottom-up or top-down approach because both seemed possible. The top-down approach provides a centralized form of controlling the design as it progresses from larger to smaller scales. In the specific case discussed here, one can imagine that a first step would be to divide the Zaouiat Lakhdar into sectors with access from the surrounding street or from a derb, as also mentioned above. The advantage of this approach is that the relation between smaller parts is controlled from the beginning of the computation, with the shift to smaller scales only occurring when problems of larger scales are solved. This meant, for instance, that an eventual clash of derbs would be avoided because each had its predefined area of influence, provided that areas were defined by taking into account the legal dimensions of lots.

The bottom-up approach offers a decentralized form of controlling the design, based on the independent behavior of its parts. In this approach, larger scale problems are solved by solving small-scale ones. In the studied case, urban growth would be based on the individual, yet interdependent, growth of derbs coupled with the insertion of lots. Each derb would grow incrementally taking its surroundings into consideration. This approach raises some difficulties, namely, how to solve all larger scale problems, such as the clash of derbs, the alignment of lots, and so forth. The generation of a valid design might require an algorithm with considerable embedded intelligence. Its advantage is that it generates designs in an organic way, which might do better justice to the organic character of the urban fabric.

Not enough historical evidence was found to determine which of these approaches originated the Zaouiat Lakhdar or whether they took place simultaneously, intertwined, or sequentially. According to Wilbaux (2003) the neighborhood's area was first divided into areas belonging to different families, and then each was divided into lots accessed by one derb. This would explain why many derbs are named after families (e.g., derb or derb ). Other historians claim that urban growth was spontaneous and organic; new houses would adapt to the existing situation, and derbs were the empty spaces left over for access purposes. Ideally, the generation process embedded into the grammar should replicate the actual evolution of the urban fabric. Nevertheless, as there was enough historical evidence to support the choice of one approach, the pros and cons of each from the shape grammar viewpoint were considered and then one was selected.

6.1. Top-down approach

The top-down approach requires the decomposition of the neighborhood into smaller areas. This can be accomplished in two stages as diagrammed in Figure 8: first, by recursively dividing the neighborhood into smaller areas until some condition is satisfied (steps 1–13), and second, by rearranging the limits of such areas so that all can be accessed from the exterior (steps 14–20). The problem with this approach is how to divide recursively irregular forms whose division can yield forms that are topologically different from the original ones. This can be overcome by inscribing irregular forms into rectangular frames. Then these frames are divided parametrically into two or four smaller frames using one or two orthogonal lines. Then the original frame is deleted and the dividing lines are trimmed so that they do not extend beyond the limits of the neighborhood and become the limits of smaller areas. The computation proceeds until some condition is satisfied; for example, all the zones have predefined areas and dimensions that guarantee they can be accessed through derbs and divided into “legal” lots. Two types of areas will result from the computation. In peripheral areas, lots are directly accessed from the surrounding streets and host commercial functions. In inner areas, lots are accessed from derbs and are reserved for housing.

Fig. 8. The top-down derivation of the Zaouiat Lakhdar quarter.

6.2. Bottom-up approach

The bottom-up approach emphasizes the notion of growth rather than division. It requires shape rules that define both the incremental expansion of derbs and the systematic insertion of lots (Fig. 9). The basic idea is that entrance points are defined in the perimeter of the neighborhood (step 2), and then derbs grow independently from each one. Lots that have direct access from the surrounding street are defined at an early stage (step 3). Derbs then grow and fill in the empty space with lots until none is left and the whole neighborhood is packed (steps 3–16). The problem is that growth cannot be fully blind or independent; otherwise, local voids of difficult access would be constantly created, and the limits between neighboring lots would hardly ever be coincident. Thus, a certain level of intelligence has to be embedded in this system, both in the choice of rules to promote growth and in the way they are applied, particularly, in the assignment of values to rule parameters. There are two ways of solving this. The a priori solution requires performing local analysis to determine which rule to apply and the adequate assignment of values. The a posteriori solution implies applying a given rule with a given assignment of values and then to perform a test to check whether the inserted derb or lot clashes with existing forms; if not, it remains part of the design and the computation resumes; otherwise, it is deleted and another attempt is made using a different assignment of values or a different rule. If a bottom-up grammar is to be implemented and run automatically, it will be necessary to develop one of such higher level systems to determine whether and how growth rules can be applied.

Fig. 9. The bottom-up derivation of the Zaouit Lakhdar zone.

6.3. Mixed approaches

The top-down and the bottom-up approaches can be combined in two different ways to develop mixed approaches. The first (Fig. 10, top) uses a top-down approach to divide the given site into different areas as described in Section 6.1, and then a bottom-up approach to pack each of the resulting areas with derbs and lots. The bottom-up stage also runs into the type of problems referred to above, but these are simplified. In fact, as each area has only one independent derb, there is no need to check other derbs to avoid collision during growth. The second mixed approach (Fig. 10, bottom) encompasses a bottom-up stage to insert derbs and their zones of influence, and a top-down stage to divide such zones into accessible lots. In this case, the problem is to avoid the clash of different zones, and so an intelligent algorithm similar to the one mentioned in Section 6.2 needs to be considered in the bottom-up stage.

Fig. 10. The (top) top-down/bottom-up mixed approach and (bottom) bottom-up/top-down mixed approach. [A color version of this figure can be viewed online at www.journals.cambridge.org]

6.4. Selected approach

By analyzing the different ways of structuring the grammar discussed above, we came to the conclusion that, despite the advantages presented by top-down approaches, the best approach for designing and developing the Marrakech grammar was a bottom-up one. In the majority of shape grammars developed in the last 30 years, for instance the Palladian grammar (Stiny & Mitchell, Reference Stiny and Mitchell1978) and the Queen Anne grammar (Flemming, Reference Flemming1987), designs are generated in a top-down fashion. Bottom-up approaches are more commonly used in GAs or cellular automata. Nevertheless, we believe that a bottom-up approach will reflect more honestly the organic character of the urban fabric and will eventually yield more complex design solutions. Moreover, the design of the grammar should become more challenging and interesting from a computational viewpoint. Consequently, a bottom-up grammar has been developed and is described in the next section.

7. GRAMMAR

The proposed Marrakech grammar is a parametric shape grammar defined in the Cartesian product of the U12W22 algebras. Weights are used to distinguish areas occupied with plots of those that are empty still. The derivation of designs proceeds through six stages: define the limits of the neighborhood, insert entrances to derbs, insert extenders and articulators forming derbs, insert lots along the bordering street and derbs' extenders, insert lots at derbs' ends, and modify the layout of derbs and lots. These stages are not necessarily sequential as rules from different stages may be applied alternately. Because of space restrictions, it is not possible to describe and show all the rules of the proposed grammar in detail. The remaining rules and further detail are presented in Appendix A. For a quick grasp of the type of actions performed in each of the six stages of the grammar, see the abbreviated derivation provided in the figure at the end of Section 7.1.4.

7.1. Rules

7.1.1. Stage 1: Define limits of the neighborhood

Stage 1 defines a polygon representing the limits of the neighborhood. This may vary in size, geometry, and number of sides, but the edges should be, at least, twice as long as the minimum depth of a lot (i.e., 2 × 8 m), and the internal angle between edges should be bigger than 60°. Two rules apply at this stage: 1.1 and 1.2 (Fig. 11). Rule 1.1 generates a basic triangular polygon that constitutes the initial shape and rule 1.2 introduces a vertex into an edge of the polygon so that more complex polygons can be obtained. By recursively applying rule 1.2 to the edges of an evolving polygon, a perimeter like the one that limits Zaouiat Lakhdar is obtained. Technically, this stage is necessary for the design of the grammar, but it might be defined differently in the future computer implementation as polygons might be known at the outset.

Fig. 11. Rules for introducing the initial shape and defining the perimeter of the neighborhood.

7.1.2. Stage 2: Insert entrances to derbs

Rules 2.1, 2.2, and 2.3 apply at this stage (Fig. 12). Each of these rules introduces an entrance point E in such a way that each edge cannot have more than two entrance points. In rule 2.1, AA′′ is an edge of the polygon, and X′ and X′′ are the closest labeled points to A′ and A′′, respectively. They can be either other vertices of the polygon (An) or entrance points (E). To guarantee that lots with adequate dimensions can be inserted later in the computation, the distance between two consecutive entrance points measured on the perimeter cannot be smaller than twice the length of the minimum lot depth (lim_e). Conditions on both the left- and right-hand sides of the rule guarantee that this is the case.

Fig. 12. Two of the rules for inserting entrance points.

7.1.3. Stage 3: Insert extenders and articulators forming derbs

The third stage consists of the insertion of derbs, and it encompasses Rules 3.1 through 3.10. Derbs are composed of extenders that extend the derb in a predefined direction and are labeled with an empty triangle, and articulators that define new directions for the derb and are labeled with filled triangles. In the generation of a derb, rules that generate extenders and articulators are alternately applied, so that an extender is always followed by an articulator. Although the urban fabric inside the Zaouiat Lakhdar quarter is not orthogonal, derbs tend to follow two somewhat perpendicular directions. Therefore, the directions defined by the articulators are restricted so that the angle θ between a subsequent extender and one of the two perpendicular directions is within 20° and the angle β between sequential extenders is between 30° and 150°. The combination of these two restrictions defines an interval, specific to each rule application and eventually composed of noncontinuous subintervals, within which new directions for the derb can be chosen.

Rule 3.1 inserts the initial extender of a derb (Fig. 13). In this case, β defines the angle between the perimeter of the neighborhood and the direction of the extender. Rules 3.2 through 3.9 insert an articulator after a extender. They differ in the type of the inserted articulators. Rule 3.2 inserts an articulator that permits to extend the extender without changing its direction.

Fig. 13. The rule for inserting the initial extender of a derb.

Rules 3.3 (Fig. 14) and 3.4 insert elbowlike articulators, and rules 3.5 and 3.6 insert t-like articulators. Rule 3.7 inserts an arrowlike articulator, rule 3.8 a y-like articulator, and rule 3.9 a crosslike articulator. Finally, rule 3.10 connects an extender to an articulator marked with a filled triangular label. The parameters in this rule are the length (l) and the ending width (w) of the extender. By assigning a value to w, the extender may have a varying width as depicted in the figure. In fact, in Zaouiat Lakhdar, most derbs do not have a constant width.

Fig. 14. An example of the rule for inserting an articulator.

7.1.4. Stage 4: Insert lots along bordering street and derbs' extenders

In stage 4 the lots are inserted along the bordering street and the derbs. The lots along the street may have four or five sides and are used mainly for commerce. In most cases, the lots along the derbs are almost rectangular and, in the proposed shape grammar, this quadrilateral shape is captured by a general topological schema with specific constraints (Fig. 15). The value of internal angles and the dimensions of their sides may vary between specified intervals. Furthermore, the proportion of the lot is confined to the interval between 1:1 and 2:3, meaning that its geometry may vary from a square to a rectangle in which the length cannot exceed 1.5 times the width. Not all lots are quadrilaterals, as some may have more than four sides. However, it is possible to identify a main quadrilateral shape in such lots, which is then used for matching the schema on the left-hand side of rules. As lots follow the general topological schema just described, the internal shape parameters are not shown in the rules for inserting lots for simplification purposes. The insertion of lots proceeds while the derbs grow incrementally with the addition of extenders and articulators. The rules are described below. Note that added lots have a darker shade of gray to improve legibility.

Fig. 15. General topological schema of the standard lot.

Rules 4.0a–d are used to insert lots along the bordering street. Rules 4.0a and b insert a quadrilateral and a pentagonal lot, respectively, at a street corner, whereas Rules 4.0c and d insert them in the middle. Rules 4.1–4.5 define the insertion of lots along extenders. Rules 4.6–4.13 define different forms of inserting lots on the outer side of elbowlike articulators, and rules 4.14–4.16 do the equivalent on the inner side. Finally, rules 4.17–4.21 deal with the situations created by other articulators. Rule 4.1 (Fig. 16, top) is the seed rule at this stage, as it is responsible for the insertion of the first lot of the derb and it takes into account the perimeter of the neighborhood. Rule 4.2 (Fig. 16, bottom) inserts a new lot along an extender that has not been completely filled in yet. An extender is identified as empty or full through labels E or F, respectively. Rule 4.2 only applies to situations where the extender has the label E and it keeps it unchanged. Rule 4.3 does the same as Rule 4.2 except that it fills the extender, thereby changing the label to F. Rules 4.4 and 4.5 are applied when the extender' available length is smaller than the lot's minimum width. Rule 4.4 changes the label to F without adding a lot. Once an elbowlike articulator has been added to the extender, rule 4.5 introduces a lot that stretches beyond the limit of the articulator.

Fig. 16. Examples of rules for inserting lots along extenders.

Rules 4.6–4.13 deal with all the possible situations that can be created by the introduction of elbowlike articulators. In the application of parametric rule 4.6 (Fig. 17), three parameters (e, γ1, and γ2) need to be assigned values; e is the distance of the limit of the lot to the limit of the articulator. It is measured on an auxiliary axis, whose origin is O, with positive values on the left. Depending on the value of e, angles γ1 and γ2 can take one of two values to align the limit of the lot with the incoming extender or the outgoing extender. If e ≤ 0, then the angle γ1 is not defined and γ2 can have one of two values, 90° or 180° − β, with β defining the angle between the two extenders. If e > 0, then γ1's value can be either 90° or 180° − β. If γ1 = 90° (i.e., the limit is perpendicular to the incoming extender), then γ2's value can be either 90° or β° (i.e., the lots' limit is either parallel to the incoming extender or perpendicular to the outgoing I-extender). If γ1 = 180° − β (i.e., the lots' limit is perpendicular to the outgoing extender), then γ2's value can be either 90° or 180° − β (i.e., the lots' limit is either perpendicular to the outgoing extender or parallel to the incoming one). The closed polygonal shapes of the lots are not fully represented in the rule. As the rule specifies the relation between the lots and the extenders to which they are connected (in this case, an incoming extender, an elbowlike articulator, and an outgoing extender) how the polygon is closed is not important. The remaining rules follow a similar scheme. Note that in all the rules, angle γ2 is such that the limit of the lot is parallel to the incoming extender or perpendicular to the outgoing extender.

Fig. 17. An example of the rule for inserting lots on elbowlike articulators.

Rules 4.14, 4.15, and 4.16, are used to fill inner (concave) corners (corners defined by the intersection of one incoming and one outgoing extender) with lots (Fig. 18). These corners need not be exclusively derived from the insertion of elbowlike articulators; any corner with an angle smaller or equal to 90° can be tackled with these rules, regardless of the specific articulator involved. The problem is addressed in the following way. Rule 4.14, places a label P on the vertex of the last lot that is more distant from the corner between the incoming and outgoing extenders. If the distance d between point P and the outgoing extender is larger than the minimum width of a lot, then rule 4.15 is applied to transform the lot into a corner lot. If it is smaller, then rule 4.16 transfers the label P to the last but one lot, and deletes the last lot. This rule is applied recursively until rule 4.15 can then be applied.

Fig. 18. Rules to introduce lots in the inner corner formed by extenders.

Rules 4.17 and 4.18 (Fig. 19) insert a lot in an outer corner (corner defined by the intersection of two outgoing extenders), which may be yielded by rules 3.5, 3.6, and 3.9. Four variables are involved in these parametric rules: w1 and w2 are the front dimensions of the lot and they can take any value in the interval defined by minlot and maxlot (8 and 18 m, respectively, in this case); and α1 and α2 are the angles between the limits of the lot and the extenders, which can vary from 70° to 110° each. Rule 4.19 defines the insertion of lots in the specific case where the incoming direction coincides with one of the two outgoing ones. In this case, a continuity of extenders is observed and may be generated by rules 3.5, 3.6, and 3.10. For this rule to be applied, the distance e between the right most limit of the last lot and the articulator has to be inferior to a given limit. Then, the values of the parameters on the right-hand side of the rule must be satisfied: α1 and α2 can vary from 70° to 110°, w1 must be positive, and w2 and d (width and depth) must be between minlot and maxlot. Finally, rules 4.20 and 4.21 handle the insertion of lots on the sector defined by the intersection of the outgoing extenders, whenever rule 3.7 or rule 3.8 have been previously applied.

Fig. 19. An example of the rule to insert lots in the outer corner formed by extenders.

7.1.5. Stage 5: Insert lots at derbs' ends

Stage 5 deals with the insertion of lots in the ending extender of a derb. There are six possible layout configurations that can be found on the left-hand side of the rules in this stage. These configurations differ in the positions of the last lots relatively to the end of the extender. For each of these configurations, there are several ways in which lots can be placed at the end of the extender and these are encoded into the right-hand side of the rules. Rule 5.1 is shown in Figure 20. This rule inserts three lots at the end of the derb. For the rule to be applied, the positions of the last lots on both sides of the extender must be such that the distances between their limits and the end of the extender (d1 and d2, respectively) are smaller then the minimum dimension permitted for a lot, minlot, which means that no further lots could have been placed using rule 4.2. The constraints on the dimensions and angles of placed lots are those in the general scheme, described above. The remaining rules (rules 5.2–5.19) work in a similar fashion.

Fig. 20. Examples of rules for inserting lots in the ending extender of a derb.

7.1.6. Stage 6: Modify the layout of derbs and lots

Finally, stage 6 encompasses rules that modify the existing lots to create smaller or larger lots, to access locked lots, or to reach locked empty spaces to resume growth. Figure 21 shows some of these rules, and the remaining can be found in Appendix A. The modifications introduced by these rules in the lots respect the general topological scheme described in Section 7.2. As such, the specific constraints on the shapes of modified lots are omitted in the rules. Rule 6.1 divides a larger lot into two smaller ones. Rules 6.2 and 6.3 expand a lot at the expense of an ending extender (literally a dead-end alley). Rule 6.4 inserts an extender perpendicular to an existing extender at the expense of a lot to provide access to a locked lot or to an empty locked area. Rule 6.5 through 6.7 are similar, except that in rule 6.6 the new extender is aligned with the existing one, and in rules 6.6 and 6.7 a change of direction requires the introduction of an articulator. Rule 6.8 is similar except that its purpose is exclusively to provide access to locked lots and no further growth of the derb is foreseen. Rule 6.9 also provides access to a locked lot, but by modifying its topology at the expense on adjacent lot, instead of inserting an extender. Rule 6.10 provides access to a lot that is connected to a derb solely through a vertex. In this case, the topologies of two lots are modified so that an entrance area is generated off the lot that is already accessible through the derb. Finally, rule 6.11 connects two derbs by means of a diagonal direction. In general, situations in which a derb is locked within the urban fabric do not exist, but local modifications introduced in lots may generate such situations.

Fig. 21. Examples of rules to modify existing lots.

7.2. Partial derivation of the existing Zaouiat Lakhdar

The grammar just described is nondeterministic and open-ended. In general, more than one rule can be applied at a given step in the derivation. Furthermore, a single rule can generate different solutions depending on the values assigned to parameters. This means that from the same perimeter different applications of the grammar rules will likely yield different solutions. Consequently, the application of the grammar generates unpredictable results. Figure 22 shows the partial generation of the Zaouiat Lakhdar neighborhood; the first three steps show the design after the application of the rules from stages 1 through 6 indicated in the image. The following steps show the design after approximately 25 rules applications each. The complete generation of Zaouiat Lakhdar can be found in Appendix B.

Fig. 22. The partial derivation of the existing Zaouiat Lakhdar quarter. [A color version of this figure can be viewed online at www.journals.cambridge.org]

8. INTERPRETER

Previous implementations of shape grammars can be classified into three groups, based on the type of representation used for shapes. The first group includes visual implementations, for instance those by Krishnamurti (Reference Krishnamurti1982) and Tapia (Reference Tapia1999). They are called visual because shape rules match directly on the geometry, as “we see it,” by closely following Stiny's mathematical foundation of shape grammars. Thus far, these implementations only encompass two-dimensional (2-D) line algebras, as three-dimensional (3-D) algebras require solving particularly difficult technical problems. The second group includes symbolic implementations, for instance, those by Heisserman (Reference Heisserman1991) and Shea and Cagan (Reference Shea and Cagan1998). In these implementations, shape rules match on symbolic descriptions of shapes. Because they avoid the hard technical problems posed by visual implementations, symbolic implementations include 3-D algebras of solids in the case of Heisserman, and of lines in the other case. Shea's and Heisserman's implementations do not strictly use Stiny's maximal line representation. Instead, they use Requicha's (Reference Requicha1980) winged-edge representation traditionally used in CAD systems or an extension of this proposed by Heisserman and called split-edge representation, which supports nonmanifold solids (solids composed of different parts sharing a point or an edge). Nevertheless, they support shape emergence. The third group includes the implementation of set grammars, a subset of shape grammars, in which shapes are treated like indivisible atoms and represented as tagged data. For instance, implementations by Wang and Duarte (Reference Wang and Duarte2002) for 3-D solid algebras and McGill (Reference McGill2002) for 2-D linear algebras fall into this category.

As a result of the different representations, visual implementations support shape emergence and automatic shape recognition, symbolic implementations do not support shape emergence but support shape recognition, and tagged representations support none. In contrast, symbolic implementations make it easier to deal with parametric shape rules, and tagged implementations go one step further by avoiding difficulties posed by automatic shape recognition. For a more complete overview of shape grammar implementations see Chau et al. (Reference Chau, Chen, McKay and Pennington2004). Because shape emergence is not a feature of the Marrakech urban grammar, whereas parametric shape rules are, and the convoluted shapes it generates create hard shape recognition problems, the interpreter of the Marrakech urban grammar (MUGI) is a tagged implementation. The interpreter was developed as a proof of concept in AutoLISP, a scripting language of AutoCAD, a widely used CAD program. The use of AutoLISP presented two advantages. First, it made it possible to take full advantage of AutoCAD commands, thereby avoiding developing a shape modeler. For instance, Boolean operations were used to overcome shape recognition problems caused by the overlap of lots, and navigation tools eased the visualization and assessment of solutions. Second, it facilitated the interface with other software necessary to create effective models of the solutions such as rendering programs and rapid prototyping machines. The interpreter manipulates 3-D shapes, because these can easily be obtained from the 2-D shapes considered in the grammar by adding the third dimension. In summary, the choice of environment simplified the implementation greatly but enabled doing so effectively. Figure 23 shows the interpreter being used in the generation of a new urban solution, and Figure 24 shows the physical model of a new solution produced from the generated digital model using a laser cutter. It took the user just a few minutes to generate the shown solution using the interpreter, but he was not trying to meet particular design requirements. Generating a solution in such conditions might take considerably longer.

Fig. 23. The interpreter of the Marrakech urban grammar. [A color version of this figure can be viewed online at www.journals.cambridge.org]

9. DISCUSSION AND CONCLUSIONS

The research described in this paper constitutes one step toward the development of a computational model of the Zaouiat Lakhdar neighborhood in Marrakech. The ultimate goal is to use this model in the planning and design of new neighborhoods that have similar spatial features and yet are improved from the environmental viewpoint. The model uses shape grammars to encode the underlying syntactic rules and GAs to “optimize” solutions. It encompasses three grammars: a grammar to generate the urban fabric, a grammar to generate the houses, and a grammar to trade spaces among adjacent houses. This paper describes the first of these grammars, and its computer implementation. In the next sections the limitations of the current grammar are discussed and future work is outlined.

Fig. 24. The physical model of a new urban solution created from the digital model generated by the interpreter using a laser cutter.

The current grammar is bidimensional, but traditional urban environments in Islamic cities present 3-D complexity. The computer implementation introduces the third dimension by extruding the 2-D shapes of the lots up to an appropriate number of floors. However, the morphology of an Islamic city such as Marrakech cannot be described as the simple extrusion of bidimensional forms defined in plan. Its variety is just as rich in section as it is in plan. Consider, for instance, the sabbats that cover the derbs. In addition to constituting a rich architectural feature of great formal plasticity, they exist for several reasons, of which some are to provide structural stability to nearby houses, to create shade for environmental comfort, and to extend housing spaces to fulfill family needs. Another feature with similar impacts is the trading of spaces among adjacent houses that causes the perimeters of different floor plans not to coincide. Features like these cannot be fully described in two dimensions, but have important impacts on functional organization and environmental performance. Therefore, they are important for the type of “optimization” targeted with the model, and so future work will be concerned with the extension of the current grammar to include three dimensions. This can be accomplished either by using parallel grammars as the grammar for Siza's Malagueira houses (Duarte, Reference Duarte2001) or by developing the grammar in the U33 algebra.

One of the issues raised by the adoption of a parametric urban grammar concerns the criteria for choosing values for rule parameters. One interesting possibility is the drive to improve some performance indicators, thereby guiding the solution toward certain desirable characteristics. The shape grammar presented in this paper will be coupled with a GA to form a generative design system that performs guided search for improved urban patterns, a term we prefer to that of optimization.

This guided search may act at the urban scale, where potential fitness functions for the GA may be related to issues of density, ratio of public versus private space, maximum length of derbs, and so on. Guided search may also act at the level of the private patio houses, by improving the environmental performance of the houses and providing modern living standards in terms of daylighting, ventilation, thermal performance, and other environmental design parameters. Given a certain lot, determined after the application of the urban grammar, many design choices will have a deep influence on the loggia design, type of façade and roof, openings design and layout, construction materials, colors, and external finishes, among others.

Although the current study is based on the study of the Medina of Marrakech, the ultimate goal is that by introducing variations in the grammar rules, the model might be applied to new city districts not only in Marrakech but also in other cities. Because of the demographic boom, the shortage of qualified personnel, and the scarcity of funds, we would argue that this tool is particularly appropriate for use in the design and planning of cities in this region.

At this stage of the research, it is not clear whether obtaining solutions that meet contemporary living conditions can be accomplished by searching through the universe of solutions defined by the current grammar, or requires fundamental changes to this grammar. We expect future research to clarify exactly this issue. This means that our research should determine to which extent the traditional urban fabric of Muslim societies in Northern Africa is compatible with modern standards of living, and then help designing solutions that are as close as possible to such a fabric and yet met the requirements.

10. QUESTIONS AND ANSWERS

10.1. Question 1

“Could you comment on the usefulness of design representation languages in terms of reuse, readability, debuggability, etc., as this has been done in the programming languages community? That is, different languages have different affordances—how do we assess the particular affordances of a design representation language?”

10.2. Answer 1

“We assume that the expression ‘design representation languages’ refers to shape grammars and other technical formalisms used to represent design languages. Shape grammars were created to explain, in a computational and visually understandable way, how designs are generated within a particular design language. This understanding is important to make them easier to reuse by people who did not participate in the process of developing the grammar.

The first shape grammars developed by Stiny and Gips for abstract compositions were very successful in this regard. The simplicity of the grammars and the designs they generated made it possible to use shape markers to control the generation of designs, while keeping the process visually clear. However, the grammars for nonabstract designs developed afterward, for instance, the grammar for Palladian plans, required the use of more complex control devices. This led to the creation of algebras of symbolic labels that when combined with algebras of shapes guaranteed control over the generation process. Later on, the creation of description grammars permitted us to deal with even more complex information associated with the process of designing and to gain a better control of the derivation process. This control of the semantic aspects of design is important to guide the generation of solutions toward specific performance goals (user adaptation, structural stability, environmental sustainability, etc.).

As the technical apparatus of shape grammars grew more complex, they became more difficult to read and debug. Readability and debuggability are particularly difficult when the grammar is intended to be encoded into a computer interpreter and therefore needs to incorporate a considerable amount of information. The computer implementation of shape grammars is nevertheless crucial to facilitate their use and achieve some of their most important promises, namely, the fast generation of design alternatives that are adapted to particular design contexts. In these cases, one can certainly argue that grammars risk defeating their initial goal of visual clarity, thereby losing part of its usefulness. A solution to this paradox is to develop a simplified version of the grammar in parallel to the more complex one. The simplified grammar defines a language that is equivalent to the more complex one but has different affordances; one enables computer implementation whereas the other facilitates reading, reusing, and debugging. This solution was used, for instance, in the grammar for Siza's Malagueira houses, which encompassed several parallel grammars, one for each viewpoint (plans, sections, elevations, 3-D views, and descriptions). One of these viewpoints was simple enough to make the essential process visually clear, thereby facilitating the learning and reuse of the grammar by other people. This solution proved to work in a set of experiments in which people were asked to use the grammar to generate Malagueira houses for particular clients (Duarte, Reference Duarte2001).

Another solution that constitutes a more advanced version of the previous one is to develop the computer implementation in such a way that it permits us to visualize viewpoints with different levels of detail. This solution requires a considerable investment in the design of the interface to make it user friendly. If this is done successfully, it should permit users with different intentions and degrees of knowledge to interact with the interpreter in an appropriate manner. Users whose concern was to develop new designs within an already defined language would not need to have access to all the technical details of the grammar. The interpreter could even explain the rationale behind the generation of a given design. Users whose goal was to design a new grammar could access the details of the grammar, but they did not need to deal with a programming language. They would develop the grammar by manipulating shapes. In addition, this ideal shape grammar editor would possess debugging capabilities similar to those found in other language editors. Only when we succeed in developing such an interpreter would we be able to take advantage of the full potential of shape grammars. To accomplish this we need to overcome some of the difficulties outlined in Section 8 in the paper. In the meantime, we should be happy with the advantages permitted by the current state of the art and widely documented in the literature.

10.3. Question 2

“Would people accept this technique for urban form design? How do you deal with scale in your grammar?”

10.4. Answer 2

“Attempts to achieve any degree of design automation always encounter two types of reaction. On the one hand, we have the people who are against the idea. These people depart from a philosophical viewpoint that tends to perceive design as an inherently human activity, somewhat intuitive, and too complex to be captured through a process that necessarily requires simplification and abstraction. On the other hand, we find people who favor the approach. These people value the benefits that it brings about, even if the abstraction that it entails reduces complexity and risks leaving some meaningful information out. They consider that the model of reality it implies requires abstraction and, like any other model, it is valid as long as it becomes useful. The usefulness of the model thus depends on using it within the appropriate context. This is also the case in other fields. For instance, Newton's physics are useful if one's goal is to explain the movement of planets in the solar system and build a spaceship to reach the moon. However, if one's aim is to explain the origins of the universe, the model is limited and requires the use of quantum physics.

Obviously, we take the second standpoint. The current state of the art only enables the development of rather simplified models, like the one that corresponds to the current state of our project. For instance, it does not take into account topography and other important contextual information. However, such a simplified model is already useful. It makes it possible to gain a better understanding of the formal structure behind traditional Islamic urban fabrics. Moreover, once we complete the implementation by linking the grammar to the genetic algorithm that will improve solutions from performance viewpoints, we will be able understand the trade-offs among different design alternatives. The tool proposed, at this stage, is not designed as a general urban design application, but it is highly context dependent. It relates to the particular situation of this Islamic medina, where urban fabric characteristics are deeply connected to the characteristics of the patio houses. In this context, we consider the method acceptable for urban design, where a precise set of rules for generating houses is also deeply rooted in the origin of rules for generating urban designs.

Previous meetings in Marrakech with members of the Agence Urbaine and of the Ministère de la Culture (Inspection des Monuments Historiques et Sites de Marrakech) showed that the present research was accepted with great interest. Moreover, its goal matches current local concerns about the uncontrolled urban growth of the Marrakech Medina and the lack of available technology and qualified professionals to undertake the development of new urban and housing projects. The necessity to simultaneously fulfill environmental sustainable requirements and traditional architectural needs in new planning and design is the cornerstone of the project.

At this stage, the project addresses two main scales. The first is the urban scale. In the project this corresponds to the site planning scale. In other words, the project is intended to address only the scale of urban quarters, not the city scale. These quarters are constituted of housing and commerce and do not include other building types; therefore, the project does not encompass the complex rules associated with larger scales, thereby greatly simplifying the problem. The second scale is the housing scale, which is the scale that corresponds to extended-family houses. The proposed model deals with these scales in two ways. First, it considers three grammars as described in Section 4 of this paper: (1) the urban grammar generates urban quarters surrounded by streets from which emerge derbs (narrow dead-end streets) that give access to plots, (2) the housing grammar yields courtyard houses for the plots, and (3) the negotiation accounts for the generation of 3-D complex housing configurations by trading spaces among neighboring houses.

In the second scale, it assures compatibility among these scales through the control of parameter values in all of them. For instance, the shapes and sizes of quarters and plots were determined after careful analysis of the Marrakech Medina. Limitations on the size of quarters ensure that the grammar does not exceed the site planning scale. Limitations on size and shape of lots make sure that urban configurations are compatible with possible courtyard and housing configurations. In addition, the length of derbs is related to the acceptable sizes for housing lots. The angles that derbs can establish among themselves are also related to the acceptable angles for housing lots.

For an explanation of the problem posed by scale to the inference of urban grammars and how it was tackled in the development of the proposed grammar, see Section 6 in the paper.”

ACKNOWLEDGMENTS

We thank Rodrigo Correia, André Valverde, and João Cardoso for their work in the development of the Marrakech urban grammar interpreter. André's and João's work evolved within the course entitled Programming and Computation for Architecture (DAC II) taught at IST by José P. Duarte. We also thank Abied Driss, Chef du Département des Études de le Ministère de l'Interieur, Agence Urbaine de Marrakech, and Faissal Cherradi and Abdellatif Marou, Inspection Régionale des Monuments Historiques et des Sites, for providing valuable graphic and historical information regarding the history of Marrakech. This research was carried out within the framework of Project POCTI/AUR/42147/2001, coordinated by Luisa Caldas, with the financial support of FCT, Portugal. We thank Luisa for her participation in the initial discussions on the development of the grammar described in this paper.

José Pinto Duarte is Associate Professor at the Technical University of Lisbon School of Architecture and a Researcher at ICIST, Instituto Superior Técnico (IST), at the same university. José holds an SMArchS and a PhD in design and computation from the Massachusetts Institute of Technology (MIT). He was Research Associate in the House of the Future project (House_n) at MIT and Research Assistant at the National Laboratory for Civil Engineering, Portugal. Dr. Duarte's research interests are the use of new technologies in architecture and urban design, focusing on generative systems and mass customization. At IST, he founded the ISTAR Labs and is responsible for the Computational Architecture Laboratory.

João de Magalhães Rocha is an Assistant Professor of architecture at the University of Evora and a Researcher at CHAIA. He received a professional degree from the Technical University of Lisbon School of Architecture (1992) and earned an MSc from Columbia University, New York (1995). In 2003 he completed his PhD at the MIT Design and Computation Group. He has taught at the Pontificia Universidad Catolica de Chile, Santiago (1996), and at MIT (1998–2002). Since 2005 he has been Director of the Department of Architecture at the University of Évora, Évora, Portugal. He was a Research Fellow at the Graduate School of Design at Harvard in 2006. Dr. Rocha's research focuses on the development of computation in architecture both from an historical and a practical perspective.

Gonçalo Ducla Soares graduated in architecture from the Technical University of Lisbon School of Architecture in 2001, after which he worked at the Renzo Piano Building Workshop in Genoa, Italy. From 2002 to 2004 he studied at MIT, where he joined the Design and Computation Group and earned an SMArchS degree. In 2005 he worked at the Technical University of Lisbon School of Engineering (Instituto Superior Técnico), where he developed research, taught, and coorganized the eCAADe 2005 conference. Since January 2006, Dr. Soares has been working at Architecture Studio in Paris.

APPENDIX A: COMPLETE SET OF GRAMMAR RULES

Fig. A.1. Stage 1: Define the limits of the neighborhood.

Fig. A.2. Stage 2: Insert the entrances into the derbs.

Fig. A.3. Stage 3: Insert extenders and articulators and form derbs.

Fig. A.4. Stage 4: Insert lots along the bordering street and the derbs' extenders.

Fig. A.5. Stage 5: Insert lots at the ends of the derbs.

Fig. A.6. Stage 6: Modify the layout of the derbs and lots.

APPENDIX B: COMPLETE DERIVATION OF THE ZAOUIAT LAKHDAR QUARTER

Fig. B.1. The complete derivation of the Zaouiat Lakhdar quarter. The numbers in parentheses indicate the number of times the rule above was applied.

References

REFERENCES

Beirão, J.N., & Duarte, J.P. (2005). Urban grammars: towards flexible urban design. Proc. 23rd Int. eCAADe Conf., pp. 491500.CrossRefGoogle Scholar
Bonine, M. (1990). The sacred direction and city structure: a preliminary analysis of the Islamic cities of Morocco. Proc. 7th Muqarnas: An Annual on Islamic Art and Architecture, pp. 5072. Leiden: E.J. Brill.CrossRefGoogle Scholar
Caldas, L.G. (2001). An evolution-based generative design system: using adaptation to shape architectural form. PhD Dissertation. Massachusetts Institute of Technology.Google Scholar
Caldas, L.G. (2005). Three-dimensional shape generation of low-energy architecture solutions using pareto genetic algorithms. Proc. 23rd Int. eCAADe Conf., pp. 491500.Google Scholar
Chau, H.H., Chen, X., McKay, A., & Pennington, A. (2004). Evaluation of a 3D shape grammar implementation. Proc. 1st Int. DCC Conf., pp. 357376. Dordrecht: Kluwer Academic.CrossRefGoogle Scholar
Duarte, J.P. (2001). Customizing mass housing: a discursive grammar for Siza's Malagueira houses. PhD Dissertation. Massachusetts Institute of Technology.Google Scholar
Duarte, J.P. (2005). A discursive grammar for customizing mass housing: the case of Siza's houses at Malagueira. Automation in Construction 14(2), 265275.CrossRefGoogle Scholar
Flemming, U. (1987). More than the sum of parts: the grammar of Queen Anne houses. Environment and Planning B: Planning and Design 14, 323350.CrossRefGoogle Scholar
Grabar, O. (1976). Cities and citizens: the growth and culture of urban Islam. In Islam and the Arab World (Lewis, B., Ed.), pp. 89116. London: Thames and Hudson.Google Scholar
Heisserman, J. (1991). Generative geometric design and boundary solid grammars. PhD Dissertation. Carnegie Mellon University, Department of Architecture.Google Scholar
Knight, T.W. (1998). Designing a shape grammar: problems of predictability. Proc. 5th Int. Artificial Intelligence in Design Conf., pp. 499516. Dordrecht: Kluwer Academic.Google Scholar
Krishnamurti, R. (1982). SGI: A Shape Grammar Interpreter. Technical Report. The Open University.Google Scholar
McGill, M. (2002). Shaper2D: visual software for learning shape grammars. Proc. 20th eCAADe Conf., pp. 148151.CrossRefGoogle Scholar
Mortada, H. (2003). Traditional Islamic Principles of Built Environment. New York: Routledge Curzon.CrossRefGoogle Scholar
Requicha, A. (1980). Representations for rigid solids: theory, methods, and systems. Computing Surveys 12, 437464.CrossRefGoogle Scholar
Rocha, J. (1995). Marrakech: An Evolutionary Model. Abstract 94/95, p. 80. New York: Columbia University Press.Google Scholar
Shea, K., & Cagan, J. (1998). Generating structural essays from languages of discrete structures. Proc. 5th Int. Artificial Intelligence in Design Conf., pp. 365384. Dordrecht: Kluwer Academic.CrossRefGoogle Scholar
Stiny, G. (1977). Ice-ray: a note on Chinese lattice designs. Environment and Planning B: Planning and Design 4, 8998.CrossRefGoogle Scholar
Stiny, G. (1980). Introduction to shape and shape grammars. Environment and Planning B: Planning and Design 7, 343351.CrossRefGoogle Scholar
Stiny, G., & Mitchell, W.J. (1978). The Palladian grammar. Environment and Planning B: Planning and Design 5, 518.CrossRefGoogle Scholar
Tapia, M. (1999). A visual implementation of a shape grammar system. Environment and Planning B: Planning and Design 26, 5973.CrossRefGoogle Scholar
Teeling, C. (1996). Algorithmic design: generating urban form. Urban Design Studies 2, 89100.Google Scholar
Wang, Y., & Duarte, J.P. (2002). Automatic generation and fabrication of designs. Automation in Construction 11, 291302.CrossRefGoogle Scholar
Wilbaux, Q. (2001). La Medina de Marrakech. Formation des Spaces Urbains d'Une Ancienne Capitale du Maroc. Paris: L'Harmattan.Google Scholar
Figure 0

Fig. 1. A partial map of the Marrakech Medina. The shaded area delineates the Zaouiat Lakhdar, the quarter selected as a case study. Its boundaries are well defined by four major commercial streets. Below is the Mosque Ben Youssef (12th century) and attached to the right, belonging to the same complex, is the Medersa Ben Yussef.

Figure 1

Fig. 2. The plan of Zaouiat Lahdar. (1) The lots bordering the outer streets are mainly used for shops and public facilities. (2) The inner lots are accessed by (3) narrow, zigzagged, dead-end streets, called derbs, which are occupied by patio houses. The derbs are partially covered by (4) sabbats.

Figure 2

Fig. 3. An aerial north–south view of Zaouiat Lahdar, showing the intricate fabric of derbs and patio houses.

Figure 3

Fig. 4. Views of the of the Zaouiat Lakhdar quarter showing (a) a surrounding street, (b) a derb, (c) a sabbat, and (d) a patio house.

Figure 4

Fig. 5. The output of an experimental computer program encoding a basic urban grammar for the Marrakech Medina after (a) 100, (b) 200, (c) 500, and (d) 1000 iterations. [A color version of this figure can be viewed online at www.journals.cambridge.org]

Figure 5

Fig. 6. Plans of Zaouiat Lakhdar based on collected information showing the main directions of the urban fabric and the location of (left) derbs, sabbats, lots, house entrances, and patios and (right) which lots are accessed by which derbs. [A color version of this figure can be viewed online at www.journals.cambridge.org]

Figure 6

Fig. 7. The three stages reached by the subgrammars: (left) urban grammar, (center) negotiation grammar, and (right) patio house grammar.

Figure 7

Fig. 8. The top-down derivation of the Zaouiat Lakhdar quarter.

Figure 8

Fig. 9. The bottom-up derivation of the Zaouit Lakhdar zone.

Figure 9

Fig. 10. The (top) top-down/bottom-up mixed approach and (bottom) bottom-up/top-down mixed approach. [A color version of this figure can be viewed online at www.journals.cambridge.org]

Figure 10

Fig. 11. Rules for introducing the initial shape and defining the perimeter of the neighborhood.

Figure 11

Fig. 12. Two of the rules for inserting entrance points.

Figure 12

Fig. 13. The rule for inserting the initial extender of a derb.

Figure 13

Fig. 14. An example of the rule for inserting an articulator.

Figure 14

Fig. 15. General topological schema of the standard lot.

Figure 15

Fig. 16. Examples of rules for inserting lots along extenders.

Figure 16

Fig. 17. An example of the rule for inserting lots on elbowlike articulators.

Figure 17

Fig. 18. Rules to introduce lots in the inner corner formed by extenders.

Figure 18

Fig. 19. An example of the rule to insert lots in the outer corner formed by extenders.

Figure 19

Fig. 20. Examples of rules for inserting lots in the ending extender of a derb.

Figure 20

Fig. 21. Examples of rules to modify existing lots.

Figure 21

Fig. 22. The partial derivation of the existing Zaouiat Lakhdar quarter. [A color version of this figure can be viewed online at www.journals.cambridge.org]

Figure 22

Fig. 23. The interpreter of the Marrakech urban grammar. [A color version of this figure can be viewed online at www.journals.cambridge.org]

Figure 23

Fig. 24. The physical model of a new urban solution created from the digital model generated by the interpreter using a laser cutter.

Figure 24

Fig. A.1. Stage 1: Define the limits of the neighborhood.

Figure 25

Fig. A.2. Stage 2: Insert the entrances into the derbs.

Figure 26

Fig. A.3. Stage 3: Insert extenders and articulators and form derbs.

Figure 27

Fig. A.4. Stage 4: Insert lots along the bordering street and the derbs' extenders.

Figure 28

Fig. A.5. Stage 5: Insert lots at the ends of the derbs.

Figure 29

Fig. A.6. Stage 6: Modify the layout of the derbs and lots.

Figure 30

Fig. B.1. The complete derivation of the Zaouiat Lakhdar quarter. The numbers in parentheses indicate the number of times the rule above was applied.