Skip to end of metadata
Go to start of metadata

Justin Gelwicks

Professor Layton

Cs151

11/6/18

Project 8


Abstract:

  Similar to last week, we spent this project working with Lsystems. The difference between this week and last is that we are using classes as well as more, new components to the Lsystems to make them more advanced. We created classes for both the L-system and the Turtle_interpreter. The purpose of this project was to create an interpreter function so that we could design our own L-systems to make trees and other objects that look like they could appear in nature.


Required Image #1:

 For the second task we had to create a function that drew L-systems with multiple rules.




Required Image #2:

  I used variations of the original code to do my trees for task3

base FFA
rule A f[----fA<gL>][-fA<gL>][+++fA<gL>]
rule f FFf


base FFA

rule A f[-f-f-f-fA<gL-c>][-f-f-fAA<gL>][++f--f+f+f<gL----c>]

rule f Ff






base P
rule P I+[P+O]--[--<gL>]I[++<gL>]-[PO]++PO
rule I FS[+<gL>][-<gL>]FS
rule S SFS
rule O <y[++F][+F][F][-F][--F]>


base P

rule P I+[P+O]--[--<gL>]I[++<gL>]-[PO]++PO

rule I FS[<--FF--L>][-<gFLFc>]FFFc

rule S SFS

rule O <y[+F+F+F+F][+F][F][-F][--F]>





Reflection:

In summary, there is really not much to highlight about this project; it was very similar to the previous one. However it allowed me to learn about classes and further invest in L-systems



Extensions:

  • Have each tree exhibit some variation by modifying aspects of how it is drawn.

  • Add leaves, berries, or color to your trees by adding symbols to the rules and cases to your turtle interpreter. For each new symbol, you will need another elif case in your drawString method. I wrote code to implement coconuts in my trees with little holes

  • Make more L-systems. - I made a third for step 2

 


What I learned:

A deeper understanding of L-systems

A deeper understanding of classes



Citations:

TA session: Monday, Tuesday

Office hours: monday


Labels