Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Scratch Direction for magic Swirl Program
1. 1
Swirling Art Project
Wilmette Public Library
June 23, 2011
jpiehl@wilmettelibrary.info
In this project, you’ll make a set of dots and set it in motion. The dots will leave prints
behind, making an interesting pattern. You’ll be able to control the speed and rotation of
the dots.
What will we learn?
Using the stamp tool
Creating variables
1. Background
First of all, delete the default cat sprite by right-clicking on it and selecting Delete.
Now decide the color of the background. Click on Stage. Click on the Backgrounds
tab and then select Edit. Select the Fill tool and click on the color you want. Then
click on the background area in the Edit box. Click OK.
2. The Dots
Now it’s time to create the dots that will make the base of the pattern. Click on Paint
New Sprite. Using the Ellipse tool, create a small group of circles of different sizes
and colors. When you’re done, click OK. Don’t forget to name your sprite—in the
box above the scripts area, fill in a name, such as Dots.
3. Creating Variables
Make sure you’re clicked on the Dots sprite in the sprites list. Now, over in the blocks
palette, click on Variables. Click on Make a Variable. Name the variable Speed and
then click OK. This variable will control the speed of the dots when they stamp.
Make another variable. Call this one Turnyness. This will control how widely, and in
which direction, the dots rotate when they stamp.
You’ll see both variables displayed in the stage area. You want players to be able to
control the speed and degree of turnyess themselves. So right click on the Speed
variable and select Slider. You will want a limited range of speed. Right click again
and select Set Slider Min and Max. Try setting 0 as a minimum and 40 as the
maximum. Do the same for Turnyness. Set Min as -45 and Max as 45.
3. Making the Dots Move and Stamp
Let’s get those dots going now. Click on the Dots sprite in the sprite list and then
click on the Scripts tab above the Scripts area. Drag over a When Green Flag clicked
block. Now go to Pen and drag out and attach Clear. This way, the screen will be
clear whenever you click on the green flag.
Now go into the Motion category and pull out and attach Go to x <0> y <0>. This
will determine the dots’ starting position.
2. 2
Drag out a Forever block. Inside it, attach Stamp, from the Pen category. Now we
have to set up the motion. From the Motion category, drag out Move <> Steps. Then
click on Variable in the blocks palette and drag out the Speed button. Insert it into the
Move block. This means that the speed of the dots will be whatever the speed slider is
set at. Then drag out a Turn <>block. (The arrow should be pointing right and
down.) Inside the space, insert the button for the Turnyness variable. The dots will
rotate at whatever the Turnyness slider is set at.
The code should look like this:
4. Directions
You might want to make one more sprite, one that tells people how to use your
project. Click on Paint New Sprite. Then, using the Text tool, write a message that
tells users to drag the sliders. Remember to use a font and color that look good on
your background. Name the sprite Directions.
You’re done! But only if you want. Now you can customize your project. You can
adjust the speed and turnyness. You can play with the pattern or color of dots. Pick a
different background. You have many different options!