Lab Week 10

Turtle Basics

Review the Following:

  1. myTurtle = makeTurtle(x, y);
  2. myTurtle.face(degrees)
  3. myTurtle.penDown()
  4. myTurtle.setColor(red, green, blue);
  5. myTurtle.forward(distance);
  6. myTurtle.right(degrees);
  7. myTurtle.penUp();

Problem 1

Make the image shown below with turtle graphics. Sizes and details do not matter, but you should create a square, triangle, and circle. The “circle algorithm” is simple, just repeat the following: move a little, turn a little, until the total amount you turn is 360 degrees.

Problem 2

Make another program to produce the image similar to the one below. In this picture, each square is rotated 25 degrees relative to the next larger square, and each square is 0.9 times as large as the next larger one. You may choose different numbers for your work.

In this image, only 5 squares are drawn to make the geometry clear. When you get something similar to this, increase the number of squares to 25.

Problem 3 (Optional)

Copy and modify your problem 2 code to create the following variation. Study the image carefully to determine what changes are necessary. The changes are quite small and simple.