Question: Recursive Tree Modification (#3, pg 183 in Problem-solving with Algorithms and Data Structures using Python (2 nd ed.) Publ: Franklin, Beedle & Assoc. ) Implement
Recursive Tree Modification (#3, pg 183 in Problem-solving with Algorithms and Data Structures using Python (2nded.) Publ: Franklin, Beedle & Assoc.)
Implement all of the proposed modifications in exercise #3 pg 183-4 and show a screenshot of your final tree.
This is the exercise
Modify the recursive tree program using one or all of the following ideas:
- Modify the thickness of the branches so that as the branchLen gets smaller, the line gets thinner
- Modify the color of the branches so that as the branchLen get very short it is colored like a leaf
- Modify the angle used in turning the turtle so that at each branch point the angle is selected at random in some angle. For example choose the angle between 15 and 45 degrees. Play around to see what looks good.
- Modify the branchLen recursively so that instead of always substracting the same amount you substract a random amount in some range
Explain the modifications you needed to make to the code in order to achieve your results. Show your final recursive-tree function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
