SS 2015 22800 Advanced Associative and Algorithmic Design
Fluid Formfinding Process spatial organisation by electric fields
Course Name: Advanced Associative and Algorithmic Design Course Number: Course Number 22800 Term/Year: Summer Term 2015 Examination Number: 22801 Examiner Number: 02442 Tutors: Prof. Achim Menges 01, Ehsan Baharlou 02 Institute: Institute for Computational Design
Philipp Siedler Alan RodrĂguez Carrillo
1
Fluid Formfinding Process spatial organisation by electric fields
Course Name: Advanced Associative and Algorithmic Design Course Number: Course Number 22800 Term/Year: Summer Term 2015 Examination Number: 22801 Examiner Number: 02442 Tutors: Prof. Achim Menges 01, Ehsan Baharlou 02 Institute: Institute for Computational Design
Philipp Siedler Alan RodrĂguez Carrillo
2
3
Contents Chapter 01: Project Description_____Page 05 Chapter 02: Concept_____Page 09 Chapter 03: Python Code_____Page 15 Chapter 04: Grasshopper Embedding_____Page 21 Chapter 05: Project Renderings_____Page 25 Chapter 06: References_____Page 33
4
5
Chapter 01
6
CHAPTER 01
FIGURE 01: First sketches. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
FINAL PROJECT OBJECTIVES
The purpose of this assignment is for you to create a working, readable python script with comments. Demonstrate your understanding and application of computational design techniques and design thinking skills developed in class. Test an interesting computational idea that goes beyond stadard parametric modeling practices to experiment with complex geometric form, generative design, representation and simulation. Create dynamic spatial, biological or architectural effects that utilize multi-variant system design constraints. Show intelegent, controlled design with developed scripts. Try to create an project that is greater than the sum of its parts. The result should not be obvious what computational techniques were used but rather develop strategies that are more explorative or combinatorial.
CHAPTER 01
FIGURE 02: Sketched out renderings. (Source: Philipp Siedler, Alan Rodríguez Carrillo)
PROJECT IDEA
The main idea of the project “Fluid Formfinding Process - spacial organisation by electric fields” is to develop a form finding process with electric fields. A field is beeing generated by positiv and negativ magnetic forces. Field lines are beeing used to display the magnetic field and stream around the intended spaces. This spatial system is able to adept to different surroundings and settings, different types and needs for space. It is also possible to generate openings for entrances and view into and outside of the structures envelope. The aesthetic intention of the formfinding system is a organic and fluid appearance. Satisfying the humans eye by comparing it to geometries and forms in nature, without any corner or straight edge. The idea of the global system is like a burrow system of a insects mound which also adds spatial complexity.
7
8
9
Chapter 02
10
CHAPTER 02
Attractor Point Space defining brep Vetices as deflector points
Field Lines Space defining brep Vetices as deflector points Space defining brep Vetices as deflector points
Target Point
Attractor Point Attractor Point
Space defining brep Vetices as deflector points
Space defining brep Vetices as deflector points
FIGURE 03: Concept diagram. (Source: Philipp Siedler, Alan Rodríguez Carrillo)
CONCEPT OF THE FINAL PROJECT
In “Fluid Formfinding Process - spacial organisation by electric fields”, four elements frame the project: A source as “Target Point”, “Field Lines”, space defining breps and their bounderies as “Deflectors” and “Attractors” to manipulate the “Field Lines”. The working python code defines a single “Target Point” or multiple “Target Points” where also the “Field Lines” evolve. The “Target Point” has a moderat point charge. Breps around the initial “Target Point” define spaces in an urban setting, or one building. Vertices or populated points on those breps act as deflecting forces and avoid the “Field Lines” to penetrate the Brep spaces. Attractor points are negative forces attracting the “Field Lines” and so forming the “End Points” of the force field. This static parameter influences the global shape of the “Field Line”-System in a major way.
CHAPTER 02
11
GH-Approach
Resulting Vector
Target
Vector 1 (30) Vector 3 (10)
Vector 2 (5)
Field Thesis: ((v1*30)+(v2*5)+(v3*10))*Distance*Decay FIGURE 04: Force field thesis. (Source: Philipp Siedler, Alan Rodríguez Carrillo)
THESIS OF SINGLE FIELD LINE
We examined the basic concept of a “Field Line” or flow line in a force field. In this example there are three “Point Charge” forces: Vector 1, with a length of 30; Vector 2, with a length of 5; Vector 3 with a length of 10. Manual vector addition results in a “Resulting Vector”. In this example three iterations were performed, while the “Decay” of the “Point Charges” were not considered. The last step was to sketch this manual examination in grasshopper so we could compare the results. The manual examination clearly shows higher curvature at the beginning of the “Resulting Vector”. Unfortunately the “Resulting Vector” of the “GH-Approach” does not show the curvature in a higher contrast, but is still present.
12
CHAPTER 02
FIGURE 05: Sketch of first approach. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
CHAPTER 02
FIGURE 06: First approach renderings. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
13
14
15
Chapter 03
16
CHAPTER 03
import rhinoscriptsyntax as rs import random as rnd import ghpythonlib.components as gc import Rhino.Geometry as rg import Grasshopper.Kernel as gk #---FIELD OUTPUT--field = gk.Types.GH_Field() #--------------------------#TARGET POINT: POINTS /// SPHERES /// POPULATE GEOMETRY /// POINT CHARGE #---INPUT--NumOfTg NumOfTgFL TgPtChValue Seed #-------------TgSpRadii = 5 TgPtList = [] TgSpList = [] TgSp_PG_List = [] for i in range(NumOfTg): #Point Tg_x = rnd.randint(50,200) Tg_y = rnd.randint(50,200) Tg_z = rnd.randint(50,200) TgPtSp = gc.ConstructPoint(Tg_x,Tg_y,Tg_z) TgPtList.append(TgPtSp) #Sphere TgSp = gc.Sphere(TgPtSp,TgSpRadii) TgSpList.append(TgSp) #Populate Geometry TgSp_PG = gc.PopulateGeometry(TgSp,NumOfTgFL,Seed) for i in range(NumOfTgFL): TgSp_PG_Li = gc.ListItem(TgSp_PG,i) TgSp_PG_List.append(TgSp_PG_Li) #Point Charge TgPtCh = gc.PointCharge(TgPtSp,TgPtChValue,2) field.Elements.AddRange(TgPtCh) #---OUTPUT--TgSp_PG_List #-----------------FIGURE 07: First page of python code with comments. No spatial setup. (Source: Philipp Siedler, Alan RodrÃguez Carrillo)
PYTHON CODE: SYSTEM WITH NO SPATIAL SURROUNDING.
CHAPTER 03
#DEFLECTOR: POINTS /// SPHERES /// POPULATE GEOMETRY /// POINT CHARGE #---INPUT--NumOfDef NumOfDefPop DefPtChValue #--------------DefSpRadii = 5 DefPtList = [] DefSpList = [] for i in range(NumOfDef): #Point Def_x = rnd.randint(0,250) Def_y = rnd.randint(0,250) Def_z = rnd.randint(0,250) DefPt = gc.ConstructPoint(Def_x,Def_y,Def_z) DefPtList.append(DefPt) #Sphere DefSp = gc.Sphere(DefPt,DefSpRadii) DefSpList.append(DefSp) #Populate Geometry DefSp_PG = gc.PopulateGeometry(DefSp,NumOfDefPop,Seed) #Point Charge for i in range(NumOfDefPop): DefSp_PG_Li = gc.ListItem(DefSp_PG,i) DefPtCh = gc.PointCharge(DefSp_PG_Li,DefPtChValue,2) field.Elements.AddRange(DefPtCh) #ATTRACTOR: POINTS /// POINT CHARGE #---INPUT--NumOfAtt AttPtChValue #-------------AttPtList = [] for i in range(NumOfAtt): #Point Att_x = rnd.randint(0,250) Att_y = rnd.randint(0,250) Att_z = rnd.randint(0,250) AttPt = gc.ConstructPoint(Att_x,Att_y,Att_z) AttPtList.append(AttPt) #Point Charge AttPtCh = gc.PointCharge(AttPt,AttPtChValue,2) field.Elements.AddRange(AttPtCh)
FIGURE 08: Second page of python code with comments. No spatial setup. (Source: Philipp Siedler, Alan RodrÃguez Carrillo)
17
18
CHAPTER 03
import rhinoscriptsyntax as rs import random as rnd import ghpythonlib.components as gc import Rhino.Geometry as rg import Grasshopper.Kernel as gk #---FIELD OUTPUT--field = gk.Types.GH_Field() #--------------------------Decay = 2 #TARGET POINT: POINTS /// SPHERES /// POPULATE GEOMETRY /// POINT CHARGE #---INPUT--TgPt NumOfTg NumOfTgFL TgPtChValue Seed #-------------TgSpRadii = 2 TgPtList = [] TgSpList = [] TgSp_PG_List = [] for i in range(len(TgPt)): TgPt_Li = gc.ListItem(TgPt,i) print TgPt_Li #Sphere TgSp = gc.Sphere(TgPt_Li,TgSpRadii) TgSpList.append(TgSp) #Populate Geometry TgSp_PG = gc.PopulateGeometry(TgSp,NumOfTgFL,Seed) for i in range(NumOfTgFL): TgSp_PG_Li = gc.ListItem(TgSp_PG,i) TgSp_PG_List.append(TgSp_PG_Li) #Point Charge TgPtCh = gc.PointCharge(TgPt_Li,TgPtChValue,Decay) field.Elements.AddRange(TgPtCh) #---OUTPUT--TgSp_PG_List #------------------
FIGURE 09: First page of python code with comments. Urban spatial setup. (Source: Philipp Siedler, Alan RodrÃguez Carrillo)
PYTHON CODE: SYSTEM WITH URBAN SPATIAL SURROUNDING.
CHAPTER 03
#DEFLECTOR: POINTS /// SPHERES /// POPULATE GEOMETRY /// POINT CHARGE #---INPUT--# DefPts is defined to store all the points of the Urban System. DefPts NumOfDefPop DefPtChValue #--------------DefSpRadii = 5 DefPtList = [] DefSpList = [] DefSpPG_List = [] #This step bring all the Building Points into spheres and it will populated. DefSp = gc.Sphere(DefPts, 1) for i in range(len(DefPts)): DefPts_Li = gc.ListItem(DefPts,i) #Point Charge DefPtCh = gc.PointCharge(DefPts_Li,DefPtChValue,Decay) field.Elements.AddRange(DefPtCh) #ATTRACTOR: POINTS /// POINT CHARGE #---INPUT--UrbanSystem NumOfAtt AttPtChValue #--------------AttPtList = [] PIB_List = [] for i in range(NumOfAtt): Att_x = rnd.randint(-50,50) Att_y = rnd.randint(-50,50) Att_z = rnd.randint(0,100) AttPts = gc.ConstructPoint(Att_x,Att_y,Att_z) PIB = gc.PointInBrep(UrbanSystem, AttPts) if not PIB : AttPtList.append(AttPts) PIB_List.append(PIB) #Point Charge AttPtCh = gc.PointCharge(AttPts,AttPtChValue,Decay) field.Elements.AddRange(AttPtCh)
#This part is a new Python-Code-Component and is culling the curves intersecting with the “Urban System” import rhinoscriptsyntax as rs import random as rnd import ghpythonlib.components as gc import Rhino.Geometry as rg import Grasshopper.Kernel as gk #---INPUT--UrbanSystem FieldLines #--------------NoncolList = [] Col_List = [] for i in range(len(FieldLines)): FieldLines_Li = gc.ListItem(FieldLines,i) Col = gc.CollisionOneXMany(FieldLines_Li,UrbanSystem) Col_Li = gc.ListItem(Col,0) if not Col_Li: FieldLines_Li NoncolList.append(FieldLines_Li) FIGURE 10: Second page of python code with comments. Urban spatial setup. (Source: Philipp Siedler, Alan Rodríguez Carrillo)
19
20
21
Chapter 04
22
CHAPTER 04
PROCESS DIAGRAM
Python Script to cull intersecting Field Lines
Python Script Field
Target Point for Initialisation Brep of Urban System
Cocoon Component
Field Lines
Field Line Component
Weaverbird Component
Mesh
FIGURE 11: Grasshopper diagram. (Source: Philipp Siedler, Alan Rodríguez Carrillo)
GRASSHOPPER INTEGRATION
The Grasshopper integration was done as following: Python-Code-Component The “Urban Setting” is a first input as a Brep, also the “Target Points”, source of the “Field Lines” are set manually. The “Urban Setting”-Brep is exploded and it’s vertices are used as points for the “Deflector Points” in the code. Different Parameters like the “Charge Values” and number of “Attractors” or “Deflectors” are controlled with a bunch of sliders. The “Seed”-value is also controllable from outside the script. We could have added multiple different Parameters like the sphere radius for the “Target Point Spheres”. This Python-Code-Component is followed by a “FieldLines”-Component of Grasshopper to display force field lines of the Phyton-Code-Components output, field.
A second Phyton-Code-Component is checking the “FieldLines” if they intersect with the “Urban Setting” Brep. If they collide, the lines will be culled from the list and a non-intersecting list of curves is getting returned as output. The next step is to divide those curve and rebuild them as segmented polylinecurves. Through a thickening process of the plugin “Cocoon” we generated a metaball mesh, welded it and refined the output with “Weaverbird’s Laplacian Smoothing”, “Weaverbird’s Loop Subdivision” and “Weaverbird’s Catmull-Clark Subdivision”.
CHAPTER 04
FIGURE 12: Grasshopper. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
23
24
25
Chapter 05
26
CHAPTER 05
FIGURE 13: Final stage close-up rendering. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
CHAPTER 05
FIGURE 14: Final stage close-up rendering. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
27
28
CHAPTER 05
FIGURE 15: Final stage top view rendering. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
CHAPTER 05
FIGURE 16: Final stage close-up rendering. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
29
30
CHAPTER 05
FIGURE 15: Final stage top view rendering. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
CHAPTER 05
FIGURE 16: Final stage close-up rendering. (Source: Philipp Siedler, Alan RodrĂguez Carrillo)
31
32
33
Chapter 06
34
CHAPTER 06
CHAPTER 06
35
References Forum Post of Grasshopper.Component Bug http://www.grasshopper3d.com/forum/topics/ghpythonlib-components-mergefields-not-working Bug-Report http://mcneel.myjetbrains.com/youtrack/issue/GH-1823 http://www.giuliopiacentino.com/ http://www.bespokegeometry.com/2015/07/22/cocoon/ www.grasshopper3d.com/ http://rhinopython-docs.appspot.com/
Abstract
The main idea of the project “Fluid Formfinding Process - spacial organisation by electric fields” is to develop a form finding process with electric fields. A field is beeing generated by positiv and negativ magnetic forces. Field lines are beeing used to display the magnetic field and stream around the intended spaces. This spatial system is able to adept to different surroundings and settings, different types and needs for space.
UniversitätStuttgart Stuttgart Universität
Institutefor forComputational ComputationalDesign Design Institute Institutfür fürComputerbasiertes ComputerbasiertesEntwerfen Entwerfen Institut