Goal: Make different designs, controlling the sliders with commands.
Vocabulary: wait, set

Notes You can use commands to change the values on the sliders. In this way, with the click of one button you can direct the turtle to draw multi-colored designs.
- In the squareshow procedure, sethowmany 12 means, "Set the value of the howmany slider to 12."
The values of the other sliders are changed in the same way. Of course you should choose the value you want for each slider.
(There is another longer command which does the same thing:
set "howmany "value 12
You can use set to change other properties of sliders: their position, their limits (minimum and maximum), and whether or not their names are showing. You can also use set to change the properties of any other objects, including turtles, text boxes, buttons, melodies, and more.)
- Wait 1 means, "Wait one-tenth of a second." So wait 10 creates a one-second pause after each layer is drawn.
What If?
Watch the sliders change their values as each new layer is drawn.
Try changing each wait 10 to wait 5 to make the show go faster, or change each to wait 20 (or higher) to make the show go slower. (Try using the Find/Change feature in the Edit menu to change all of these commands easily.)
Challenge
Can you control the speed of your show with another slider? (Make a slider called speed and replace every wait 10 with wait speed.)
|