/* L system set up to enter observed data of Geotrichum. Exact data from 401 last gen tips. Adapted for both lsys and Lsys2midi Fran Soddell Date: 10 Feb 04 Last Updated: 26 Feb 04 */ #define maxgen 100 #define step 0.05 #define maxLength 65 #define pause 8 START : H(0,0,-1,0,-1,0,0)f(pause*step*4) p1:G(x):x=0-> p2:G(x)->F(step*x) /* alternate rules p3-p5 */ /* pause at end of each branch */ /* p3:H(x,y,b,z,c,s,g):g=(maxgen-2)&s=1->Tf(pause*step) p4:H(x,y,b,z,c,s,g):g=(maxgen-2)&x>0->G(x)f(pause*step) p5:H(x,y,b,z,c,s,g):g=(maxgen-2)->f(pause*step) */ /* alternate rules p3-p5 */ p3:H(x,y,b,z,c,s,g):g=(maxgen-2)&s=1->T p4:H(x,y,b,z,c,s,g):g=(maxgen-2)&x>0->G(x) p5:H(x,y,b,z,c,s,g):g=(maxgen-2)-> /* frequency of interbranch distances */ p5:H(x,y,b,z,c,s,g):b=-1->(0.07143)H(x,0,5,z,c,s,g+1) ->(0.07143)H(x,0,7,z,c,s,g+1) ->(0.07143)H(x,0,13,z,c,s,g+1) ->(0.07143)H(x,0,15,z,c,s,g+1) ->(0.07143)H(x,0,16,z,c,s,g+1) ->(0.07143)H(x,0,17,z,c,s,g+1) ->(0.14286)H(x,0,21,z,c,s,g+1) ->(0.14286)H(x,0,24,z,c,s,g+1) ->(0.07143)H(x,0,25,z,c,s,g+1) ->(0.07143)H(x,0,32,z,c,s,g+1) ->(0.07143)H(x,0,44,z,c,s,g+1) ->(0.07143)H(x,0,62,z,c,s,g+1) /* frequency of distances between changes in direction */ p6:H(x,y,b,z,c,s,g):c=-1->(0.0003)H(x,y,b,0,3,s,g+1) ->(0.04615)H(x,y,b,0,3,s,g+1) ->(0.09231)H(x,y,b,0,4,s,g+1) ->(0.04615)H(x,y,b,0,5,s,g+1) ->(0.03077)H(x,y,b,0,6,s,g+1) ->(0.06154)H(x,y,b,0,7,s,g+1) ->(0.07692)H(x,y,b,0,8,s,g+1) ->(0.09231)H(x,y,b,0,9,s,g+1) ->(0.07692)H(x,y,b,0,10,s,g+1) ->(0.04615)H(x,y,b,0,11,s,g+1) ->(0.09231)H(x,y,b,0,12,s,g+1) ->(0.04615)H(x,y,b,0,13,s,g+1) ->(0.03077)H(x,y,b,0,14,s,g+1) ->(0.01538)H(x,y,b,0,15,s,g+1) ->(0.01538)H(x,y,b,0,16,s,g+1) ->(0.03077)H(x,y,b,0,17,s,g+1) ->(0.03077)H(x,y,b,0,18,s,g+1) ->(0.03077)H(x,y,b,0,19,s,g+1) ->(0.01538)H(x,y,b,0,21,s,g+1) ->(0.01538)H(x,y,b,0,25,s,g+1) ->(0.01538)H(x,y,b,0,26,s,g+1) ->(0.01538)H(x,y,b,0,27,s,g+1) ->(0.01538)H(x,y,b,0,28,s,g+1) ->(0.01538)H(x,y,b,0,29,s,g+1) ->(0.01538)H(x,y,b,0,34,s,g+1) ->(0.01538)H(x,y,b,0,40,s,g+1) ->(0.01538)H(x,y,b,0,50,s,g+1) /* branch and change direction */ p6:H(x,y,b,z,c,s,g):y=b&z=c->G(x) MB(g+1) XC H(0,0,-1,0,-1,1,g+1) /* branch */ p7:H(x,y,b,z,c,s,g):y=b->G(x) MB(g+1) H(0,0,-1,z,c,2,g+1) /* change direction */ p8:H(x,y,b,z,c,s,g):z=c->G(x) XC H(0,y,b,0,-1,1,g+1) /* draw (sound note) if step is maximum length */ p9:H(x,y,b,z,c,s,g):x=maxLength->G(x) H(0,y,b,z,c,s,g+1) /* growing between branches and changes of direction */ p10:H(x,y,b,z,c,s,g)->H(x+1,y+1,b,z+1,c,s,g+1) /* p11:M->[+(90)f(0.1)F(0.1)f(0.2)F(0.1)f(0.1)F(0.1)f(1)] p12:X->[-(90)f(0.1)F(0.2)f(0.1)F(0.2)f(0.1)F(0.2)f(0.1)F(0.2)f(0.1)F(0.2)f(1)] */ /* p13:Y->[+(45)f(0.1)F(0.3)f(0.3)F(0.3)f(0.1)][-(45)f(0.1)F(0.3)f(0.3)F(0.3)f(0.1)] */ /* observed branching angles and frequencies */ p15:B(g)->(0.05882)[-(30)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(31)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[-(41)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(46)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(53)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(62)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[-(62)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(63)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(65)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[-(70)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(71)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(75)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(81)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[-(91)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[-(92)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[-(94)H(0,0,-1,0,-1,0,g+1)] ->(0.05882)[+(94)H(0,0,-1,0,-1,0,g+1)] /* observed angles of changes of direction and frequencies */ p18:C->(0.01563)-(2) ->(0.01563)-(3) ->(0.01563)+(6) ->(0.01563)+(7) ->(0.01563)+(8) ->(0.01563)+(9) ->(0.03125)-(10) ->(0.01563)-(11) ->(0.01563)+(11) ->(0.01563)-(12) ->(0.01563)+(14) ->(0.01563)-(14) ->(0.01563)+(15) ->(0.01563)+(16) ->(0.01563)-(16) ->(0.01563)+(17) ->(0.01563)-(17) ->(0.01563)+(18) ->(0.01563)+(19) ->(0.04688)+(20) ->(0.01563)+(21) ->(0.01563)-(21) ->(0.01563)+(22) ->(0.01563)-(22) ->(0.03125)+(23) ->(0.01563)+(24) ->(0.03125)-(24) ->(0.06250)-(25) ->(0.04688)+(26) ->(0.04688)-(26) ->(0.01563)-(28) ->(0.01563)+(29) ->(0.01563)-(29) ->(0.01563)+(30) ->(0.01563)-(30) ->(0.01563)-(31) ->(0.01563)+(32) ->(0.01563)+(33) ->(0.01563)-(33) ->(0.01563)-(34) ->(0.01563)+(35) ->(0.01563)-(35) ->(0.01563)+(36) ->(0.01563)-(36) ->(0.01563)+(37) ->(0.01563)+(38) ->(0.03125)-(42) ->(0.01563)+(42) ->(0.01563)-(47) ->(0.01563)+(61) ->(0.01563)-(87) /* observed tip lengths */ p113:T->(0.08333)F(4*step) ->(0.16667)F(5*step) ->(0.16667)F(6*step) ->(0.08333)F(8*step) ->(0.08333)F(9*step) ->(0.08333)F(11*step) ->(0.08333)F(12*step) ->(0.08333)F(16*step) ->(0.08333)F(22*step) ->(0.08333)F(23*step)