So, we've learned the most basic Logo commands, and now it's time to get just a bit more complex. Don't worry, it's still really easy. This is the list of commands we will be learning today:
So, what are these commands?
Let's talk about them one at a time.
CS or ClearScreen clears everything currently drawn on the screen and returns the turtle into its original position.Here is a before and after example of the CS command:
As you can see, I drew a shape in FMSLogo. Watch what happens when i type in the CS command:
CS is very useful when you are drawing something and then deleting it to draw something else. Similar to CS is the HOME command. The HOME command doesn't delete everything currently drawn, but instead it just returns the turtle in it's original position with leaving a trace by default, so make sure to PU and PD before and after using the HOME command(By default, it's the enter of the screen). This is how the screen looked like before the HOME command:
- CS or ClearScreen
- PU or PenUp
- PD or PenDown
- PE or PenErase
Watch what happens when I type in HOME:
As you can see, I typed in HOME and the turtle apperead on the center of the screen,with leaving a trace behind itself, just this one isn't quite the best example.
So, let's move on. The next command we will be learning about today is the PU, or the PenUp command. Now, we already said that the turtle has a pencil with it that leaves a trace behind it. So, if we do not want to draw with the turtle and just move it somewhere (You can use the HOME command here, as well!) we can just use the PU command. Now, what happens if we want to return to the drawing mode? Well, in that case we use the PD command or the PenDown command so we can draw once again. So, let's start with these commands, shall we?
Now, close your eyes and imagine this: you are drawing an spectacular drawing in FMSLogo and..Oh no! you have typed FD 150 instead of 100. What to do now? Well, luckily, there is a solution without using the CS command which will destroy everything. So, it's a bit tricky and not used very often, and you'll see why when things get a bit more complicated. It's called the PE or the PenErase command. It is used to delete a certain line which you have already previously drawn. All you need to do is type in "PE" or "Penerase" and cross over the line you want to erase exactly; Something like this:
This is what the screen looked like before I used the PE command. As you can see, I just typed in FD 100. Now, watch what happens when I type in PE and go over the line I just draw..
As the arrows shown on the picture point to, I typed in PE and then went back on the same line by typing BK 100. Also, it's always a good practice to type in PD or Penown afterwards to return to the drawing mode
(Also, to return the pen to it's default "draw" mode, you can also use the PPT command)
So, today we learned 5 new commands, so let's just quickly recap what they do:
So, now that we finished up, I'll give you a picture, and you try to draw it to test your knowledge of FMSLogo, as it is very importsnt do it because we will be going on even further very soon.
- CS (Clears EVERYTHING drawn the screen)
- HOME (Returns the turtle to it's default position, leaving a trace behind it)
- PU (Prevents the turtle from leaving a trace behind it)
- PD (Allows the turtle to draw again)
- PE (Erases the turtle's trace by walking over the drawn line)
(Every line has a lenght of 50 pixels, including the blank spaces, but you can alter them if that is to big or small to you)
Have you done it? Good job!
OK, now that we finished up this lesson, it's also very important for you to try to remember as much as you can, so try to, beacause things are going to get quite different!(Also, you can check the "Colors" lesson for some extra info! :)