Goal: Find the turning angle to draw spirals shaped like different polygons.
to spiral
pd
carefully [repeat 12 [fd howlong rt angle sethowlong howlong + 5]]
[announce [The slider can't go any higher!] stop]
end
to reset
cg
end
Notes You can make spirals of all different shapes, using a slider.
- Make a slider called angle. Set its minimum to 0 and its maximum to 180.
- In the spiral procedure, rt angle means, "Turn right the number of degrees on the angle slider."
- 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?
Can you set the angle slider to draw a spiral shaped like a triangle, square, pentagon, hexagon, or octagon? (If you try several, keep track of the angle needed to draw each spiral.)
Challenge
Can you make a slightly twisting triangle, square, pentagon, hexagon, or octagon?
|