String Art

This project creates a piece of string art — a complex geometric shape drawn with only straight lines. (You could arrange pieces of string in the same way.) Watch the movie below to see how the finished project works.

Can you figure out how to make this project? Here are some hints:

Hints

1.
There are two sprites. Each sprite looks like a small, black dot. Both sprites start their scripts in the same way. They:

  • Clear the previous drawing.
  • Raise the pen up.
  • Go to the center of the screen.
  • Set the pen color.

2.
The first sprite now repeats some steps many times. To begin, add a repeat command the first sprite’s script. Try changing the number of repeats until you get the effect you want. (Hint! Start with at least 100 repeats.)

3. 
The first sprite then repeats all of these actions:

  • Puts the pen down.
  • Goes to the center of the screen.
  • Turns by 45 degrees.
  • Moves by the number of steps in a variable named steps.
  • Changes the value of the steps variable by 1 step so that in the next repeat the sprite moves a little further.
  • Broadcasts a message to the second sprite to tell it to move.

4.
In the meantime, the second sprite completes the following actions whenever it receives a message from the first sprite.

  • The second sprite places the pen down.
  • It goes to the first sprite.
  • And it raises the pen.

Just in case it helps, here’s a slow-motion movie that shows how the two pens move. I’ve made the first sprite into a red square and the second sprite into a purple square just for this movie, so that you can see how they’re moving.

. . .

Try changing the turn command to different number values. Watch how the string art changes!

Have fun!


This project is based on http://scratch.mit.edu/projects/domben/770656 by domben at the MIT Scratch web site.

Tamara

Here’s a project that sings and dances! It’s based on the sample project that you can see if you start Scratch and then go to File menu > Open… > Examples > Names > Tamara.

As you pause your cursor over a letter, it bounces and makes a colored trail. The trail changes colors and appears at a slightly different location each time, but it’s always just below the letter. At the same time, the letter sings a note.

Can you figure out how to create this project? Here are some hints:

Hints!

1.
There are 5 sprites — one sprite for each letter of the author’s name (Terry). Each sprite’s script is quite similar to the others.

2.
Each sprite begins in the same way when the green flag is clicked:

  • It lifts the pen up.
  • It moves to its place on screen.
  • It clears the screen of any lines previously drawn by the pen.
  • It puts the pen down.

3.
What command makes a sprite spring into action when it is clicked? (Hint! This command isn’t placed beneath when green flag is clicked. Instead, it begins a new section of the script. Look within the control commands to find a command that activates a sprite when it is clicked!)

4.
Each sprite draws colored lines when it is clicked. The number of lines, their colors, sizes, and locations change a little each time a line is drawn. To achieve this variation, we use the pick random command. pick random selects a random number from within a range of numbers. For example, here’s a command that makes the pen glide to a different x: and y: location each time it draws:

You can use this same idea to change the pen size, pen color, and even the number of times that the letter draws lines. Can you figure out how?

5.
To make the sound occur at the same moment that you touch a letter, broadcast a message and then receive it within the same script, like this:

. . .

Here are all the commands for a sprite named t. Can you assemble them into a working script?

. . .

Have fun!

Fly

Simple can be good! This project contains just 5 commands, but it’s still captivating. Can you figure out how it was done?

Hints!

How can you create the fly’s jiggly motion?

  • Include a turn command that turns the sprite in different, random direction each time the command occurs.
  • At the top, center of the Scratch screen, you’ll find 3 buttons (a circle, a line, and a dot). The different buttons change the way that sprites respond to a turn command. When the bottom one is selected, as it should be for this project, the sprite’s body doesn’t actually turn even if it receives a turn command. But the sprite’s next motion will be in a new direction (the direction that the sprite “turned to”).
. . .
Try it! And have fun.

The project was created by Leylosh at the Scratch web site, http://scratch.mit.edu/projects/Leylosh/676374.

Starry Night

I love this Scratch project, created by Scratch user nikita_i, because it shows how a beautiful and rich animation can be created with just a few Scratch commands (puzzle pieces). In fact, this project involves fewer than 15 commands! If you want to try creating a project like this, there are some hints below.

Hints!

  • There are 45 stars in the sky. Each star has exactly the same set of commands, in the same order (script).
  • Each star begins its flight at the right side of the screen and moves constantly to the left. When the star reaches the left edge of the screen it jumps back and starts its journey again from the right.
  • Each star’s height in the sky, brightness, size, and speed are numbers chosen randomly. These numbers change each time the star makes a journey.

How did Nikita do it? Think hard!

If you’ve thought as hard as you can, you can see the answer by downloading her project from the Scratch web site at http://scratch.mit.edu/ (login required).