Unit 7: Fractals and Recursion

Lab 1: Trees

7.1.3
A tree with trunk and four levels of branches If this picture is drawn, what number must be in the level input slot of the tree procedure?
6
1
5
4
7.1.3
What would happen if you changed the input size to be -100? (Don't use Snap!. The point is to think about it.)
The program will never stop running and a lot of different branches will be drawn.
It will never stop running and only a single branch will be drawn.
It will work just as if the size were positive 100.
The image will be flipped upside down but will otherwise look the same.
Nothing will be drawn.
7.1.3
What would happen if you changed the input level to be -4? (Don't use Snap!. The point is to think about it.)
The program will never stop running, but it will draw a tree-looking tree with more and more smaller and smaller branches.
It will never stop running, and the picture will be a leftward spiral with the sprite spinning around in midair.
It will work just as if the level were positive 4.
The image will be flipped upside down but will otherwise look the same.
Nothing will be drawn.
7.1.4
Tree with trunk and four levels of branches swaying to the left

What was changed in the code?

The turn amount between branches
The scaling factor (how much the length decreases each time)
Additional recursive calls to the function and additional turn blocks
7.1.4
Tree with four branches instead of two splitting at each level

What was changed in the code?

The turn amount between branches
The scaling factor (how much the length decreases each time)
Additional recursive calls to the function and additional turn blocks
7.1.4
Tree with longer and longer branches

What was changed in the code?

The turn amount between branches
The scaling factor (how much the length decreases each time)
Additional recursive calls to the function and additional turn blocks
7.1.4
Tree with same-size branches

What was changed in the code?

The turn amount between branches
The scaling factor (how much the length decreases each time)
Additional recursive calls to the function and additional turn blocks
7.1.4
Tree with right angle branches

What was changed in the code?

The turn amount between branches
The scaling factor (how much the length decreases each time)
Additional recursive calls to the function and additional turn blocks