Using Processing with Architectural 3D Modelling
Total Page:16
File Type:pdf, Size:1020Kb
Using Processing with Architectural 3D Modelling Inês Caetano1, António Leitão2 1,2INESC-ID/Instituto Superior Técnico [email protected] [email protected] Although programming was considered a specialized task in the past, we have been witnessing an increasing use of algorithms in the architectural field, which has opened up a wide range of new design possibilities. This was possible in part due to programming languages that were designed to be easy to learn and use by designers and architects, such as Processing. Processing is widely used for academic purposes, whereas in the architectural practice it is not as used as other programming languages due to its limitations for 3D modeling. In this paper, we describe the use of an extended Processing implementation to generate three 3D models inspired in existing case studies, which can be visualized and edited in different CAD and BIM applications. Keywords: Generative design, Programming, Processing, 3D modeling INTRODUCTION to designers and architects. Such is the case of the Only recently have architects considered the use of Processing language (Reas and Fry 2007). programming in architecture, as they become aware of its potential, thus introducing it in their design BACKGROUND practices (Burry 2011). This allowed the automation Processing was created especially for designers with- of tedious tasks, the exploration of generative pro- out any previous experience in programming. Nev- cesses, and the generation of complex solutions that ertheless, it has also been used in other fields, includ- would be difficult and time consuming to produce ing architecture. This programming language is con- manually. Therefore, algorithms became extensions sidered as a pedagogical language and, in fact, it has of human thinking by overcoming its potential limita- being taught in several academic courses. Therefore, tions, allowing the exploration and experimentation this language has grown over the years and has be- in an alternative realm (Terzidis 2003). The concept come increasingly popular due to its simplicity, to the of Generative Design (GD) can be defined by this al- academic community support, and to the excellent gorithmic and rule-based process, through which a documentation available (Fricker et al. 2008). wide variety of solutions can be created in a short pe- Still, in the architectural practice Processing is riod of time (Fasoulaki 2008). not as used as other programming languages, such However, programming is not a trivial task (Burry as Python, Grasshopper, AutoLISP, and VisualBa- 2011). In order to facilitate the use of GD, some sic. The main reasons for this unfortunate situation programming languages were carefully designed or are the inability of Processing to interact with the adapted with the aim of teaching programming skills Computer-Aided Design (CAD) and Building Informa- GENERATIVE DESIGN | Design Concepts & Strategies - Volume 1 - eCAADe 34 | 405 tion Modeling (BIM) tools that are typically used by Sketchup, Revit, and ArchiCAD). architects, such as AutoCAD, Rhinoceros 3D, and Re- In order to make Processing suitable for the vit, and also its shortcomings in 3D modeling oper- needs of architects, 3D modeling extensions to the ations and transformations, such as sweeping, loft- Processing language were also implemented in the ing or extruding. This is not surprising, as Processing Rosetta IDE. These extensions include several opera- was originally intended for 2D drawings and anima- tions for basic 3D modeling, such as boxes, spheres, tions, running in its own programming environment cylinders, cones, etc., as well as shape forming oper- and completely isolated from other applications. ations, such as lofting, sweeping and extruding, and Only recently was Processing extended with sim- also Boolean operations, i.e. subtraction, intersec- ple 3D operations and ways of exporting the gener- tion, and union of shapes. ated designs. Some libraries were also developed to In addition to supporting the traditional syntax add some of the required operations, such as increas- and semantics of the Processing language, our solu- ing the range of 3D primitives, creating and control- tion extended Processing in three directions: ling irregular shapes, or dealing with some 3D shape 1. Interactive evaluation, which allows designers transformations. In the Related Work section we will to evaluate small fragments of Processing pro- enumerate and describe some of these libraries with grams in a Read-Eval-Print-Loop (REPL), en- more detail. abling quick experimentation of the scripts Unfortunately, these 3D operations are still lim- being developed; ited in their capabilities. Therefore, the application 2. 3D modeling, an essential extension in order of Processing in the field of architecture remains dif- to improve the use of Processing for architec- ficult, even though it is easy to learn and use. In or- ture; der to overcome this situation, we propose an aug- 3. Professional CAD, a connection between Pro- mented Processing for architects that deals with a cessing and CAD/BIM tools, supporting the wider range of 3D modeling primitives (cylinders, generation of designs in those tools without spheres, cones, etc) and transformations (extrusions, suffering from the problems that typically oc- lofts, sweeps, Boolean operations, etc), which are es- cur when designs are imported from different sential in the architectural daily practice, and gener- applications. ates their results directly into a CAD or BIM tool. The most significant advantage of the implementa- AUGMENTING PROCESSING tion of Processing for Rosetta is the ability to use, in In the past (Correia and Leitão 2015), we proposed a Processing programs, all the 2D and 3D modeling op- solution to join CAD and BIM tools with the Process- erations available in Rosetta. Given that these op- ing language, allowing architects to develop new de- erations access the corresponding operations in the signs using this programming language while gen- CAD/BIM tool being used, this gives Processing the erating their results directly into a CAD or BIM ap- capability to directly create shapes in that tool. plication. This solution was implemented in Rosetta (Lopes and Leitão 2011), an Integrated Development USING PROCESSING IN ARCHITECTURE Environment (IDE) for generative design. One main Our implementation of Processing is intended for ar- advantage of Rosetta is its emphasis on portabil- chitects that learned Processing and want to use it ity and, unlike other development environments, in their architectural practice. In this section, we de- Rosetta supports scripts using different languages velop three architectural examples using Processing: (AutoLISP, JavaScript, Python, Racket, and Scheme) 1. Al Bahar Towers; and generates identical models in all supported 2. Allianz Arena; CAD and BIM applications (AutoCAD, Rhinoceros 3D, 3. Quality Hotel Friends. 406 | eCAADe 34 - GENERATIVE DESIGN | Design Concepts & Strategies - Volume 1 Additionally, we discuss the advantages and draw- over, these points were also used to generate the sur- backs of Processing for the architecture practice. For face mesh of the outer layer, which was then orga- each of the examples we use Processing running in nized into groups of four points (i.e. a squared mesh) the Rosetta IDE, thereby allowing the visualization so as to facilitate the future development of the tri- and edition of the generated models in the sup- angular units (Figure 1, on the right). In practical ported backend applications, including Rhino and terms, this first stage required operations like calcu- AutoCAD. lus of matrices and surface normal vectors, arrays of coordinates, and surface creation. Al Bahar Towers The second stage was the creation of the tower's Our first example is the Al Bahar Towers in Abu Dhabi, outer skin with the triangular units. First of all, we de- design by Aedas Architects. These towers are char- fined the geometry of these units and, then, we ap- acterized by their responsive facade, which is com- plied them on the squared mesh defined in the pre- posed by several triangular units inspired in the tra- vious stage. ditional Islamic element "mashrabiya". Nevertheless, To create the units, we started by calculating the in this paper we will simply focus on modeling these vertices that defined their shape. Then, these ver- towers facade design, and not on its kinetic proper- tices were strategically linked using lines, which in ties. turn were used to produce the surfaces. This process is synthetized in Figure 2 by the images A-B-C. Figure 1 Secondly, the generation of the outer skin con- Inner glass surface sisted in mapping these triangular units along the (left-side); outer squared mesh. Finally, we overlapped both inner and surface organized outer surfaces so as to produce the final model, which in groups of four is visible in Figure 2. points (right-side). Note that, apart from the arrays of coordinates, this second stage required surface creation between curves, an operation that is not available in the origi- nal Processing implementation. Allianz Arena Our second example is the Allianz Arena stadium in Munich, designed by Herzog & de Meuron Architects with ArupSport. As in the previous example, we had to first define the overall shape of the stadium. There- fore, in order to obtain this form we used the math- ematical formula of the superellipse to produce the We divided this example into two different stages. cloud of points that corresponded to the stadium's Firstly, we created the inner glass surface with the shape. This was then used to produce, first, the un- tower's shape and, then, we explored the outer skin, derlying surface of the model and, then, to distribute which is composed by the triangular units. Before ex- the diamond shaped cells which characterize the fa- ploring each stage, we had to define the set of points cade. Lastly, we produced each of these cells using: that corresponded to the tower's geometry, which together with a surface creation operation produced 1. an array of coordinates and a closed-line the inner glass surface (Figure 1, on the left).