Generative Systems Workshop_Day 3/5

Page 1

Generative systems MSc3 Design Studio Workshop Series 9th

1st Workshop to 13th of September 2013 TU Delft Faculty of Architecture AE+T, HRG

Sougnmin Yu – Sina Mostafavi


Schedule Day1: Monday, 9/9 Lecture: Design ,Generative Systems And Design Computation Practice: OOP, Scripting, Rhino And Python Practice : Recursion And Iteration Design: Q&A, Group Brainstorming Session Day2: Tuesday, 9/10 Lecture: Implementations, State Of The Art, Case Introduction And Analysis Design: Design Brief Clarification Practice: More On OOP And Python In Grasshopper Practice : More On Recursion And Code Interpretation Design: Process Design, Site Studies, Pseudo Code Design Day3: Wednesday, 9/11 Lecture: L-systems, Theory And Implementations Practice: L-system Algorithms , Code Analysis Design: Design Hints, Initial Digital Prototyping, And Design Process Development Day4: Thursday, 9/12 Lecture: Cellular Automata, Complex Systems And Bottom-up Design Approaches Practice: CA Algorithms, Tests And Code Analysis Design: Digital Prototyping, Algorithm Developments Day5: Friday, 9/12 Design: Group Discussions, Design Process Enhancement Practice: Debugging Sessions Design: Groups Presentations


Day2 Content

INTRODUCTION, THEORY BACKGROUND L-System Background Rewriting Strings, Axiom, Rules Types of L-Systems

Examples Example 1

Example 1 References


INTRODUCTION ON L-SYSTEMS, THEORY AND APPLICATIONS


L-Systems L-systems or Lindenmayer systems are formal grammars used to model biological growth. They were introduced and developed by Hungarian biologist Aristid Lindenmayer. Lindenmayer originally used L-systems to describe the growth patterns and development of simple multicellular organisms, but later extended it to describe higher plants and complex branching structures In Deterministic or context free L-systems, axiom, Angles and production rules control the generative and emergence behaviour system.


Different types of L-Systems: Deterministic L-system


 Graphic Interpretation of the Strings  Turtle graphic



Axiom

1st Recursion

2nd Recursion

3rd Recursion

4th Recursion

7th Recursion(scaled 10)






Different types of L-Systems: Stochastic L-system • • • •

Stochastic = non- deterministic/ sequence of random variables Preserves the general aspect of modify the details Randomizing the turtle interpretation or/and L-system Topology remains unchanged

Ex 1) previous example a =>ab, b=> a a(0.5)=>ab, a has 50% chance to be ab Ex2) w = axion, and p1 through 3 are production rules

P1,p2,p3 have 1/3 chance to be picked

Variation in Topology


Different types of L-Systems: Stochastic L-system Looks at the predecessor in the string : what is on the left of right side of the letter determines what it is going to be Ex) B(left) < A > B(right) => X A becomes X only when A is preceded by letter B(left) and followed by B(right)


Examples of morphological variations


Different types of L-Systems: Parametric L-system

 “Parametric L-systems operate on parametric words, which are strings Parametric  of modules consisting of letters with associated parameters.”  

Modules in Parametric L-system means symbols associated with parameters ( think of it as functions with conditional statements to initiate it ) String in this case is series of modules

Ex) A(x,y) :y <=3

A(x*2, x+y)

input of A, x and y will become x*2 and x+y when y is smaller or equal to 3 The axiom for this may look like A(2,5)A(3,2) When A(2,5) the condition won’t apply but for A(3,2) will become (6, 5)


EXAMPLES


#Replace string if can_continue: #for loop in range (0, level) for n in range (0,level): #new_axiom as an empty string new_axiom="" ##this for loop informs what to do for each charater for s in axiom: #if s equals F then new axion is new_axiom +rule F if s=="F": new_axiom += ruleF; #if s equals A then new axion is new_axiom +rule A if s=="A": new_axiom += ruleA; #if s equals + then new axion is new_axiom + + if s=="+": new_axiom += "+"; #if s equals F then new axion is new_axiom + if s=="-": new_axiom += "-"; #replaces the axiom with the new axiom axiom=new_axiom #new_string equals axiom new_string=axiom #Draw the curve #create a list called pts with start already in it pts=[start] ##define a point called rot with length as x coordinate rot=(length,0,0) #rotate vector called rot along z=axis rot=rs.VectorRotate(rot,startAngle,(0,0,1)) #start for loop to define the rules for the interpretation for s in new_string: #if the char in the sring is F or A then add roated vector to the point if s=="F" or s=="A": #define end point by adding start and rot end=rs.PointAdd(start,rot) #replace the start point with end point-this just changes the point that is called start start=end #append the point to the list called pts pts.append(end) #rotate the vector(considering the conditions) if s=="+": rot=rs.VectorRotate(rot,-angle,(0,0,1)) #rotate the vector(in the opposite dir from +) if s=="-": rot=rs.VectorRotate(rot,angle,(0,0,1)) #draw polyline through all of the points in the list caled pts(outside of the loop) rs.AddPolyline(pts)

Example in rhino python script


#import rhinoscrip... import rhinoscriptsyntax as rs #define rules for start(axiom),rule F, ruleA, start angle axiom="A" ruleF="F+A++A-FF--FF-A+F" ruleA="F-F+AA++A+F--F-A" startAngle=0 #Interacting With Rhino, Getting Input Varaibles #define can_continue as true can_continue=True #get starting point from the rhino space start=rs.GetPoint('Pick a point as a starting point') # poinif nots are selected then can_continue becomes false if start is None: can_continue =False #contirnue if can_contirnue is true(to avoid crashes) if can_continue: #get length of the curve using getreal and set the 2 as the default length=rs.GetReal('select the length for the segment',2,0.001) #if no length is selected then can_continue becomes false if length is None: can_continue =False #continue if can_continue is true if can_continue: #get angle from rhino, set 60 as default angle=rs.GetReal('select angle',60,0,90) #if no angel then can_continue is false if angle is None: can_continue=False #continue if can_continue is true if can_continue: #get level as a numnber of iteration from the rhino spce, set 2 as default 5 as max level=rs.GetInteger('get number of iteration', 2,0,5) #if no level then can_continue is false if level is None: can_continue=False #go to the next page

Example in rhino python script


Example in GH.Python

Variations in Angles, Recursion and Strings (Rules)


Out put Generated/parametric Geometry

Building envelop, Solar gain Analysis

Folded Wall or Structure, Mesh Analysis

And‌

We will have experimentations on simulation and optimization methods in the next work shop on evaluations systems


Further studies on rules, angles and iteration


Fractal Tree L-System


Try to understand the way rules control the generative system Small changes in the rules can result in considerable changes in the morphology/ topology Applying context sensitive L-system approach theoretically may help designers to have relevant bottom up generative systems You can have more flexibility in Parametric L-systems Try to test other L-systems like Cantor Dust, Koch Curve, Sierpinski triangle, Dragon Curve and Fractal Plants. Understand their behavior and think how these Systems can be applied in design process.


REFERENCES


Some of the references : Links:  http://docs.python.org  http://wiki.mcneel.com/developer  http://python.rhino3d.com/forums/  http://docs.python.org  http://www.grasshopper3d.com/group/rhinopython  … Books  Think Python, by Allen B Downey  PYTHON 101 PRIMER , by Skylar Tibbits  Beginning Python Book, by by magnus lie hetland  IronPython in Action Book, by Michael Foord and Christian Muirhead  Python Essential References Book by david m beazley  BIM handbook by EASTMAN, C., TEICHOLZ, P., SACKS, R. & LISTON, K.  Perforamtive Architecture, Beyond Instrumentality by Kolarevic, B. & Malkawi,(2005) A.M.,  … Essays …


THE END OF THE DAY 3


DESIGN TIME FIRST PRESENTATION So lets have a democratic tool for that!

import random groups_to_present=["Group1","Group2","Group3","Group4","Group5"] random.shuffle(groups_to_present) print groups_to_present


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.