Difference between revisions of "workshop01G1:Codefarm"
(→Title) |
(→L-System) |
||
Line 17: | Line 17: | ||
==L-System== | ==L-System== | ||
− | + | ||
+ | The L-System, also known as the Lindenmayer System, is created in 1968 by the Hungarian theoretical biologist and botanist A. Lindenmayer. The L-system can be used to describe the behavior of plant cells and to model the growth process of plants. | ||
+ | |||
+ | |||
+ | How does it work: | ||
+ | |||
+ | A plant starts with an axiom and the growth is described by some rules. For example: | ||
+ | |||
+ | Axiom = A, RuleA = A+B-A, RuleB = B-A | ||
+ | |||
+ | |||
+ | Rule A means that every A will be turned in A+B-A; while rule B means that every B will be turned into B-A. Since the Axiom (starting point) is A, This will be turned into A+B-A. In the next iteration every A will be turned into A+B-A again, while the B will be turned into B-A. So for the second iteration we get: | ||
+ | |||
+ | |||
+ | A (Axiom) | ||
+ | |||
+ | A+B-A (1st iteration) | ||
+ | |||
+ | A+B-A+B-A-A+B-A (2nd iteration) | ||
+ | |||
+ | and so on | ||
+ | |||
+ | |||
+ | The '+' and '-' sign tells in which direction the plant grows. For example, when the angle of growth is 60º, the '+' tells to turn 60 degrees in positive direction and the '-' sign tells to turn 60 degrees into the negative direction. | ||
+ | |||
+ | |||
+ | Now, an example written in GH Python for Grasshopper 3D: | ||
+ | |||
+ | [[File:GH Screenshot.png|705px]] | ||
+ | |||
+ | As you can see, in Grasshopper we have a start point, an axiom and two rules which can be changed easily. There are also three sliders for the length, angle and the number of iterations. The outcome is a list of points with a polyline through the points. | ||
+ | |||
+ | [[File:GH Python Screenshots.png|705px]] | ||
+ | |||
+ | |||
+ | test | ||
+ | |||
+ | [[File:GH Rhino Screenshot 1.png|705px]] | ||
+ | |||
+ | test | ||
+ | |||
+ | [[File:GH Rhino Screenshot 2.png|705px]] | ||
+ | |||
+ | test | ||
+ | |||
+ | [[File:GH Rhino Screenshot 3.png|705px]] |
Revision as of 14:00, 13 September 2013
L-System
The L-System, also known as the Lindenmayer System, is created in 1968 by the Hungarian theoretical biologist and botanist A. Lindenmayer. The L-system can be used to describe the behavior of plant cells and to model the growth process of plants.
How does it work:
A plant starts with an axiom and the growth is described by some rules. For example:
Axiom = A, RuleA = A+B-A, RuleB = B-A
Rule A means that every A will be turned in A+B-A; while rule B means that every B will be turned into B-A. Since the Axiom (starting point) is A, This will be turned into A+B-A. In the next iteration every A will be turned into A+B-A again, while the B will be turned into B-A. So for the second iteration we get:
A (Axiom)
A+B-A (1st iteration)
A+B-A+B-A-A+B-A (2nd iteration)
and so on
The '+' and '-' sign tells in which direction the plant grows. For example, when the angle of growth is 60º, the '+' tells to turn 60 degrees in positive direction and the '-' sign tells to turn 60 degrees into the negative direction.
Now, an example written in GH Python for Grasshopper 3D:
As you can see, in Grasshopper we have a start point, an axiom and two rules which can be changed easily. There are also three sliders for the length, angle and the number of iterations. The outcome is a list of points with a polyline through the points.
test
test
test