Monday, April 25, 2016

ARCH 653 - Project 2: Geodesic Domes in Dynamo


Fig. 1 - 4v, 8v, and 16v frequency parametric geodome
 
This exercise can be considered as part 2 of "ARCH 653 - Project 1: Modeling Parametric Geodesic Domes in Revit Using Eden Project As An Example". I will explain how to model a similar geodome (geodesic dome) to the one used Project 1, but this time we will be using coding and visual programming in Dynamo. Also, I will be showing some useful parametric controls using the powerful features of Dynamo.


Step 1: Modeling a geodome through coding 

The same concepts from Project 1 were used in writing the code for modeling a geodome in Dynamo. The method used in this step was first developed by Vikram Subbaiah from Dynamo Community Forums at http://dynamobim.org/forums/forum/dyn/. I posted the complete code for modeling a 4v geodome below with documentation in green color to explain the details:


//The first step is to create an icosahedron. The variable R is used to define the radius, and it can have a value controlled by an Integer Slider:
r=R-(R*0.001);
rad=(r/Math.Sin(72))/(2*Math.Sin(36));
theta=List.DropEveryNthItem(0..396..36,2,0..1);
p1=Point.BySphericalCoordinates(CoordinateSystem.Identity(),90-Math.Atan(0.5),theta[0],rad);
p2=Point.BySphericalCoordinates(CoordinateSystem.Identity(),90-Math.Atan(-0.5),theta[1],rad);
g1=List.Flatten(List.AddItemToEnd(Point.ByCoordinates(0,0,r)<1>,(List.DropItems(List.Sublists(p1,0..1,1),-1))<2>),1);
g2=List.Flatten(List.AddItemToEnd(Point.ByCoordinates(0,0,-r)<1>,(List.DropItems(List.Sublists(p2,0..1,1),-1))<2>),1);
g3=Flatten(Transpose({List.DropItems(List.Sublists(p1,0..1,1),-1),List.DropItems(p2,-1)})<1>);
g4=Flatten(Transpose({List.DropItems(List.Sublists(p2,0..1,1),-1),List.DropItems(p1,1)})<1>);
s1=Surface.ByPerimeterPoints(List.Flatten({g1,g2,g3,g4},1));
Fig. 2 - Icosahedron

//We will now make a sphere that also uses the variable R. The idea is to inscribe the icosahedron inside the sphere:
sp=PolySurface.BySolid(Sphere.ByCenterPointRadius(Point.Origin(),R));
Fig. 3 - Sphere

//This is a very important step. It is the triangulation function that will divide the triangles of the icosahedron into additional triangles. It is a good idea to place this in a separate Code Block as a Function:
def tri(sur:var)
{
c1=sur.PerimeterCurves();
p1=c1.PointAtParameter(0);
p2=c1.PointAtParameter(0.5);
s1=Surface.ByPerimeterPoints({p1[0],p2[0],p2[2]});
s2=Surface.ByPerimeterPoints({p1[1],p2[1],p2[0]});
3=Surface.ByPerimeterPoints({p1[2],p2[2],p2[1]});
s4=Surface.ByPerimeterPoints({p2[0],p2[1],p2[2]});
return={s1,s2,s3,s4};
};

//Once we have our triangulation function set up, we can triangulate the icosahedron
s2=tri(Flatten(tri(s1)));
c1=s2.PerimeterCurves();
Fig. 4 - Triangulation

//Then we can get the points at each vertex:
p3=c1.PointAtParameter(0);
Fig. 5 - Triangulation points

//Now we can project the points on the surface of the sphere:
p4=Flatten((p3.Project(sp,Vector.ByTwoPoints(Point.Origin(),p3)))<1><2>);
Fig. 6 - Projection of the points on the sphere

//To create a geosphere, all we need to do is to make triangle surfaces out of the projected points:
s3=Surface.ByPerimeterPoints(p4);
Fig. 7 - Geosphere

//The final step is to turn the geosphere into a geodome:
h1=Flatten(List.FilterByBoolMask(s3,s3.PointAtParameter(0.5,0.5).Z<0)<1>)[1];
Fig. 8 - Geodome


We can make a simple adjustment to the code to make a 8v or a 16v frequency dome. The idea is to use the same recursive process illustrated in Project 1. To make a 8v frequency dome, simply replace this portion of the code:
s2=tri(Flatten(tri(s1)));
With this:
s2=tri(Flatten(tri(Flatten(tri(s1)))));
This concept can also be applied to make 18v frequency or higher frequency dome.


Step 2: Placing custom Adaptive Component panels on the geodome

It would be very useful to automatically place triangular Adaptive Components representing panels throughout surface on the geodome. The design of the panels can be changed as a Revit Family file and their size and number will automatically update based on the radius (R) or the frequency (#v) of our geodome in Dynamo. This can be done by first getting the vertex points of each triangle in the geodome by using the Face.Vertices and the Vertex.PointGeometry Nodes in Dynamo. Once we do that, we can load our Adaptive Components from Revit into Dynamo using the Family Types and AdaptiveComponent.ByPoints Nodes. This step is illustrated in (Fig.10).


Fig. 9 - Adaptive Component panel in Revit with three Adaptive Points

Fig. 10 - Placing panels on the geodome using Dynamo


Step 3: Changing the color of each panel based on the sun's direction

I will briefly explain how we can color the geodome's triangle panels based on the sun's direction. We can get the Normal vector of each triangle panel by first getting the centroid point of each panel, then we can use the Surface.NormalAtPoint Node in Dynamo. If we have the sun direction, we can use the product of the sun direction vector and each triangle panel Normal vector for coloring each panel differently. This step is further illustrated in (Fig.11). 

 
Fig. 11 - Panel color based on sun direction

(Fig.12) below shows how the final result looks in Revit. There is still room for improvement, such as using conditional statements (IF,ELSE) to control the geodome through coding, adding structural beams using the BeamByCurve Node, or improving the coloring consistency. But for know, I hope that we all learned something that could help our future geodesic endeavors!


Fig. 12 - Final result in Revit

Here is a video explaining the process:








Tuesday, March 22, 2016

ARCH 653 - Project 1: Modeling Parametric Geodesic Domes in Revit Using Eden Project As An Example

Fig. 1 - Eden Project

Eden Project is often considered the largest greenhouse complex in the world, and exhibits over one million plants to promote issues of sustainability. It is located in a former 14 hectare (35 acre) clay pit in Cornwall, England. The complex's main feature is 8 interlinked geodesic domes with steel hexagonal modules clad in double skin ETFE panels.


Here is additional information about the building:

  • The Eden Project website: www.edenproject.com 
  • Cost: GBP £72,300,000
  • Architect: Grimshaw
  • Floor area: 31,457 m²
  • Total surface area: 39,540 m²
  • Total length off all beams: 36,000 m  
  • Biggest hexagon area: 80 m² at a span of 11 m 
  • Biggest dome diameter (dome B)  125 m

In this exercise, I will try my best to explain how to model a parametric model of Eden Project in Revit. I hope to illustrate the methods and challenges of modeling mathematically correct geodesic structures using this software tool, and share what I learned from this experience.



Step 1: How to model a geodesic sphere 

The first step towards modeling an accurate parametric geodesic dome in Revit is to understand the basic geometric concepts of geodesic spheres. Iwan Peverett and George Mokhtar from BIM Academy did an exercise to build a geodesic dome in Revit, and noted that it was a somewhat difficult task. They shared their results in Northumbria University's website at http://collab.northumbria.ac.uk/bim2/geodesic-dome/. Another good source is Andres Dieckmann's excellent six part video tutorial from CAAD TV (https://www.youtube.com/playlist?list=PL6B657D3112B10639) on how to model 2v and 4v frequency geodesic spheres (I will explain more about frequencies down below). Both of these examples used Revit Adaptive Families in their workflows, and this is similar to the method used for this project.

Fig. 2 - Icosahedron

In general, a geodesic dome is based on an icosahedron, which is a polyhedron with 20 equilateral triangle faces. For more information about polyhedrons, you can visit https://en.wikipedia.org/wiki/Icosahedron. The basic geodesic sphere is an icosahedron inscribed in a hypothetical sphere, with each triangle vertex touching the surface of the hypothetical sphere. Each face of an icosahedron can be subdivided into additional triangles with the additional vertices touching the hypothetical sphere's surface, and this will increase the 'frequency' of the geodesic sphere. For example, an icosahedron that has each triangular face subdivided into 4 triangles (2 triangles on each side) is called a 2v frequency geodesic sphere. An 8v frequency geodesic sphere would have each icosahedron triangle face subdivided into a total of 64 triangles.



Step 2: Parametric icosahedron

After understanding the basic concepts of geodesic spheres, in order to create Eden Project's domes in Revit, the next step is to model a parametric icosahedron. An icosahedron can be modeled by creating a golden ratio rectangle as a Revit Family (.rfa). An important Parameter to create is 'sphere radius', which will control the radius of the geodesic sphere. The width and length of the golden ration rectangle will be driven by an equation that includes the 'sphere radius' Parameter.

Fig. 3 - Golden section rectangle


Fig. 4 - Golden section rectangle Parameters

Once the rectangle is completed, it can be loaded in a new .rfa file, which will become the 'Geodesic Dome' .rfa file. The golden ratio rectangle instances are then placed in the configuration showed in (Fig.5) in order to model the icosahedron. Parameters that can control the rotation of the shape can also be added to rotate the parametric geodesic sphere later.

Fig. 5 - 'Geodesic Dome' .rfa file 

The final and most important part in creating the icosahedron is modeling the triangle faces. These faces will be an Adaptive Family.rfa file, which we will call 'Triangle Segment'.  The 'Triangle Segment' file has 4 Adaptive Points; 3 for the vertices of the icosahedron triangle face, and 1 for the center of the icosahedron/sphere. After placing the points, we must create another 'sphere radius' Parameter in the .rfa file. Once a triangle is drawn connecting the first 3 adaptive points, the 'Triangle Segment' can be loaded in the 'Geodesic Dome' .rfa file. The final step is to connect the first 3 adaptive points to the vertices of the shape in (Fig.5), and connect the 4th Adaptive point to the center.

 
Fig. 6 - 'Triangle Segment' Adaptive Family



Fig. 7 - Parametric icosahedron


Step 3: Geodesic subdivision

This is the interesting part. This step starts with making a .rfa file copy of the 'Triangle Segment', and then we can subdivide the triangle edges and create reference points. These reference points will have their Offset values set to the Parameter 'sphere radius'. The easiest way to start this process is to make a 2v frequency subdivision, then following a recursive process, we can make a copy of the 2v frequency .rfa file, and then load the 2v file into the copy, which then becomes a 4v frequency subdivision. If this process is repeated again, we will get an 8v segment. Each frequency created can then be loaded into the 'Geodesic Dome' .rfa file. Once we loaded all the frequencies required, we can select all instances of the 'Triangle Segment', and replace them with any frequency. The 'sphere radius' parameter should flex with all the geodesic variations selected.

Fig. 8 - 2v sphere
 

Fig. 9 - 4v sphere
 

Fig. 10 - 8v sphere

For the purpose of this exercise, the frequency required for Eden Project is 9v, which is based on a 3v subdivision. In my initial attempts, I used an 8v geodesic sphere which was quite a big mistake, as it cannot carry the same hexagonal pattern in Eden Project's geodesic domes. However, if the architectural project you are modeling consists of geodesic domes with only triangle segments, then the difference between 8v or 9v will not have a large visual impact.

Fig. 11 - 9v geodesic projection



Step 4: Creating Eden Project's hexagonal dome

Fig. 12 - Eden Project's hexagonal structure


As implied by Step 3, Eden Project's geodesic domes are mostly 9v. If we imagine an Eden Project dome as an icosahedron, which then had each triangle face divided into a 9v subdivision, then there will be a pentagon on each icosahedron vertex, and the rest of the triangles will form hexagons throughout the geodesic surface. This is the basic concept of the structural pattern of Eden Project's domes. Once we have the 9v 'Geodesic Dome' in Revit, we can create Adaptive .rfa files of a hexagon and a pentagon panel with a parametric frame and glazing, then load these Families to the 'Geodesic Dome' .rfa file, and place them on the vertices of the 9v sphere where they are needed. This is potentially a time consuming process, so it is a good idea to go to "Manage" and click "Snaps" on Revit's ribbon to make things easier when placing the Adaptive Points.

Fig. 13 - Hexagon panel Adaptive Family


Fig. 14 - Placement of the panels on the 9v sphere


The resulting file is a 9v geodesic sphere just like the one in Eden Project, and we can control the following parameters of the dome:
  • Dome radius
  • Dome rotation
  • Hexagon panel frame size and materials
  • Pentagon panel frame size and materials

Fig. 15 - Parametric geodesic sphere


Changing any Parameter should flex the model properly at this point.



Step 5: Multiple parametric instances of the domes

Eden Project has 8 domes: A, B, C, D, E, F, G, and H. The diagram in (Fig.16) shows the sizes and layout of the domes. We can load our 'Geodesic Dome' into a Conceptual Mass .rfa file, and copy multiple instances of the dome and position them as shown in the diagram.

Fig. 16 - Eden Project diagram

Since we set our most important Parameter 'sphere radius' as an Instance Parameter, we can link this Parameter for each instance to a corresponding sphere radius Parameter, such as 'sphere radius A' for dome A. This is so we can size each dome to the appropriate size just as in Eden Project. Once we have the domes set to proper scale and position, we are ready to move on to the final step.


Fig. 17 - Top view of dome instances in Revit


Fig. 18 - Side view of dome instances in Revit



Step 6: Loading the file into a Revit Project file, and closing remarks

Here are some images showing the file loaded in a Revit Project file with some renderings.


Fig. 19 - Revit Project File

Fig. 20 - Exterior render

Fig. 21 - Interior render

Revit still has limitations in modeling accurate geodesic structures. Similar to previous attempts, the only way I found to model a proper representation of a geodesic dome in Revit is through the use of Adaptive Families. One major issue I found with Adaptive Families is that they cannot be cut with solids/voids as non-Adaptive Families. (Fig.22) shows the cuts in the Adaptive hexagon panels which do not show when loaded into another Family. In conclusion, I hope that this exercise will provide some insight and room for improvement.

Fig. 22 - Adaptive Family instance cuts only show in placement Family


Here is a video explaining the process: