In this project, we are getting our first exposure to L-system and properly-formatted text files. One interesting aspect of L-systems was iterations, which allowed us to draw complicated fractals and realistic plants.

The first task is to create an abstract image with three l-systems. All l-systems graphs shown. Through creating a new function that allow my shape to be drawn in any (x,y) with any scale, color, and pen width. The result are shown as image 1.

                       required image 1 

The second task is to create a grid of nine trees, where the number of iteration increased left to right and the angle changed from top to bottom. In this task, I used  two different loops. I also put three parameters to the function, which define the location I draw the graph and the scale of graph. 

For the extension part, I created a season theme throughout the grid. For top to bottom, three lines of trees represent the spring, auto and winter. In spring, the brach of tree has leaves. In automn, the tree has fruit on each of its brach and In winter, all leaves and fruits fall off. 

                         required image 2

The third task is to use different l-systems graphs to create a simple scene. The "sun" on the right of the sky is created by myself and I found the "snow" and two kinds of "tree" l-system in ABOP website.

                         required image 3


1.I imported l-systems to my project 2 image.

2. I add 5 parameters to the show function in file, in which filename defines the name of the file I inputed, d defines the scale of the graph, a defines the angle, x and y defines the position of graph, color defines the color string. 

3. I created a season theme throughout the grid.

4. I added x, y and scale parameters to the function in task 2. you can see in the right corner, I draw the grid with smaller scale.

5. I created three different l-system graph in task 1 and the sun in task3

6. I add berries and leaves to  trees in task2 and task3.