# Getting Started

When you start &kturtle; you will see something like this: Here is a screenshot of &kturtle; when you start it for the first time &kturtle; Main window In this Getting Started guide we assume that the language of the &logo; commands is English. You can change this language in Settings Configure &kturtle;... in the Language section. Be aware that the language you set here for &kturtle; is the one you use to type the &logo; commands.

## First steps with &logo;: meet the Turtle!

You must have noticed the turtle in the middle of the canvas: you are just about to learn how to control it using commands in the code editor.

### The Turtle Moves

Let us start by getting the turtle moving. Our turtle can do 3 types of moves, (1) it can go forwards and backwards, (2) it can turn left and right and (3) it can go directly to a position on the screen. Try this for example:

    forward 100
    turnleft 90

Type or copy-paste the code to the code editor and execute it (using File Execute Commands) to see the result.

When you typed and executed the commands like above in the code editor you might have noticed one or more of the following things:

1. That — after executing the commands — the turtle moves up, draws a line, and then turns a quarter turn to the left. This because you have used the `forward` and the `turnleft` commands.

2. That the color of the code changed while you where typing it: this feature is called intuitive highlighting — different types of commands are highlighted differently. This makes reading large blocks of code more easy.

3. That the turtle draws a thin black line.

4. Maybe you got an error message. This could simply mean two things: you could have made a mistake while copying the commands, or you should still set the correct language for the &logo; commands (you can do that by choosing Settings Configure &kturtle;..., in the Language section).

You will likely understand that `forward 100` commanded the turtle to move forward leaving a line, and that `turnleft 90` commanded the turtle to turn 90 degrees to the left.

Please see the following links to the reference manual for a complete explanation of the new commands: `forward`, `backward`, `turnleft`, and `turnright`.

### More examples

The first example was very simple, so let us go on!

    canvassize 200,200
    canvascolor 0,0,0
    pencolor 255,0,0
    penwidth 5
    clear

    go 20,20
    direction 135

    forward 200
    turnleft 135
    forward 100
    turnleft 135
    forward 141
    turnleft 135
    forward 100
    turnleft 45

    go 40, 100

Again you can type or copy-paste the code to the code editor or open the `arrow.logo` file in the Open examples folder and execute it (using File Execute Commands) to see the result. In the next examples you are expected to know the drill.

You might have noticed that this second example uses a lot more code. You have also seen a couple of new commands. Here a short explanation of all the new commands:

`canvassize 200,200` sets the canvas width and height to 200 pixels. The width and the height are equal, so the canvas will be a square.

`canvascolor 0,0,0` makes the canvas black. `0,0,0` is a RGB-combination where all values are set to `0`, which results in black.

`pencolor 255,0,0` sets the color of the pen to red. `255,0,0` is a RGB-combination where only the red value is set to `255` (fully on) while the others (green and blue) are set to `0` (fully off). This results in a bright shade of red.

If you do not understand the color values, be sure to read the glossary on RGB-combinations

`penwidth 5` sets the width (the size) of the pen to `5` pixels. From now on every line the turtle draw will have a thickness of `5`, until we change the `penwidth` to something else.

`clear` clear the canvas, that is all it does.

`go 20,20` commands the turtle to go to a certain place on the canvas. Counted from the upper left corner, this place is 20 pixels across from the left, and 20 pixels down from the top of the canvas. Note that using the `go` command the turtle will not draw a line.

`direction 135` set the turtle's direction. The `turnleft` and `turnright` commands change the turtle's angle starting from its current direction. The `direction` command changes the turtle's angle from zero, and thus is not relative to the turtle previous direction.

After the `direction` command a lot of `forward` and `turnleft` commands follow. These command do the actual drawing.

At last another `go` command is used to move the turtle aside.

Make sure you follow the links to the reference. The reference explains each command more thoroughly.