Information: the turning angle (external angle) for a polygon = 360 / (num of sides)
1) Draw a square
Initially setup so the cat draws a square of 50 steps, starting initially facing upwards
Point in direction 0 (up)
repeat 4
move 50 steps
turn 90 degrees
2) Create two variables: side and angle
Set the angle to 360 / side
Insert the side and angle variables into the polygon procedure as shown:
Use the repeat procedure to draw some different shapes (triangle is shown)
3) Use the Number, Variable and Control blocks to setup a repeat until, as shown:
Now insert the procedure inside the repeat until:
Now draw all the shapes at once, 3 to 8 sides:
Well, we don’t have Matt Gaetz to deal with any longer
-
I was working on a post in a desultory manner but decided to wait until
tomorrow. Plus it’s snowing fairly heavily in Chicago so everything is a
big mess o...
1 hour ago
No comments:
Post a Comment