LOGO is a powerful graphics tool that is free to download and easy to use. Throughout the remainder of your time at Folsom, you will be learning to use LOGO for different purposes.

Getting Started

Part 1. Download and installation

You can download logo from this website: http://www.softronix.com/logo.html

Then, double click on it and it should install itself.

Finally, select MSWLogo from the start menu on your computer and launch LOGO.

Part 2. Initial Commands

 

 

 

Part 3. Initial Programs

 

 

 

Part 4. Input Based Programs

 

 

 

Part 5. Inputs and Loops Programs

 

 

 

Part 6. Programs to solve problems

 

 

Part 7. LOGO and Music

 

 

 

 

 

 

 

 

 

 

Part 2.

Getting Familiar with LOGO

Logo will launch by showing you a couple of pop up windows. Just close the windows and the program will launch.

Once the program has launched, you should see a split screen. On the top of the split screen, you should see a triangle. Most LOGO books call this triangle the turtle. This is a long story and I will explain it to you in class if you like.

You type commands into the white window at the bottom of the screen. Type the following commands and record what happens:

Command

Result

Forward 10

 

Forward 100

 

Forward 1000

 

What is the forward for?

What is the number for?

 

Now that you have learned a simple command, let’s learn another. Type CS into the window and record what happens:

Command

Result

CS

 

 

Now, you can learn to guess a little about how logo works. Type the following commands but make a prediction before you press return. After you enter the command, record what happens.

Command

Prediction

Result

Back 10

   

Back 100

   

Back 1000

   

 

 

 

 

 

Now that you have learned about forward and back, you can learn a little about turning. Type the following commands and see what happens:

Command

Result

Rt 90 forward 10

 

Rt 90 forward 10

 

 

What did the Rt do?

 

What did the 90 do?

Now, clear the screen and complete this chart. Don’t forget to make some predictions.

Command

Prediction

Result

Lt 90 forward 10

   

Lt 90 forward 10

   

Lt 90 forward 10

   

Lt 90 forward 10

   

 

So far, you have been doing a superb job of learning to make the turtle go places and you have even learned to draw a square.

Now, you need to learn a little more about angles and how the turtle understandings angles.

Complete the following commands and make some predictions about the shape you will draw.

Command

Prediction

Result

Forward 60 rt 60

   

Forward 60 rt 60

   

Forward 60 rt 60

   

What happened?

 

Should you have drawn a triangle? Remember, an equiangular triangle has angles of 60 degrees. Isn’t that what you told the turtle to do?

 

For homework, see if you can explain the turtle’s strange behavior.

 

Day 2.

You should have learned that the angle the turtle makes is based on the center of the turtle, and not the bottom of the screen. This means that if you rt 90, you turn to the right. However, if you rt 45, you turn halfway toward the right. If you rt 60, you turn 2/3 of the way toward the rt. However, a triangle angle might be 60 degrees, but they are actually more than that if you have to physcially turn to make the angle.

Experiment 1.

Step 1

Make a circle on piece of paper and mark 0, 30, 60, 90, 120, 150, 180 degrees on the sheet.

Make a triangle, with each side 1 meter, that has 3 equal angles on the floor using tape.

Step2

Trace the steps of your triangle and record the angle you would have to turn at each turn to make your angle.

 

Necessary Angle

Turn 1

 

Turn 2

 

Turn 3

 

What pattern did you discover?

 

You should have discovered that the inside angle is what you measure but the turtle makes the outside angle. This means the turtle needs to turn 180-angle degrees to make the turn you want it to make. This is the difference between an interior and an exterior angle.

 

Try to type the following:

Rt 120 forward 10

Rt 120 forward 10

Rt 120 forward 10

What shape does this make?

 

Why does it work?

 

 

Fill in this table and explain how it would work?

Commands to make a triangle in logo

Interior Angle

Exterior Angle

Command

45

 

Rt forward 10

45

 

Rt forward 10

90

 

Rt forward 10

 

 

 

 

 

 

 

 

New Command

Type the following into the screen and predict what will happen:

 

Command

Prediction

Results

Repeat 2[forward 10 rt 90]

   

Repeat 3[forward 10 rt 90]

   

 

What command would enable you to draw a square?

 

 

 

 

Homework:

Can you write a command that will make an equilateral, equiangular triangle?

 

 

 

Answer

Repeat 3[forward 10 rt 130]

 

 

Part III Writing Programs

Today you will learn to write your first logo programs. A program is a saved list of commands.

To learn more about programs, click on the edall feature on the right hand side of the screen.

Type the following into the window:

to triangle

repeat 3[forward 100 rt 130]

end

 

When you have finished, select the save and exit function from the file tab at the top of the screen.

In the command window, type triangle

You should now see the results of the repeat 3[forward 100 rt 130]. When you type, triangle, everything between the to triangle and the end is executed.

Clear the screen and try this command.

Command

Prediction

Result

Repeat 4[triangle]

   

 

What happened?

 

 

Write a program that will make other shapes:

 

Rhombus

Trapezoid

Parallelogram

Pentagon

Hexagon

Octagon

 

 

 

 

Part IV Writing Programs with Inputs

Open the triangle program using the File Load command. Now, make a slight change.

to triangle :n

repeat 3[forward :n rt 130]

end

Now, save and exit the screen.

Now, enter the following command and record what happens:

Command

Prediction

Results

Triangle 10

   

Triangle 25

   

Triangle 100

   

 

Try to write a program that will make a square of any size.

 

 

Now, revise all of the programs you have already written to make a shape of any given size:

Rhombus

Trapezoid

Parallelogram

Pentagon

Hexagon

Octagon

 

http://www.math.utah.edu/~clemens/relearning.html

 

 

 

 

 

 

 

 

 

 

 

 

Rhombus Program

rt 45 forward 25

rt 45 forward 25

rt 135 forward 25

rt 45 forward 25

To Rhombus

Repeat 4[rt 45 forward 25]

End

To Rhombus :n

Repeat 4[rt 45 forward :n]

End

Trapezoid program

rt 45 forward 25

rt 45 forward 25

rt 45 forward 25

rt 135 forward 61

To Trapezoid

Repeat 3[rt 45 forward 25]

Rt 135 forward 61

End

 

Parallelogram

rt 45 forward 25

rt 45 forward 30

rt 135 forward 25

rt 45 forward 30

To Parallelogram

rt 45 forward 25

rt 45 forward 30

rt 135 forward 25

rt 45 forward 30

end

 

Pentagon

Rt 72 forward 25

Rt 72 forward 25

Rt 72 forward 25

Rt 72 forward 25

Rt 72 forward 25

To Pentagon

Repeat 5[rt 72 forward 25]

End

To Pentagon :n

Repeat 5[rt 72 forward n]

End

Hexagon

Rt 60 forward 25

Rt 60 forward 25

Rt 60 forward 25

Rt 60 forward 25

Rt 60 forward 25

Rt 60 forward 25

To Hexagon

Repeat 6[rt 60 forward 25]

End

To Hexagon :n

Repeat 6[rt 60 forward :n]

End

Octagon

Rt 45 forward 25

Rt 45 forward 25

Rt 45 forward 25

Rt 45 forward 25

Rt 45 forward 25

Rt 45 forward 25

Rt 45 forward 25

Rt 45 forward 25

To Octagon

Repeat 8 [rt 45 forward 25]

End

To Octagon

Repeat 8 [rt 45 forward :n]

End

 

 

 

 

 

 

 

Advanced Topics

Write a program to draw an equilateral polygon of any number of sides:

to polygon :s :t

cs

repeat :s[forward :t rt 180-(((:s-2)*180)/:s)]

end

 

Using Advanced Concepts like Loops to make spirals

to spiral :size

if :size > 30 [stop] ; a condition stop

fd :size rt 15 ; many lines of action

spiral :size *1.02 ; the tailend recursive call

end