Luke's Project 8

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

The purpose of this assignment was to make lsystem and turtle_interpreter classes and bring them together to make pictures of trees and fractals. This made it possible to draw these pictures in a program that only imports the lsystem and turtle_interpreter files, not turtle itself. I also learned how to deal with lsystems that had more than one replacement rule. 

The first task was just to update the drawString function to include more special characters for changing turtle's color and saving a turtle's color.

The following task was to create an arrangement of trees with different iterations. At least two Lsystems had to have at least 2 rules. I used the two given Lsystems, systemGL.txt and systemFL.txt. I had the number of iterations and placement be random. The output was this:
The final task was to use two new Lsystems and to show how they change iteration after iteration. I used one through three iterations for the trees, and three through five iterations for the fractals. The output was this:
Through this project I learned how to handle multiple rules in an Lsystem. I also learned how to create a file that will negate the necessity of importing turtle to every file. I worked alone on this.