Drawing with Two Sprites

  1. Analyze and predict: How are the behaviors of these four scripts the same? How are they different?
    Analyzing these scripts will help you control the speed of the drawings in the problems below.
    Forever [ move (100), turn (90)] Forever [repeat (10) [move (10)], turn (90)] Forever [repeat (20) [move (5)], turn (90)] Forever [repeat (100) [move (1)], turn(90)]
  2. "U1L2-SpriteOrbit"Create a new project called U1L1-Name
  3. Give Sprite a script that, when the green flag is clicked, draws a blue square, drawing each line at some medium speed.
  4. When you are finished, double-check that your script does exactly what you mean for it to. This is always a good idea when coding because if you move on with part of the program still not working, you will only compound your problems.
    Pair Programming Swap
  5. You write the draw in red block.
    Create a second sprite with a script that does this:
    when flag clicked, draw in red, forever (point toward Sprite, move 5 steps)
  6. Test your program. Make sure that it starts both sprites at the same time.
  7. Experiment with the speeds of each sprite.
    1. What happens if Sprite(2) moves 20 steps instead of 5 steps each time it goes through the forever-loop?
    2. What if Sprite(2) moves only 2 steps?
    3. What if Sprite draws its square more quickly?
  8. Write Out Your Thoughts Describe the results of your experiments. Include pictures of the screen to show what happened. Try to explain why each picture came out as it did.

Sprite doesn't need to move in a square. Try one or more of the following experiments.

  1. Change Sprite's turn to 144 degrees.
  2. Change Sprite's turn so that it makes an equilateral triangle.
  3. Change Sprite's turn to 10 degrees and make the distance it moves in each step much smaller than 100.
  4. Tough Stuff Try to make some other interesting designs. Here are some examples:
    move turn design 1 move turn design 2 move turn design 3
  5. Write Out Your Thoughts Describe the results of your experiments. Include pictures and explanations.