00:01
So the first thing we'll do is import the turtle module.
00:04
Okay, and now we're going to draw a stop side, which is a hexagon.
00:07
So first we'll draw the red hexagon.
00:10
So i need the length of a side.
00:14
I will call it side, and i'll say it's 100.
00:18
Now let's move our pen.
00:21
So i'm going to bring the pen up so it doesn't draw while i move it.
00:29
Go to...
00:29
I'll use the side as a reference, so i want this.
00:33
Side divided by 2 is the x position and then negative side divided by 2 is the y.
00:42
At least centering it on the x because it's going to start at the very right side of the first side that's flat to the horizontal.
00:51
So this ensures that it starts where that side is centered about on the x or the horizontal axis.
01:00
Now we can tell the pen get back down and now we're going to fill the shape.
01:12
So we've got to use the command.
01:14
Turtle dot begin, fill, and then the color.
01:22
So it's going to be red.
01:27
Now i want to set my heading to start drawing.
01:32
So turtle dot set heading.
01:38
The exterior angles of a hexagon are 30 degrees.
01:42
So i'm going to tell it to start at 30 degrees.
01:44
This ensures that one of the sides is flat with the horizontal or the x -axis.
01:56
So we're going to draw a hexagon, but in very, very basic terms, we're going to draw a circle, but a circle with six sides because a circle really is, especially in a computer, a circle is just a bunch of sides.
02:11
They're just really small and really short...