In this lab, you will create several recursive, fractal-drawing procedures.
. Then look inside the block and remind yourself and your partner how it works.
to 2 and run the instruction again. Then try it and see if it does what you expect.
warp block (in the yellow Control palette) makes the script inside it run faster by not letting any other scripts run or updating the display until it's finished.
The expression
sets the base case of the recursion in the nested triangle block. But using the size input to control the depth of the recursion isn't very satisfactory. For example, when you tried
you may have thought, "That's an interesting picture, but it's too big to fit on the stage. Let me try size 100 instead." If you actually tried it, were you disappointed in the result?
You already know a better way to control the recursion: have another input, level, to control the depth of the recursion separately from the overall size of the picture. That's what you did in the tree fractal.
. You can use the code of your existing nested triangle block as a starting point.triangle fractal drawings, all with size 100, but with values of level from 1 up to 10. Make sure they do what you expected.
.