# Activities/TurtleArt/Tutorials/Turtle Art Tutorial gci2012

< Activities‎ | TurtleArt‎ | Tutorials

Page | 1

## TURTLE ART

Page | 2

### 1 LEARNING WITH TURTLE ART

What exactly is Turtle Art?

Turtle Art is a fun activity in which you learn how command a little turtle to draw pictures and designs. It is a off shoot of the Logo programming language and is intended for children as young as 6 years old to learn about programming and debugging. You can play with Turtle Art to draw colorful art patterns using the turtle that accepts instruction for movement.

What can you learn with Turtle art? It is very fun to get the turtle doing tricks, but the way you do that is also very similar to the way you program a computer, so when you finish figuring out how to program your turtle, you'll be on your way to learning how to predict what each instruction will cause the turtle to create with line art. It helps you understand the repetition of instructions, and understand following instructions only when a certain condition is met, which is important in computer programming, mathematics, and science.

Page | 3

### 2 GETTING STARTED

You program with Turtle Art by snapping together blocks. Each block is a command for the turtle, e.g., there is a block to tell the turtle to go forward, to turn right, etc. The blocks are organized on palettes: one for the turtle, one for the pen, etc. Start by clicking on the turtle to show the turtle palette. Try dragging blocks from the palette onto the turtle canvas. Click on them to see what they do... Page | 4

### 3 BASIC COMMANDS FOR THE TURTLE

Using the command forward the turtle will move forward with the number of entered pixels. Using the command back the turtle will move back with the number of entered pixels. Page | 5 With the command left the turtle will change her direction to left by the specified angle. With the command right the turtle will change her direction to right by the specified angle. With the command arc you can draw part of a circle. The angle is the part of the circle the turtle draws and the radius determines the width (size) of the circle. And naturally the command clean which will clear the screen of all drawings and will bring the turtle in her initial position. Page | 6 Using this commands and snapping blocks together we can create a "flow" from top to bottom.Just like in the example... The commands are executed in the order of the blocks.When we click start the turtle goes forward with 100 spaces then turns left 90 degrees and goes forward again, next turns right 90 degrees and goes again forward. Page | 7

### 4 PEN COMMANDS

The command pen up will pick up the pen so that the turtle does not draw. The command pen down will pick down the pen so that the turtle can draw. Set pen size will set the width of the pen. The larger the number is the fatter the line will be. Page | 8 Fill screen will fill the entire screen with the shown color and shade. With the command set shade you can set the brightness of the color. 0 will make it blacker. 99 will make it whiter. With the command set color you can set the color of the line that will be drawn. The value can be 0 to 99. See the table for colors. Page | 9

### 5 TOOLBARS

We will start with the Main toolbar In version 167 the toolbar looks simple and it is a little bit easily to use. We have again the palettes. Then we see a toolbar which can free our workspace in way that we have only the blocks that we are using and the drawing turtle. Next are the erase canvas, run project fast (rabbit) button and run project slow (snail) button. The palettes are ten: Turtle movements, Pen attributes, Color attributes, Numeric operators, Logical operators, Logical blocks, Sensor blocks, Media blocks, Customization functions, and Presentation blocks. An eleventh palette is used for restoring blocks from the trash. Blocks are dragged from the palette to the surface. To dispose of a block, drag it back to the palette. (It automatically go to the trash palette.) I will write only about the basic palettes which means Turtle movements, Pen attributes, Color attributes, Numeric operators and Logical operators . Page | 10

Turtle movement palette

About a part of them I have written in the beginning (basics command for the turtle). new elements here are set xy which is used for setting the turtle position, xcor and ycor which holds current x-coordinate and y-coordinate value of the turtle and the seth command. Here you set the heading (it hold current heading value of the turtle).

Pen palette

Here we see again a few unknown commands for example set gray, start fill, and end fill. From the name we can clearly understand that set gray is used for setting the gray level of the pen. Start and end fill are used for starting and ending a fill polygon. Page | 11

Color palette

About this palette we can simply say that it can be used with the set-pen-color block in place of a number block. Numeric operators palette These blocks here are arithmetic and boolean operators. The blocks + - x / < > = are used just as in mathematics. The mod, or remainder, operator divides x by y and returns only the remainder. The sign of the result is the same as the sign of x. The value of the result is between 0 and the absolute value of y. Random generates a random number between the minimum and maximum values which can be set by the user. AND, NOT and OR are Boolean operators. The operator AND narrows the search by instructing the search engine to search for all the records containing the first keyword, then for all the records containing the second keyword, and show only those records that contain both. The operator OR broadens the search to include records containing either keyword, or both. The OR search is particularly useful when there are several common synonyms for a concept, or variant spellings of a word. {For example: adolescent or teen} Combining search terms with the NOT operator narrows the search by excluding unwanted terms. Page | 12

Flow palette