LESSON 3: Building from Pieces: An Intro to the Project & the Border


[Home][Menu][Overview][Art][LOGO][Stories][Links ][MVHS]

Logo Command Review

Command(Abbreviation) Action
FORWARD (FD) moves the turtle in the direction
it's facing.
BACKWARD (BK) moves the turtle in the direction opposite the
one it's facing.
CLEARSCREEN (CS) clears the screen and moves the turtle to
HOME.
LEFT (LT) turns the turtle to the left.
RIGHT (RT) turns the turtle to the right.
PENDOWN (PD) puts the turtle's pen down; the turtle will draw
when moved.
PENUP (PU) picks the turtle's pen up; the turtle will not
draw when moved.
HOME moves the turtle to the center or origin of the
drawing window. Sets the turtle heading to 0 -
makes it point to the top of the screen.
TO signals to the turtle that you are going to teach it a new procedure.
END ends a list of commands in a procedure.

The Project:

It is time for us to tackle a design project! Believe it or not, we can do a great many things with the set of commands listed above. First, though, you need to see what we are trying to draw:

You may be tempted to begin drawing the design using the Logo primitives:FD, BK, LT, RT, PU, & PD. Before you do that, think about the the homework problems at the end of Lesson 2. For example, recall this figure:

Now, if we had not told you to use the SQUARE procedure, and you had decided to draw it by hand, the problem would have been much harder! Imagine just sitting down and trying to draw the figure. What happens if you make a mistake?

Using the SQUARE procedure, you were able to build fairly complicated designs very fast and very easily. You are going to do the same thing for the rug design above; that is, you are going to use very simple procedures - that you write and teach the turtle - to build the design!

The Border:


Lets begin with the border (we need to start somewhere!). Here is just the top portion, with some measurements - in turtle steps - included:

Look closely at the border - can you see what shape is repeated? Heres a hint:


So, the top border consists of 6 repetitions of the same shape. That shape is:


So, type CG and lets get to work!

(1) Your first assignment is to write a procedure called TEE that draws this shape. Make sure you start and end the drawing where indicated above. Test your procedure to make sure it works.

You may notice that the answer seems to have a extra command at the end: LT 90. Actually, this is not an extra command - it is included intentionally! You want to have the turtle start and stop pointing in the same direction, so that each TEE will be drawn in the same way. For example, here is a TEE drawn without that last command LT 90 (the turtle is also shown):


Now if I drew another TEE, look what happens:


Do you see why? When you tell the turtle to TEE the second time, it is not pointing to the top of the screen, it is pointing to the right side! It does the commands in the procedure TEE from that position and direction; so, it draws a sideways TEE. But, that is not what you want, you want a nice row of TEEs for a border...

That is why the answer has the LT 90 command - we end the procedure by leaving the turtle pointing in the same direction as when the procedure began. This is a very important and very general guideline: when possible, have your procedures end with the turtle pointing in the same direction as when the procedure began.

(2) Edit your procedure if necessary, to add the last LT 90 command. Now, how can you have the turtle draw 2 TEEs? Five TEEs?

Remember, once you have taught a procedure to the turtle, you can use it just like any other command. So, you can use it as many times as you want...

(3) Write a procedure called LONG that draws six TEEs. Make sure it works (you may need to re-size the Turtle window so that the six TEEs fit).

Congratulations, you have drawn the top border! Dont worry about moving it to the top left corner: you can always do that later, since you have taught the turtle how to LONG. Remember, the turtle does not care where it draws LONG, it just needs to know how to do it! You can just move the turtle to anywhere you want, then type LONG, and it will begin drawing from where it is!

Lesson 3: Answers