Skip to end of metadata
Go to start of metadata

The purpose of this project was to become more familiar with L-systems, and change aspects such as color and width without affecting other elements of the object the turtle is drawing. In order to accomplish this task we first had to modify draw string so it supported five more characters. The second task was to write a function with an arrangement of trees or flowers that make use of the color store and restore. For this task I used multi-rule systems EL and DL. I modified the code in system DL by adding a T which changed the color of the tree to brown. I also modified the code in system EL by adding an O to make oranges. In order to make sure these changes were present in my drawing I edited my turtle interpreter. To make the orange I set the fill color to orange, drew a circle, ended the fill, and lastly set the color back to green for the rest of the tree. Here is an image of what this code draws. 

Required Image 1 

The third task was to make two new L-systems either by editing the code from one already made or creating a new L-system. I decided to create my own L-systems which can be seen in the mylsystem files. To do this I wrote a base, a rule, and then called these systems in my file. Here is an image of the L-systems I created.

Required Image 2 


I did two extensions for this project. My first extension was to create one more L-system. The code for this system is in the file extensionlsystem1.txt. This system draws a circular shape in magenta and is pictured in the center of the image below. 

Extension 1 

The second extension can be seen in the orange tree on the right of my required image 1. For this extension I added the variable o to the second rule of the systemEL file and added an elif c == "0" statement to draw string in my turtle interpreter.  

To complete this project I learned how to edit my turtle interpreter so I could change one aspect of the image without changing the entire picture and how to write my own L-systems.

List of people I worked with 
Erin Lavoie
Mike Remondi 
Roxana Gheorghe 
Bilal Ahmad