Thursday, December 2, 2010

Day 54: Using L-system (Plant growth)

Today, I started working on a small palnt with flowers, buds and leafs.
I created a different approch, when I was started working on the plant.
I stated with a blank L-system and premise X.
Rule 1: X=F/(137.5)[&A]X
Rule 2: A=FT(-10)[&M]FT(-10)[^M]F/(90)[+A][-A][C]
Rule 3: C=FJ

Rule 4: J=K
where F - angeled, &M- first leaf, ^m- 2ND leaf,  90- roatation angle
+A -A – two branches, C- 3RD branch, J – is the bud, K – is the flower
A- current segment to produce C.


later add the "sphere" in to "J" input, "Flower" in to "K" input and "leaf" in to "L" input of the L-system. on the tube tag in geometry to give some thickness to the plant.

By using the generation tab 0 to 7 we able to geenrate the animation of the plant.

No comments: