to draw-pentagon :length
pd
seth 126
repeat 5 [ fd :length rt 72 ]
end
Draws a pentagon "length" pixels on each side, with the turtle originating and terminating at the apex.
Chat with our AI personalities
fd 60 rt 120 fd 60 rt 120 fd 60 rt 120 will cause the turtle to draw a triangle. The square brackets indicate that the enclosed commands are to be executed three times, repeat 3 [fd 60 rt 120] Search Google with: "logo commands triangle" and have a look through the websites on the subject.
An octagon is an eight-sided pentagon where all sides are equal length and all angles are equal. To draw an octagon in Logo, you move forward the length of a side and then turn 45 degrees, repeating 8 times (8x45=360). The following will therefore draw an octagon with a side length of 100 pixels: repeat 8 [fd 100 rt 45]
draw a square , mark a point at the center then mark the points at the sides of the square according to the amount of sides.then join the points , at last erase the unwanted lines inside the formed shape,and you are done.
Logo
The commands are called tags, and they have attributes within them to sort of "customize" the tags.