We took the following program and changed it in a bunch of different ways. Then we ran the program with different values of size
and
level
.
Your goal is to figure out what we changed in the code to produce each image! Note: We can change the input (the size and the number of levels)
without changing the code in the block. The original code and picture (right) are shown below.
Choose one:
We changed the turn amount between each branch.
Nice!
We changed the scaling factor (how much the length decreases each time).
Not quite. Notice how the branches are now tilted differently from those in the original image.
We added additional recursive calls to the function and other angle stuff to make it all work out.
Not quite. There are still the same number of branches at each stage.
Choose one:
We changed the turn amount between each branch.
We do change angles here, those are not the only changes we make. Where did those other extra come from?
We changed the scaling factor (how much the length decreases each time).
The scale factor looks pretty similar to the original.
We added additional recursive calls to the function and other angle stuff to make it all work out.
Correct! There are now five recursive calls (branches).
Choose one:
We changed the turn amount between each branch.
The angles look pretty similar to the original.
We changed the scaling factor (how much the length decreases each time).
Right! At each stage, the branches are getting longer.
We added additional recursive calls to the function and other angle stuff to make it all work out.
Not quite! There are the same number of branches, and the angles haven't changed.
Choose one:
We changed the turn amount between each branch.
The angles look pretty similar to the original.
We changed the scaling factor (how much the length decreases each time).
Right! At each stage, the branches are staying the same length, rather than shrinking.
We added additional recursive calls to the function and other angle stuff to make it all work out.
Not quite! There are the same number of branches, and the angles haven't changed.
Choose one:
We changed the turn amount between each branch.
Correct! The turning angles are 90 degrees in this case.
We changed the scaling factor (how much the length decreases each time).
It's a bit hard to tell, but the scale factor is the same as the original.
We added additional recursive calls to the function and other angle stuff to make it all work out.
Not quite! There are the same number of branches in this tree.