Home
Project Folders
Teacher Resources
Student Resources
En ESPAÑOL
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

polygons 1 2 3 4 5 6 7 8 9
Polygons 1
Try It
20 KB


Goal:   Find the turning angle to make a triangle.


Screenshot


Vocabulary:   pd, rt (right), fd (forward), repeat, cg

Code
Project Map

to triangle?
pd
setc whatcolor
repeat 3 [fd 80 rt angle]
end

to reset
cg
end



Notes

  1. Make a slider called whatcolor.   Set its minimum to 0 and its maximum to 140.  

  2. Make another slider called angle.   Set its minimum to 0 and its maximum to 180.

    Write a procedure named triangle? as shown.

  3. Pd means "pen down" so that the turtle will draw a line wherever it moves.

  4. Setc whatcolor sets the turtle's color to the number on the whatcolor slider.

  5. Repeat 3 means, "Repeat the instruction list three times."
    Fd 80 means, "Move forward 80 tiny turtle steps."

  6. Rt angle means, "Turn right the number of degrees on the angle slider."

  7. Write a reset procedure.

    Cg means "clear graphics."   It erases everything drawn on the page and returns the turtle home (at the very center of the page).

  8. Make buttons called triangle? and reset and set them to once.

  9. Try different settings on the angle slider, and see if you can draw a triangle.  

    As you experiment with different inputs for angle, keep in mind that you are telling the turtle how many degrees to turn before drawing the next line segment.   This is the "outside angle."   To draw a sharp (acute) angle, does the turtle need to turn less than 90 degrees or more than 90 degrees?




What If?
Try setting the slider to different inputs (numbers) until the turtle draws a triangle.   (Drag the turtle aside to see if the shape is closed.)


Challenge
Drag the turtle to different positions and adjust the slider to create a scene out of 3-sided shapes.




© copyright 2001 - 2008  OpenWorld Learning.   All rights reserved.