Master Thesis Zurich, October 2020 Towards Simultaneous Topology and Form Finding Krispin Wandel Supervisors: Dr. Roi Poranne Dr. Bernhard Thomaszewski Examiner: Prof. Stelian Coros Computational Robotics Lab Department of Computer Science | ETH Zurich Abstract This thesis originated from a collaboration with the architecture department that works on the project Semiramis. Semiramis is a large sculpture consisting of multiple islands as shown in Fig. A.1. There are several interesting problems arising from the Semiramis project. In this thesis we dealt with two main objectives. The first one is about finding a form for the islands. The islands consist of planar polygonal wooden panels which are glued together. In order to find interesting shaped wooden panels, the goal was to create a tool that could automatically generate these wooden panels with only a few design parameters. For this purpose, we developed a novel approach that can flatten a high resolution mesh. The second objective targets various shape and structural constraints. In particular, on the one hand we optimize the shape so that the area of the wooden panels and the total glue line between those panels do not exceed pre-defined limits, and on the other hand we want to optimize the shape so that the loads acting on each joint are minimized. i Thanks to my supervisors Dr. Roi Poranne and Dr. Bernhard Thomaszewski for introducing me to exciting topics in optimization and for having fruitful discussions. ii Contents 1 Introduction 2 Panelization 2.1 Introduction & Related Work 2.2 Panelization . . . . . . . . . . 2.3 Planarization . . . . . . . . . 2.4 Results & Discussion . . . . . 2.5 Conclusion & Future Work . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Shape Optimization 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Geometric Constraints . . . . . . . . . . . . . . . . . . . . . 3.2.1 Penalty Terms . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Structural Constraint . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Sensitivity Analysis . . . . . . . . . . . . . . . . . . . 3.3.2 Discrete Shell Model . . . . . . . . . . . . . . . . . . 3.3.3 Comparison between Discrete and Solid Shell Model . 3.3.4 Maximum Bending Load Constraint . . . . . . . . . . 3.3.5 Results . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.6 A Note on Compression Only Shells . . . . . . . . . . 4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 4 4 6 6 . . . . . . . . . . . 9 9 9 9 10 12 12 13 20 20 22 22 28 A Further Notes & Figures 29 A.1 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . 29 A.2 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 iii List of Figures 2.1 2.2 Bend element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Maximum area and glue length optimization . . . . . . . . . . . . . Island . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Beam model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geometric constructions for the bend element . . . . . . . . . . . . Comparison between DcS and SoS . . . . . . . . . . . . . . . . . . . Maximum bend stress optimization . . . . . . . . . . . . . . . . . . Optimization over all penalty terms. Semiramis island before (left) and after (right) optimization. . . . . . . . . . . . . . . . . . . . . . Simultaneous minimization of area, glue and maximum bend stress penalty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Sensitivity Analysis to find a compression only shell for a dome. Green = compression, red = tension. . . . . . . . . . . . . . . . . . 3.8 3.9 . . . . . . 5 7 11 14 15 18 21 23 . 24 . 25 . 27 A.1 Vegetale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 iv List of Tables 2.1 3.1 The results strongly depend on the course of the sliders. However, in the results above we kept the sliders roughly the same during optimization with values around τ = 3.0e−6 , wB = 2.5e2 , wL2 = 1.5e−2 , wmembrane = 2.5e−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Wood material parameters . . . . . . . . . . . . . . . . . . . . . . . . 20 v Chapter 1 Introduction Architecture always longs for the new and tries to push the limits of the possible. Complex structures also drive many research groups in robotics, materials science, simulation and optimization fields to constantly explore new methods. This work is also motivated by a construction project of D-ARCH, ETH. The building project is called Semiramis and takes its name from the ”Hanging Gardens of Semiramis”. Also known as ”The Floating Gardens of Babylon”, according to reports, was a gigantic building whose large terraces were greened. Semiramis, however, is somewhat more modest in its construction and consists of several islands supported by pillars in the air, forming the garden terraces. Fig. A.1 shows a draft of Semiramis. In this work we were concerned with finding a form for the Semiramis islands. To understand why this is important for the architects, some context is needed. In architecture, the creator usually only has a rough idea of the final result at the beginning. But this is usually sufficient for a first small-scale prototype that can be presented to investors. In the planning phase, however, the design must be finalized, taking into account costs and structural constraints. In the conventional procedure, the architect plans the building on his own and then sends his design to the structural engineer, on whose evaluation the architect again adjusts his building plan. This is an iterative and long-winded process. Antoni Gaudi (1852-1926) is one of the most famous architects who broke out of this cycle. In the Sagrada Familia in Barcelona, he found new and complex forms for vaults by modeling them with chains of strings and different weights. By playing with the weights, he was able not only to change the shape of the vault, but also to guarantee its structural integrity. This was a first form of a parametric and inverse design process. Parametric in the sense that Gaudi modified the shape of the vault not directly but indirectly by weights (the parameters) and inverse in the sense that the parameters were adapted based on the static (settled) solution of the string network. Gaudi needed a whole decade until the final planning of the vault, because the modeling by strings and weights was very complex. Today this design process can be accelerated by computer-aided software. The software ”Grasshopper” is one of the pioneers in this field and enables architects to find new forms through generative algorithms. Semiramis aims to impress with innovation in a similar way to Gaudi a hundred years ago. One aspect of this is to make the shapes of the islands interesting and unique, while at the same time meeting structural as well as geometric and financial requirements. For this purpose a Grasshopper plugin should be created, which is similar to the principle of the Parametric Inverse Design process and finds a valid shape for the island based on 1 CHAPTER 1. INTRODUCTION a smooth target mesh (design parameter). The goal of this work was to implement this plugin. There were three big challenges that we had to solve: • The islands consist of a wooden shell which serves as a carrier for the earth and the planting and is composed of several wooden plates glued together. Our tool must therefore generate a surface consisting of planar polygons. At the same time, we want to stay as close as possible to the target mesh. • The surface must also fulfill geometric constraints. On the one hand, the surface of each polygon is limited to a given maximum, since the robots that join the wooden panels have a maximum lifting capacity. On the other hand, the glue line between the wooden plates must not be too long for financial reasons. • The final challenge was that the adhesive can only withstand a certain edge bending stress. This creates an inverse design problem in which we optimize the shape based on measurements in the static equilibrium of our physical model of the island. Due to the complexity of the problem, we have decided to treat point 1 of points 2 & 3 separately. That means we will split the plugin into two parts. We will treat these two parts accordingly in the next two chapters. 2 Chapter 2 Panelization 2.1 Introduction & Related Work We present a new approach that can find a simplified representation of a high resolution input mesh. The simplified version will consist of flat surfaces which are formed by minimizing a continuous version of the L0 norm over angles between neighbouring triangles and the L2 norm that penalizes the distance to the original input mesh. Our approach has been used in the architecture project Semiramis in order to generate planar polygonal wooden panels. Mesh simplification methods have been mostly focused on triangle and quad meshes. One popular method that belongs to this class of algorithms is [1] that contracts vertices based on quadratic error metrics while maintaining a triangle mesh. However, with extreme mesh simplifications, triangles cannot capture enough information to achieve satisfactory results. Variational Shape Approximation (VSA) [2] tries to obtain a multi-planar surface by using k shape proxies. It uses a similar approach to k-means clustering, but it tries to find shape proxies instead of means. From these shape proxies a simplified surface can be reconstructed. Clustering is also used in [3], in which the authors present a method to compute and fabricate multi-planar models. However, their method generates a simplified mesh by iterating over two steps. First, they solve a multi-label-minimum-graph-cut problem to find clusters and in the second step, their method continuously deforms the input mesh so that the triangles converge to clusters to which they were previously assigned. The authors found that the results produced by their method were visually more appealing than those generated by VSA. However, their method takes minutes to process a mesh, while VSA only needs a few seconds. Moreover, their approach requires fine-tuning of many hyperparameters which can be overwhelming for the end user. Both, their method and VSA, try to solve a k-mean equivalent problem. This problem is in general NP-hard and, thus, only local solutions can be found using iterative algorithms. In contrast, we introduce a novel but simple objective that can be optimized through standard gradient descent methods. Thus, our tool can be accelerated via a GPU and lets the end user find a simplified form interactively. 3 2.2. PANELIZATION 2.2 CHAPTER 2. PANELIZATION Panelization Our goal is to find a small set of planar polygons pk that build a surface Sgoal that is close to a given input mesh Min . In our method, we gradually deform the triangles in Min to get an output mesh Mout that matches such a surface. Operating directly on Min has two major advantages: First, we are warranted to have the same topology as Min and, second, we get an uv-texture mapping from Min to Mout almost for free. In the following, we will derive an objective on Min , f (Min ), that defines the deformation from Min to Mout . For convenience, let us introduce bend elements bl that consist of two neighbouring triangles tb,1 = (A, B, C) and tb,2 = (A, D, B) with bend angle θb (see Fig. 2.1). A planar polygon pk in Mout is a set of neighbouring triangles such that for all bend elements inside pk (tb,1 ∈ pk and tb,2 ∈ pk ) θb is zero. A small set of planar polygons corresponds to a small set of bend elements with non-zero bend angle. This observation yields the following objective: X (2.1) f1 (Mout ) = wB · |θb |L0 + wL2 · |Min − Mout |2L2 | {z } b ∈ Mout B {z } | A In (A) we penalize the number of non-zero bend angles using L0 -regularization with weight wA and in (B) we add a term for staying close to the input mesh. Since |θb |L0 is non-convex and non-smooth, optimizing f1 directly is very hard. However, similar to the approach in [4], we can replace |θb |L0 with a smooth sigmoid function that is convex near zero: |θb |L0 ,smooth = θb2 , θb2 + τ (2.2) where τ handles the sharpness of the sigmoid function. τ influences our algorithm as follows. For a high value of τ our sigmoid function becomes a quadratic-convex function and, thus, our algorithm would simply smooth the mesh. So if we start from a high value for τ and then reduce the value of τ during the optimization, this will first smooth the input mesh, then cause creasing, and finally result in planar surfaces. Furthermore, we want to note that, intuitively, a higher value for wB should reduce the number of clusters. However, the derivative of our sigmoid function, for small τ , is close to zero for θb 6= 0. Also, the non-convexity of the sigmoid function makes it difficult to give any guarantees about the influence of wB . We also added a triangle membrane energy part to regularize the amount of deformation each triangle experiences during optimization. The associated weight for this energy is wmembrane . 2.3 Planarization Due to the substitution of |θb |L0 with |θb |L0 ,smooth and the L2 -regularization term, bend angles are not guaranteed to attain exactly zero. A non-planar polygon p̂k in Mout is a set of neighbouring triangles for which the bend angle |θb | of each bend element b inside p̂k is smaller than some threshold θ̃. We will now discuss how we can planarize these non-planar polygons. 4 2.3. PLANARIZATION CHAPTER 2. PANELIZATION Figure 2.1: Bend element We use the iterative local/local planarization algorithm from [5]. Their method iterates over two local optimization steps. The first one fits a plane to the vertices in p̂k and the second one solves the plane equations for each vertex in a weighted least square manner. More formally, the first local optimization problem can be formulated as: X min (nk · qi + dk )2 nk ,dk vi ∈ p̂k (2.3) 2 s.t. ||nk ||L2 = 1, where qi denotes the solution for the vertices found by the previous iteration of the algorithm. Note that this problem is equivalent to Principal Component Analysis (PCA) where nk corresponds to the principal component with smallest Eigen Value (EV). The second local optimization problem can be defined as the following weighted least square problem for each vertex qi : X min µs · ||vi − qi ||2L2 + (1 − µs ) · (nk · qi + dk )2 , (2.4) qi k: qi ∈p̂k where µs is a parameter that in each step s controls how far we go into the direction of the solution to the plane equations while staying close to the input mesh. We start with µ0 = 1 and decrease its value with each step by a rate of r ∈ (0, 1), µs+1 = r · µs , which leads to visually more pleasing results. A solution to Eq. (2.4) can be found by solving the standard weighted least square system of equations: I(3) v T T I(3) N W · qi = I(3) N W i , N d 5 (2.5) 2.4. RESULTS & DISCUSSION CHAPTER 2. PANELIZATION with N = nTk k: qi ∈p̂ k d = dk k: qi ∈p̂ k µs · I(3) 0 W = 0 (1 − µs ) · I(|k : qi ∈ p̂k |) 2.4 (2.6) (2.7) (2.8) Results & Discussion We have summarized the pipeline of our approach again in Fig. 2.2 using a Semiramis island. In Table 2.1 we show results for different shapes. In general, the found shape looks visually appealing. However, there are a few points to note. First of all you notice that some planar surfaces are much larger than others. For example, in the cow the teat areas are much smaller than the belly areas. If the designer doesn’t want this, he could for example smooth the mesh at the teat area first. Generally, the designer cannot determine the minimum/maximum size or number of areas in advance with our tool. This is only possible to a certain extent indirectly by controlling τ and wB . For the same reason we cannot compare our algorithm with [2] and [3] at the moment, because they allow you to specify the number of clusters. Since our algorithm works directly on the input mesh, unwanted artifacts may also occur. For example, if you look very closely at the elephant’s neck, you can see that there is an area that consists of only one triangle. However, such artifacts could usually be corrected by mesh editing tools, such as an edge flip tool. Another challenge is to ensure that during optimization the triangles do not become singular or intersect themselves. Although we have a membrane energy in our target function, it is not always easy to find a compromise between the membrane energy weight and the bending energy weight. Singular triangles become especially problematic when trying to cluster the triangles because the triangle normals are no longer meaningful, and, thus, it is not clear to which cluster those triangles belong to. An artifact of this can be seen for example in the left leg of the elephant. In principle, however, this problem could also be solved by a mesh post edit process which removes the singular triangles. 2.5 Conclusion & Future Work In this chapter we have introduced a new approach to mesh simplification. Instead of formulating the problem as an NP-hard cluster problem like in [2] and [3], we only need to minimize a simple function and can use standard gradient methods. This makes our algorithm so fast that the designer gets immediate feedback when adjusting the parameters. From our shown results you can see that our approach is a promising way. The next step is to clarify how the choice of our parameters (τ and weights) affects the algorithm. Furthermore, we want to use mesh edit tools to help the algorithm to find better solutions. The last and most difficult task would be to make the algorithm sensitive to the given number and size of surfaces. 6 2.5. CONCLUSION & FUTURE WORK CHAPTER 2. PANELIZATION Figure 2.2: Pipeline 7 2.5. CONCLUSION & FUTURE WORK Original After Panelization CHAPTER 2. PANELIZATION After Planarization Table 2.1: The results strongly depend on the course of the sliders. However, in the results above we kept the sliders roughly the same during optimization with values around τ = 3.0e−6 , wB = 2.5e2 , wL2 = 1.5e−2 , wmembrane = 2.5e−2 . 8 Chapter 3 Shape Optimization 3.1 Introduction In the previous chapter, we presented a simplification algorithm that helps the architects to find a shape for the Semiramis islands that consists of planar surfaces on the one hand and is close to the architect’s sketch on the other. In this algorithm, however, we have not yet considered the geometric and structural conditions. The goal of the second part of this thesis was to optimize the simplified mesh so that it satisfies the following three constraints while staying close to the input mesh. First, due to the maximum load capacity of the robotic arms, that work in team to assemble the wood shell of the island, the wood panels of the shell shall not exceed a certain weight limit. This constraint translates into a maximum-area constraint as the material and height for the wood panels is fixed. Second, the glue line that holds the wood panels together is constrained by length because of financial reasons. The third constraint imposes a maximum bend load that can act on the joint between two panels. While the first two constraints are of pure geometric nature, the last constraint is a structural one that involves simulating a physical model of the island. Our approach is to obtain a solution shape by minimizing an objective function that has three penalty terms corresponding to the three constraints. In the following sections, we will first derive a formulation for the geometric penalty terms and then discuss the structural one including the physical model of the island. 3.2 3.2.1 Geometric Constraints Penalty Terms Maximum Area Constraint Let pk , k = 1 . . . Npoly , be the Npoly planar polygons of the input mesh, Min = SNpoly k=1 pk , as in the previous chapter. Moreover, let t ∈ pk denote the triangles that make up the planar polygon. If at is the area of a triangle t and amax is the maximum allowed area a planar polygon can have, then we can define our maximum- 9 3.2. GEOMETRIC CONSTRAINTS CHAPTER 3. SHAPE OPTIMIZATION area penalty term as follows: Npoly farea (M ) = warea · X fbarrier X at − amax , (3.1) t∈pk k=1 where warea is a weight and fbarrier is a one-sided quadratic barrier function: ( 0, x ≤ 0 fbarrier (x) = x2 , x > 0 (3.2) Maximum Glue Length Constraint For the maximum-glue-length constraint we use a very similar approach to the maximum-area constraint. We define eglue,j , j = 1 . . . Nglue , as the Nglue edges of the mesh that belong to the glue line, that is, the edges between the planar polygons pk . If we denote emax as the limit in length that the glue line can attain, we get the following penalty term for the maximum-glue-length constraint with weight wglue : fglue (M ) = wglue · fbarrier NX glue keglue,j kL2 − emax (3.3) j=1 Planarity The last geometric constraint enforces the triangles t ∈ pk to stay planar for k = 1 . . . Npoly . Let θb , b = 1 . . . NB , be the bend angle as defined in the previous chapter (see Fig. 2.1). Since we want the bend angle to be zero for all bend elements inside a polygon, the penalty term becomes: Npoly fplanar (M ) = wplanar · XX θb2 (3.4) k=1 b∈pk 3.2.2 Results In Fig. 3.1 we show the result of the optimization over: fpenalty = farea + fglue + fplanar (3.5) As input we took a Semiramis island (s. Fig. 3.1a) and set the limits to amax = 1.20m2 and emax = 109m which corresponds to a reduction by 10 percent and 5 in percent, respectively, from the initial maximum values ain max and emax of the input mesh Min . Those limits were chosen randomly with the only restriction to be near in to ain max and emax in order to get a solution that is not too far away from Min . From the graphs in Fig. 3.1b and Fig. 3.1c we can clearly see that by optimizing fpenalty we found a solution mesh (s. Fig. 3.1a) that fulfills both the area and glue constraint while the polygons stay visually planar. 10 3.2. GEOMETRIC CONSTRAINTS CHAPTER 3. SHAPE OPTIMIZATION (a) Semiramis island before and after optimization (b) Maximum area constraint (c) Maximum glue length constraint Figure 3.1: Maximum area and glue length optimization 11 3.3. STRUCTURAL CONSTRAINT 3.3 CHAPTER 3. SHAPE OPTIMIZATION Structural Constraint The structural penalty term is harder to compute than the geometric ones as it does not only depend on the rest shape u but also on the deformed (or material) state x of the mesh. Let f (x, u) be the penalty term for the maximum bend load constraint. Then, the minimization of f (x, u) is subject to yet another constraint that describes that x is in a static equilibrium: min f (x, u) u (3.6) s.t. g(x, u) = 0, where g(x, u) is the total force acting on each node inside the deformed mesh. Luckily, Sensitivity Analysis (SA) allows us to use standard gradient based methods on f (x, u) while satisfying g(x, u) = 0. In the following sections, we will first cover SA which will give us an overview of the terms that we have to compute. In particular, we will see that in each optimization step we need to find a solution for x that satisfies the static equilibrium. For that purpose, we will then continue the discussion with describing our physical model for the island. Finally, we will use this physical model to derive a penalty term for the maximum bending load constraint. 3.3.1 Sensitivity Analysis Sensitivity Analysis (SA) aims at solving an optimization problem like in Eq. (3.6) by using the Implicit Function Theorem: Theorem 3.3.1 (Implicit Function Theorem) Let g(x, u) be a continuously dif∂g (x, u) is invertible, then ferentiable function and (x, u) such that g(x, u) = 0. If ∂x there exists an open set U around u with a unique continuously differentiable function x(u) such that for all u ∈ U g(x(u), u) = 0. In SA, we call u control variables and x state variables. Note that for physical ∂g systems ∂x (x, u) corresponds to the Hessian of the energy in the system and is usually invertible for all u. Thus, by Theorem 3.3.1 we can assume that for every u there exists a continuously differentiable mapping u → x(u) such that g(x(u), u) = 0. In particular, this yields dg(x(u), u) ∂g ∂g = S+ ≡ 0, du ∂x ∂u (3.7) where S is called the sensitivity term: dx ∂g −1 ∂g S= =− du ∂x ∂u (3.8) Finally, we get df (x, u) ∂f dx ∂f = + du ∂x du ∂u ∂f ∂f = S+ ∂x ∂u 12 (3.9) (3.10) 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION For second-order methods such as Newton we also need the Hessian of f (x, u) with respect to u. Using standard differentiation rules we get (see [6] for a complete derivation): 2 ∂ ∂ 2f d2 f ∂f ∂ 2f T ∂ T ∂ f S S+ S +S + 2 = S+2· (3.11) du2 ∂x ∂x2 ∂x∂u ∂u |∂x {z ∂u } 3rd order tensors The authors of [6] also observed that in many cases one can approximate sonable well by ignoring the third-order tensors in Eq. (3.11): 2 2 2 2 b = ST ∂ f S + 2 · ST ∂ f + ∂ f ≈ d f H ∂x2 ∂x∂u ∂u2 du2 d2 f du2 rea- (3.12) b is positive definite and therefore does not require much regularization. Often, H In each step of SA we need to find x(u), that is, we need to find the static equilibrium of the Semiramis island under gravity. In the next section, we will discuss our physical model for the Semiramis island which gives us an energy term that we can minimize in order to find x(u). 3.3.2 Discrete Shell Model Physical Model In the following, we will derive a simplified physical model for the Semiramis islands. In Fig. 3.2 we can see a schematic cross section of an island. Note, since the plans for the installation of the soil and vegetation were unclear, we ignored these influences. Therefore, we were left to model the wood shell of the island consisting of planar wood panels glued together and a metal frame which goes along the rim of the wood shell. Moreover, as the characteristics of the glue were unknown, we modelled the wood shell as one block of wood. The wood shell consists of wood panels that are rather thin at a thickness of 8cm compared to their maximum area of 1.226m2 . There are two major approaches to model thin shells. The first one is called Solid Shells (SoS) [7] and the second one Discrete Shells (DcS) [8]. We decided to work with DcS as it is a substantial simpler method than SoS but still leads to similar results (see Section 3.3.3 for a discussion). In addition, due to its simplicity, DcS requires fewer computing resources and, thus, accelerates optimization. DcS introduces a triangle membrane energy WM that reacts to stretch and shear forces and a flexural energy WF defined on bend elements (see Fig. 2.1) that models the bending behavior of our material. To give a motivation for those energies, let us first look at a flat beam (see Fig. 3.3a) with a thickness Θ = 2 · h. If the beam does not exhibit any bending stiffness, the easiest way to model the beam would be by a chain of springs that only accounts for stretching (see Fig. 3.3b). We could also extend the simple spring chain by adding interlocking springs which results in bending stiffness (see Fig. 3.3c). This approach is commonly used to model thin plates, for example clothes, and only works for surfaces that are flat in their rest position because the springs ignore the sign of the bend angle θ (see Fig. 3.3d). Nevertheless, we used that approach for our metal frame since the high bending 13 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION Figure 3.2: Island stiffness of metal leads to very little deformation and thus avoids a jump through from θ to −θ. Springs are simple to implement but with this simplicity comes a great loss in accuracy. We will now derive an energy stored in the beam as a function of its displacement. Since this energy is physically grounded, the simulation will match reality more precisely. Let us look at the deformed beam as shown in Fig. 3.4a. The beam is divided into three bend elements consisting each of two adjacent edges. We are interested in the strain x (z) = l(z) − l0 (z) , l0 (z) (3.13) where l is the length of the bend element at height z (see Fig. 3.4b). Given the strain, we can compute the energy in the beam using Hooke’s law. Hooke’s law describes the following linear relationship between stress and strain: σx νσy − E E σy νσx ∗ y = − = 0, E E x = (3.14) (3.15) where E is the Young Modulus and ν the Poisson ratio. (∗) Here we assume that the depth of the beam does not change under load and, thus, we can set the lateral strain y to zero. Furthermore, we do not consider z because in our model the thickness of the beam stays constant during bending. Under these assumptions, we 14 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION (a) Beam rest position (b) Beam modeled with springs (c) Beam modeled with interlocking springs (d) Angle problem with spring model Figure 3.3: Beam model 15 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION get: (1 − ν 2 )σx E Ex σx = 1 − ν2 x = Finally, the energy within a bend element is given by: Z Z h 1 el σx x dzdA, E = A −h 2 (3.16) (3.17) (3.18) where A is the area of the bend element which is constant along the z-axis for a flat beam. We will now derive an expression for x (z) that we can insert into Eq. (3.18) which will yield the formula for the popular bend energy. The curvature within a bend element can be described by κ(z) = d2 w θ ≈ , l(z) dx2 (3.19) where l is the length and θ the bend angle of the bend element (see Fig. 3.4a) and w is as in Fig. 3.4b. Since l(z) 1 = κ(z) θ l(z) = θ · r(z) r(z) = (3.20) (3.21) and the rest length l0 (z) for a flat beam is constant along z-axis, l0 (z) = l00 , (3.22) we get (r0 + z) · θ − l0 (z) l0 (z) 0 l + z · θ − l00 = l00 l0 − l00 θ = +z· 0 0 l0 l0 0 0 l − l0 + z · κ0 = 0 l0 = M + B (z), x (z) = (3.23) (3.24) (3.25) (3.26) (3.27) where M is the membrane strain and B the bend strain. Combining this result 16 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION with Eq. (3.18) yields: Z Z el h E = A −h Z h 1 σx x dzdA 2 E2x dzdA 2 A −h 2 · (1 − ν ) 2 2 Z Z h E M + z · ddxw2 dzdA = 2 · (1 − ν 2 ) A −h 2 2 Z Z h E dw 2 = WM + · z · dzdA 2 2 · (1 − ν ) A −h dx2 Z h Z 2 2 E dw 2 = WM + · z dz · dA 2 2 · (1 − ν ) −h dx2 A Z 2 2 E (2h)3 dw = WM + · dA 2 2 · (1 − ν ) 12 A dx2 Z 2 2 dw D dA = WM + 2 A dx2 = WM + WB , Z = (3.28) (3.29) (3.30) (3.31) (3.32) (3.33) (3.34) (3.35) where D is the flexural rigidity: D= E · (2h)3 , 12(1 − ν 2 ) (3.36) We have now derived the energy for a beam bend element (see [9, equation 6.93] for a more general formula). The discrete shell energy is not much different from Eq. (3.35). In fact, it assumes that each bend element within the mesh behaves like a beam but defines the membrane energy on triangles unlike the bend energy, which is indeed defined on bend elements. We will now have a closer look on how to compute the bend energy from a bend element and on the membrane energy imposed on triangles. Bend Energy Let us consider a bend element b as shown in Fig. 2.1. In order to compute the curvature of the bend element, we do not only need the bend angle θb but also the length of the bend element lb . One way to define lb is by setting it equal to the average over line segments l(s) each associated to a point s on the hinge edge eb = (A, B) (A,B as in Fig. 2.1). Z 1 l(s)ds (3.37) lb := keb k eb ab = , (3.38) 3 · keb k where ab denotes the area of the bend element. How we define ab is again up to us. A common choice, however, is the diamond region around the hinge of the bend 17 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION (a) Bend element in a deformed beam (b) Bend element in a deformed beam with local coordinate system Figure 3.4: Geometric constructions for the bend element 18 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION element: ab = atb,1 + atb,2 3 (3.39) Finally, given θb and lb , we can compute the curvature κb of the bend element: κb = 3 · keb,0 k · (θb − θb,0 ) θb − θb,0 = lb,0 ab,0 (3.40) Note that using ∆θb = θb − θb,0 in the curvature corresponds to a flat beam with bend angle ∆θb . This simplification is only valid for thin shells as with non-zero rest bend angle, the assumption that lb,0 is constant along the z-axis is violated otherwise. We have now all terms to compute the bend energy: Z 2 2 D dw b WB = dA (3.41) 2 A dx2 D (3.42) ≈ · ab,0 · κ2b 2 D 3 · keb,0 k2 · (θb − θb,0 )2 = · , (3.43) 2 ab,0 Membrane Energy We use the Saint Venant–Kirchhoff (StVK) material model with strain energy density function WStVK (E) = λ [tr(E)]2 + µtr(E 2 ), 2 (3.44) where (λ, µ) are the Lamé constants and E is a strain tensor. In our model we use the non-linear Green strain: 1 E = (F T F − I), (3.45) 2 where F is the deformation gradient that maps material vectors to their spatial counterpart. dx = F dX (3.46) Note that the material vectors are two dimensional while the spatial vectors are three dimensional. We will now derive an expression for F analytically: Let Bi , i = 1 . . . 3, be the linear basis functions defined on the triangle t0 = (X1 , X2 , X3 ) in material space. Then, we can express each point x inside the corresponding deformed triangle t = (x1 , x2 , x3 ) as a function of material coordinates: x(X) = x1 · B1 (X) + x2 · B2 (X) + x3 · B3 (X) (3.47) The deformation gradient will then be: F = dB1 (X) dB2 (X) dB3 (X) dx(X) = x1 · + x2 · + x3 · dX dX dX dX 19 (3.48) 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION Parameter Value E (Young modulus) ν (Poisson ratio) ρ (density) Θ (thickness) 4.0e8 GPa 0.2 0.5e3 kg / m3 0.08 m Table 3.1: Wood material parameters Note that the sum of the basis functions has to be one. Therefore, we get the following relationships between the basis function gradients: B1 (X) + B2 (X) + B3 (X) = 1 dB1 (X) dB2 (X) dB3 (X) + + =0 dX dX dX dB1 (X) dB2 (X) dB3 (X) =− − dX dX dX (3.49) (3.50) (3.51) Let us define et,i , i = 1 . . . 3, as the edge opposite to xi in triangle t. Furthermore, let us denote hi as the shortest distance from xi to et,i . Based on the definition of linear triangle basis functions, we then get the following relationships: ||∇Bi ||L2 hi = 1 ∇Bi = e⊥ t,i ||e⊥ t,i ||h (3.52) = e⊥ t,i 2at , (3.53) where e⊥ t,i denotes the vector orthogonal to et,i and with length ket,i k. Finally, this allows us to compute F as follows: " # T dB2 (X) F = x2 − x1 x3 − x1 dBdX(X) T (3.54) 3 dX 3.3.3 Comparison between Discrete and Solid Shell Model For all our simulations we use the material parameters as shown in Table 3.1. As we can see from Fig. 3.5, the discrete shell model has a similar static solution as the solid shell model. However, the discrete shell model seems to overestimate the stresses, in particular, at the joints between two panels. This error could come from the fact that the panels are not extremely thin at a height of 8 cm and, thus, could potentially violate the assumption of the discrete shell model that, at rest shape, the bend length is constant across the z-axis. 3.3.4 Maximum Bending Load Constraint The maximum bending load constraint enforces an upper tension limit on the joints between two panels based on the glue characteristics. Because the stresses take on their extrema at the surface of the wood shell, we have to look at the top and bottom 20 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION (a) Bend stresses at the outer surface of the (b) Bend stresses at the outer surface of the shell as found by DcS, bottom view shell as found by SoS, bottom view (c) Bend stresses at the outer surface of the (d) Bend stresses at the outer surface of the shell as found by DcS, top view shell as found by SoS, top view (e) Comparing bend stresses for planes (foreground DcS) (f) Color map for bend stresses Figure 3.5: Comparison between DcS and SoS 21 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION bend stresses. From Eq. (3.17) and Eq. (3.27) we get the following formulation for these bend stresses for each bend element b: lb − lb,0 lb,0 = h · κb b,M = (3.55) hb,B (3.56) −h b,B = −h · κb E σbh = · (b,M + hb,B ) 1 − ν2 E σb−h = · (b,M + −h b,B ) 1 − ν2 The penalty term is then very similar to the geometric ones: X fbend (M ) = fbarrier (σbh − σmax ) + fbarrier (σb−h − σmax ), (3.57) (3.58) (3.59) (3.60) b where σmax denotes the maximum bending load that the glue can handle. 3.3.5 Results We used the material parameters as listed in Table 3.1. Furthermore, it is important to note that we parametrize the high resolution mesh with a low resolution mesh that we already used for minimizing the area and glue penalty. In Fig. 3.6 we show the results for only minimizing fbend + fplanar . As we can see, the maximum bend stress is greatly reduced. However, it is also important to note that not all bend stresses fall below σmax , or only very slowly with a lot of deformation. There are multiple reasons why a few triangles could stay above the stress limit. First, this problem could be related to issues with the high resolution input mesh (either the resolution is too low or the triangulation is not nice). Second, the problem could origin from violations of the discrete shell assumptions. Lastly, the fplanar penalty term could hinder the algorithm to optimize fbend further. In our second experiment (see Fig. 3.7 and Fig. 3.8) we minimized all penalty terms: fpenalty = farea + fglue + fplanar + fbend (3.61) We can find a solution that satisfies the area and glue constraint, but some bend stresses stay above σmax as in our previous experiment. However, it is still very good to see that for most bend elements the bend stress seems to decrease by a lot. This, ultimately, enables the designer to find a shape that is structurally more stable while satisfying the area and glue constraint. 3.3.6 A Note on Compression Only Shells It would be very desirable if we did not have to rely on the glue. However, this would mean that our wooden shell would only experience compression forces. Especially for vaults this is a big issue. A summary of research in this area can be found here [10]. In particular, we want to highlight [11] which tries to find a compression-only 22 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION (a) Maximum bend stress relative to σmax be- (b) Maximum bend stress relative to σmax durfore optimization (red = bend stress is exceed- ing optimization ing σmax ) (c) Maximum bend stress relative to σmax after optimization (d) Maximum bend stress constraint Figure 3.6: Maximum bend stress optimization 23 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION (a) Area and Glue (b) Area and Glue (c) Maximum Bend Stress relative to limit (d) Maximum Bend Stress relative to limit (e) Maximum Bend Stress (f) Maximum Bend Stress (g) Bend stress at outer surface, bottom view (h) Bend stress at outer surface, bottom view Figure 3.7: Optimization over all penalty terms. Semiramis island before (left) and after (right) optimization. 24 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION (a) area (b) glue (c) maximum bend stress Figure 3.8: Simultaneous minimization of area, glue and maximum bend stress penalty. 25 3.3. STRUCTURAL CONSTRAINT CHAPTER 3. SHAPE OPTIMIZATION masonry model while minimizing the distance to a target structure. This paper is inspired by Graphic Statics which concerns about finding a compression only structure using graphical methods (which is equivalent to solving a linear program). Unfortunately, we could not use their approach in our case, because the Semiramis islands open up to the top. This detail makes our problem much more difficult compared to conventional vaults. We have also tried to find a compression-only structures using Sensitivity Analysis. We observed that for compression only structures the tensile traction forces for each triangle must be compression forces. We can compute those tensile traction forces as follows. First, we need the Cauchy stress tensor: σ= ∂WStVK ∂E (3.62) Then, the tensile traction force t(nt,i ) corresponding to edge normal nt,i , i = 1 . . . 3, of triangle t can be determined as follows: t(nt,i ) = nTt,i σt nt,i (3.63) Note that for implementation purposes it is more convenient to compute the same quantity using the second Piola-Kirchhoff stress tensor instead. We can then optimize the following function: fcompression = 3 XX t fbarrier (t(nt,i )) (3.64) i=1 We found that this approach works on some cases. For example, we found a compression only shell for a dome using this technique (see Fig. 3.9). However, while it worked well in this example, generally, the approach is not guaranteed to find a compression only structure. One major problem is that there does not always exist a smooth transition from a configuration in tension to a configuration in compression. For example, using a force diagram, it is easy to see that two beams are much more stable in a tilted configuration than if the two beams are horizontally aligned. At last, we were not able to find a compression only structure for the Semiramis islands using this approach. However, it would be interesting to further explore the possibilities of SA in this area. For example, while we optimized over all nodes of the input mesh it might be compelling to optimize in a smaller search space by parametrizing the mesh with only a few parameters. 26 3.3. STRUCTURAL CONSTRAINT (a) before optimization CHAPTER 3. SHAPE OPTIMIZATION (b) during optimization (c) after optimization Figure 3.9: Using Sensitivity Analysis to find a compression only shell for a dome. Green = compression, red = tension. 27 Chapter 4 Conclusion The architects wanted a tool that would allow them to find a shape for the Semiramis islands through inverse design. The difficulty was to find a form for the islands that would come close to the architect’s vision, but would consist of planar surfaces, since the islands are assembled from wooden panels, and had to satisfy several geometrical and structural constraints. Initially, it was planned to find this shape by means of a simultaneous optimization across all these objectives. Due to the complexity of this problem, we then decided to approach the problem in two steps. First, we wanted to find a shape that consists of planar polygons and comes close to a smooth target mesh designed by the architect. For this purpose we developed a new method that allows the architect to interactively find a simplified form of the target mesh. In a second step, the simplified mesh should be optimized to meet the geometrical and structural requirements. Especially the structural constraint was a challenge because we had to optimize the mesh based on the observation of the island in the static equilibrium. This meant that we needed a physical model of the Semiramis islands. For this purpose, we implemented a finite element simulation with discrete shells to find the static equilibrium of the islands. Finally, we formulated a penalty term for all constraints and were able to minimize them using sensitivity analysis. We successfully showed that our optimization leads to a shape that meets all geometrical constraints and is structurally more stable at the same time. In a next step, our Rhino plugin has to be finalized to make our tools accessible for the architects. 28 Appendix A Further Notes & Figures A.1 Implementation Details Our implementation is mainly based on Python. Python is often considered slow because it is an interpreted programming language. However, it is often forgotten that there are new technologies that can be used to significantly accelerate Python code. In this thesis we have worked with Numba, for example. The developers of Numba describe their library as an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. Numba even allows you to write CUDA code with Python, which has greatly accelerated the development of our finite element GPU framework. We generated the gradients and second-order tensors using Maple. Maple is a leading software for symbolic calculations and can convert symbolic expressions into code. For the visualization of our results we developed a small 3D-plot library for Jupyter notebooks. There are already many 3D-plot libraries for the Jupyter notebook environment, but they are limited to visualizations only and do not allow any interaction with the displayed mesh. To the best of our knowledge our 3D plotting library is the first one for Jupyter notebooks which allows you to move nodes in the mesh. The library is mainly based on pythreejs, a python wrapper around the popular ThreeJS JavaScript library. However, our library is far from being published. The main reason is that at the moment we have to send the whole mesh back and forth between client and server for all interactions. The reason is that Jupyter Widgets are limited in their fundamental function when it comes to interactions that only take place on the client side. A bright spot, however, is the PyIodide project, which allows Python to run in a browser using WebAssembly. With this technology it would be possible in the future to make mesh interactions much more data efficient. To make our algorithms accessible to architects, we also had to implement a Python-Rhino plugin. Since the Python environment in Rhino allows only limited functionality, we had to make our tools accessible through a server. Therefore we wrote a small message library which allows to exchange data between client and server via the UDP protocol. 29 A.2. FIGURES A.2 APPENDIX A. FURTHER NOTES & FIGURES Figures Figure A.1: Vegetale 30 Bibliography 1. Garland, M. & Heckbert, P. S. Surface Simplification Using Quadric Error Metrics in Proceedings of the 24th Annual Conference on Computer Graphics and Interactive Techniques (ACM Press/Addison-Wesley Publishing Co., USA, 1997), 209–216. isbn: 0897918967. https : / / doi . org / 10 . 1145 / 258734 . 258849. 2. Cohen-Steiner, D., Alliez, P. & Desbrun, M. Variational Shape Approximation. ACM Trans. Graph. 23, 905–914. issn: 0730-0301. https://doi.org/10. 1145/1015706.1015817 (Aug. 2004). 3. Chen, D., Sitthi-amorn, P., Lan, J. T. & Matusik, W. Computing and Fabricating Multiplanar Models. Computer Graphics Forum 32, 305–315. eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1111/cgf.12050. https: //onlinelibrary.wiley.com/doi/abs/10.1111/cgf.12050 (2013). 4. Poranne, R., Tarini, M., Huber, S., Panozzo, D. & Sorkine-Hornung, O. Autocuts: Simultaneous Distortion and Cut Optimization for UV Mapping. ACM Trans. Graph. 36. issn: 0730-0301. https://doi.org/10.1145/3130800. 3130845 (Nov. 2017). 5. Poranne, R., Ovreiu, E. & Gotsman, C. Interactive Planarization and Optimization of 3D Meshes. Computer Graphics Forum 32, 152–163. eprint: https: / / onlinelibrary . wiley . com / doi / pdf / 10 . 1111 / cgf . 12005. https : //onlinelibrary.wiley.com/doi/abs/10.1111/cgf.12005 (2013). 6. Zimmermann, S., Poranne, R. & Coros, S. Optimal control via second order sensitivity analysis 2019. arXiv: 1905.08534 [math.OC]. 7. Hauptmann, R. & Schweizerhof, K. A systematic development of ‘solid-shell’ element formulations for linear and non-linear analyses employing only displacement degrees of freedom. International Journal for Numerical Methods in Engineering 42, 49–69. eprint: https://onlinelibrary.wiley.com/doi/pdf/ 10.1002/%28SICI%291097- 0207%2819980515%2942%3A1%3C49%3A%3AAIDNME349%3E3.0.CO%3B2-2. https://onlinelibrary.wiley.com/doi/abs/ 10.1002/%28SICI%291097- 0207%2819980515%2942%3A1%3C49%3A%3AAIDNME349%3E3.0.CO%3B2-2 (1998). 8. Grinspun, E., Hirani, A. N., Desbrun, M. & Schröder, P. Discrete Shells in Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation (Eurographics Association, San Diego, California, 2003), 62– 67. isbn: 1581136595. 9. Audoly, B. & Pomeau, Y. in, Oxford University Press (Jan. 2008). 31 BIBLIOGRAPHY BIBLIOGRAPHY 10. Adriaenssens, S., Block, P., Veenendaal, D. & Williams, C. Shell Structures for Architecture: Form Finding and Optimization isbn: 9780415840590 (Jan. 2014). 11. Panozzo, D., Block, P. & Sorkine-Hornung, O. Designing Unreinforced Masonry Models. ACM Trans. Graph. 32. issn: 0730-0301. https://doi.org/10.1145/ 2461912.2461958 (July 2013). 32