6) Lots of Spirals

Let's look at some more spirals. How about a square spiral?

So can you tell what's going on here. What does the '100' do? Why is the 'forward(x)' command in there?

This next one changes just one number in our program, can you predict what change it might have on the shape (if any)?

And one more change.

How about a circle spiral?

A square spiral that changes color (note the use of % as a different way to change colors).

And we can change the background color, too.

What will these two do?

Now let's see what you can do. Make your own copy of Color Spiral above. Then try the following:

    1. Change the number of sides to 5 and see what happens.Then 4. Then 3. Then 2. What will happen if you choose 1?
    2. Add two more colors to the list and increase the sides to 8 and see what happens.
    3. Up to now, we've decided how many sides it will be. Now prompt the user for a number of sides (between 2 and 8) and draw the specified number of sides. Be careful to do what you need to do to make their input be an integer.
    4. Can you make a more complicated shape? Try adding an extra turn at the bottom of the drawing loop, maybe something like t.left(90).

Rosettes

With a For Loop:

Six Circles:

Ask for how many circles: