Writing Simple Procedures Drawing a Pentagon Copying a Procedure Commanding PenUp and PenDown Drawing a Broken Line...

Similar documents
Scratch Lesson Plan. Part One: Structure. Part Two: Movement

Coding with Scratch - First Steps

1 Turtle Graphics Concepts

Code, Draw, and 3D-Print with Turtle Tina

PYTHON FOR KIDS A Pl ayfu l I ntrodu ctio n to Prog r am m i ng J a s o n R. B r i g g s

Coding with Scratch Popping balloons

Graphics libraries, PCS Symbols, Animations and Clicker 5

~~~***~~~ A Book For Young Programmers On Scratch. ~~~***~~~

Overview of Online Record Keeping

The City School. Learn Create Program

Biology 164 Laboratory

In this project you will use loops to create a racing turtle game and draw a race track.

Workbook. Version 3. Created by G. Mullin and D. Carty

Lecture 1: Turtle Graphics. the turtle and the crane and the swallow observe the time of their coming; Jeremiah 8:7

A Guide to the TurtleGraphics Package for R

Clicker Books: How to Make a Clicker Book Using Clicker Books App v

Fractal. Fractals. L- Systems 1/17/12

Getting Started! Searching for dog of a specific breed:

Hello Scratch! by Gabriel Ford, Sadie Ford, and Melissa Ford. Sample Chapter 3. Copyright 2018 Manning Publications

Finch Robot: snap level 4

Sketch Out the Design

Scratch. To do this, you re going to need to have Scratch!

Lab 6: Energizer Turtles

Be Doggone Smart at Work

HerdMASTER 4 Tip Sheet CREATING ANIMALS AND SIRES

Reference Guide Playful Invention Company

SARG Guide Surrey Amphibian and Reptile Group. SARG Reptile Surveyor s Guide Using SARGWEB. April 2012 Version 1.0. Steve Langham

RUBBER NINJAS MODDING TUTORIAL

Virtual Dog Program in Scratch. By Phil code-it.co.uk

Package TurtleGraphics

Sample Course Layout 1

PNCC Dogs Online. Customer Transactions Manual

Turtle Ballet: Simulating Parallel Turtles in a Nonparallel LOGO Version. Erich Neuwirth

Recursion with Turtles

5 State of the Turtles

PENNVET BEHAVIOR APP Pet Owner Instructions

$2.85 $4.10 $1.00 $25.00 $2.25 $2.25 4X4 CUSTOM QUOTE: $55.00 PLUS $1.00 PER LINE 8X10 CUSTOM QUOTE: $75.00 PLUS $1.00 PER LINE

User Manual. Senior Project Mission Control. Product Owner Charisse Shandro Mission Meow Cat Rescue and Adoptions, Inc.

PNCC Dogs Online. Customer Transactions Manual

Finch Robot: snap levels 1-3

Bluefang. All-In-One Smart Phone Controlled Super Collar. Instruction Manual. US and International Patents Pending

Table of Contents. Page 2 ebook created with Orion PDF Author orion.aidaluu.com. What is Orion Label Maker?

Do the traits of organisms provide evidence for evolution?

Introducing and using InterHerd on the farm

Lab 7. Evolution Lab. Name: General Introduction:

Econometric Analysis Dr. Sobel

The purchaser may copy the software for backup purposes. Unauthorized distribution of the software will not be supported.

Activity 1: Changes in beak size populations in low precipitation

Supporting document Antibiotics monitoring Short database instructions for veterinarians

Biol 160: Lab 7. Modeling Evolution

Python 3 Turtle graphics. Lecture 24 COMPSCI111/111G SS 2017

All Dogs Parkour Exercises (Interactions) updated to October 6, 2018

Scratch Jigsaw Method Feelings and Variables

CAT Paid vs. CAT Unpaid November 2012

Proofing Done Properly How to use distractions to improve your dog s understanding

DOGS SEEN PER KM MONITORING OF A DOG POPULATION MANAGEMENT INTERVENTION

GUIDELINES FOR THE NATIONAL DIGITAL COMPETITION

Help the Scratch mascot avoid the space junk and return safely back to Earth! Start a new Scratch project. You can find the online Scratch editor at

The Lost Treasures of Giza

English reading answer booklet

Life Under Your Feet: Field Research on Box Turtles

For ADAA users, you will see a page similar to the one shown below:

Scratch. Copyright. All rights reserved.

Code Documentation MFA (Movable Finite Automata) Eric Klemchak CS391/CS392

Cane toads and Australian snakes

Pet Notes and Appointment Notes

Pages 1-2 are the user friendly version (no picture numbers). Pages 3-4 describe the pictures used written in B&W. Pages 5-6 are colour coded

Understanding the App. Instruction Manual

The Leader in Me Chari Distler

How to use Mating Module Pedigree Master

AKC Trick Dog EVALUATOR GUIDE

LN #13 (1 Hr) Decomposition, Pattern Recognition & Abstraction CTPS Department of CSE

Step by step recall training

Cow Exercise 1 Answer Key

Webkinz Friend Requests

5 Killer Dog Training Mindmaps to Help You Effectively Train Your Dog in 30 Days

Teachers BE SAFE, BE SEEN Teachers section. Contents: Specific teaching points about conspicuity 2

INDIVIDUAL IDENTIFICATION OF GREEN TURTLE (CHELONIA MYDAS) HATCHLINGS

USING FARMAX LITE. Upper navigation pane showing objects. Lower navigation pane showing tasks to be performed on objects

Elite Outdoor Bark Control

Kentucky Academic Standards

Questions and answers for exhibitors entering shows using TOES

Basic Training Ideas for Your Foster Dog

OPERATING GUIDE PLEASE READ THIS ENTIRE GUIDE BEFORE BEGINNING

Characteristics of the Text Genre Realistic fi ction Text Structure

A Creature Went Walking A Lesson for Gr. 4-6

Contents. Page 1. . Downloading Data Downloading EIDs and Associated Ear Tag Numbers...19

RALLY-O Sign Commands

Texel Sheep Society. Basco Interface Guide. Contents

Geometry from Scratch

Quick Setup Guide Model 5134G

Guide for Incubation of Eggs and Care of Newborn Livestock

Chapter 18: Categorical data

Guide Dogs Puppy Development and Advice Leaflet. No.6 Recall and Free Running

Rear Crosses with Drive and Confidence

General Tips If you have any questions, please contact the Customer Care Centre. For a listing of Customer Care Centre telephone numbers, visit our

Dasher Web Service USER/DEVELOPER DOCUMENTATION June 2010 Version 1.1

Manual Compustam-Cloud

6.14(a) - How to Run CAT Reports Record Errors Report

KB Record Errors Report

Transcription:

Turtle Guide

Contents Introduction... 1 What is Turtle Used For?... 1 The Turtle Toolbar... 2 Do I Have Turtle?... 3 Reviewing Your Licence Agreement... 3 Starting Turtle... 3 Key Features... 4 Placing a Turtle on the Page... 4 Using the Keypad Commands... 6 Yellow Keypad (Level 1)... 7 Drawing a Square... 9 Replaying... 11 Repeating the Shape... 11 Reviewing the Path... 12 Home... 12 Clean... 12 Stopping the Turtle... 13 Clearing Your Commands... 13 Using Pen Up; Pen Down... 14 Multiple Turtles... 15 Green Keypad (Level 2)... 17 Using Repeat and End Commands... 19 Drawing a Large Triangle... 20 Saving Commands as Procedures... 22 Blue Keypad (Level 3)... 24 Drawing an Octagon... 25 i

Writing Simple Procedures... 26 Drawing a Pentagon... 26 Copying a Procedure... 28 Commanding PenUp and PenDown... 30 Drawing a Broken Line... 30 Hiding and Showing a Turtle... 31 Home and Clean... 33 Running Procedures... 33 Auto run... 34 Stopping Procedures... 34 Writing More Advanced Procedures... 36 Complex Patterns... 36 Drawing a Spiral Pattern... 36 Drawing Polygons using Parameters... 38 Controlling Multiple Turtles... 41 Inserting a Pen Up Command... 43 Taking Turns... 44 Tips for Writing Procedures... 45 More Advanced Logo Commands... 47 Turtle Options and Making Turtles... 48 Changing Your Turtle s Settings... 48 Making a Turtle... 52 Images... 52 Text and Shapes... 53 Turtle Variables... 54 Games and Ideas for Whole Class Teaching... 56 Getting Support... 58 ii

Introduction Easiteach Turtle instructs animated objects and images to move around using a simple logo programming language. It offers a creative and captivating environment for learning the basics of control and computer programming. 1 What is Turtle Used For? Easiteach Turtle is a flexible control program that handles all aspects of animated turtle graphics. Based on the logo programming language, Turtle introduces the basics of computer programming in a friendly and easy-to-use way. Anything can be a turtle an animated object, a simple shape, a photograph, clipart or text. Beginners use buttons to control the movement of the turtle, optionally leaving a path trail of graphics. There are three levels of keypad starting with simple picture buttons and proceeding to logo shortcuts to suit all ages and skill levels. More advanced users can write complex commands and control shoals of turtles behaving differently. Easiteach Turtle helps pupils to understand shapes and symmetry, repeating patterns, distances and angles. It includes games and mazes for practising turtle control. Turtle can also be used to create dynamic worksheets, presentations, and simulations.

The Turtle Toolbar 2 Procedures Use to write, store, edit and run a procedure a sequence of commands Variables Lists all the attributes of a turtle an editing window for advanced users Details Use to check and change your turtle s details and behaviour New Turtle Add a turtle to the page from a bank of over 30 animated turtles Home Sends a turtle to its starting position on the page Make Turtle Makes any image, photo or text into a turtle Run Procedure Use for trial runs when writing or editing a procedure a sequence of commands Keypad Introduces the logo commands with three skill levels of keypad and buttons for controlling your turtle Clean Trails Removes your turtle s trail lines from the page Stop Procedure Stops a procedure while it is running

Do I Have Turtle? If you have Textease Studio Plus you will be licensed to run Turtle. 3 Easiteach users can also purchase Turtle. Please contact the RM Sales Desk for details (0870 908 6969). Reviewing Your Licence Agreement If you wish to review your Licence Agreement while you are running Easiteach: 1. Click File > About Easiteach. 2. Click on the Licence Agreement button. Starting Turtle To run Turtle, select Toolbars from the foot of the Easiteach screen and click Turtle. The Turtle toolbar will now be visible on the Easiteach page. If you would like to see prepared examples of Easiteach Turtle files, select File > Open > Examples and click Turtle. The examples First Logo (in Simple programs), Shapes (in Other Turtle applications) and Maze (also in Other Turtle applications) have simple screen buttons for young users. They do not require the Turtle toolbar.

Key Features 4 Placing a Turtle on the Page A turtle is an object controlled by logo programming commands. You can choose from a selection of over 30 animated turtles or name any image to be a turtle. Before you begin, decide where you want to insert the turtle on the page. This will be the turtle s Home position. The turtle will return to it whenever you press the Home button on the Keypad or the Turtle toolbar. 1. Click the New Turtle button on the Turtle toolbar to view the Multimedia Bank of animated turtles. 2. When learning Turtle, it is best to select an animation that has right-left symmetry and an obvious front and rear such as the ant or plane. If you simply want to place the turtle in the centre of the page, click the turtle you require and it will be inserted automatically.

5 If you want to put the turtle in a specific place on the page, hold and drag the turtle from the Multimedia Bank onto the page. Wherever you set it down will become its Home position. 3. You can now close the Multimedia Bank. When the turtle is given the command Home, it goes to its original position, pointing forwards up the page.

Using the Keypad Commands 6 The Keypad introduces the basic concepts of controlling a turtle. It has three skill levels, accessed by the yellow, green and blue buttons at the top of the pad. The Yellow Keypad is the simplest to operate and has picture buttons for the commands. The Green Keypad has words on the buttons, which introduce the logo command language for controlling turtles. The Blue Keypad is similar to the Green, but the buttons have the logo short commands used when writing a procedure (a stored set of commands). Placing a turtle on the page activates the Keypad button on the Turtle toolbar. Click Keypad to open the Keypad. It opens by default at the yellow level, which is the simplest to operate.

Yellow Keypad (Level 1) 7 On the Yellow Keypad, picture buttons illustrate the commands. The Keypad buttons control the turtle movement, allow trails to be left or cleaned, and allow selection of the trail colour.

Arrows Pen Up; Pen Down Four arrows control the basic movement commands move Forward, move Backward, turn Left, and turn Right. The Pen Up and Pen Down buttons control whether the turtle leaves a line trail as it moves. Click the palette of colours to select a line colour for the pen trail. 8 Clean The Clean button removes the trail lines. Home The Home button sends the turtle to its original starting position on the page. It can be pressed at any time, which is useful if the turtle wanders off the page. Replay The Replay button repeats the path taken by the turtle. It can be used to repeat a shape or replay the turtle s path.

Drawing a Square To command the turtle to draw a square: 9 1. Click Forward on the Keypad. The turtle immediately moves forward 20 turtle steps. 2. Click Left to turn the turtle 90 o.

3. Click Forward > Left > Forward > Left. 10 4. Finally, click Forward to complete the square. You have now completed your first set of commands. The buttons you pressed on the Keypad have been recorded automatically. If you have made an error and want to begin again see Clearing Your Commands.

Replaying 11 You can use the Replay button to review the path of the turtle or repeat the shape. Repeating the Shape 1. To repeat the shape on the page, simply press Replay. 2. The turtle will go through the commands for drawing a square by moving Forward, Left, Forward, Left, Forward, Left, Forward. 3. However, because the turtle finished the first sequence pointing to the right, the first command to move Forward will send it away from the original square. The result is another square. Repeating the shape in this way does not record a new set of commands.

Reviewing the Path 1. To review the path of the turtle, select Home > Clean > Replay. 12 2. The turtle rotates to return to its Home position; the trail lines clear; and the turtle retraces its path. The instructions to go Home and Clean are not repeated in the review. Home Pressing the Home button on the Keypad sends the turtle to its original position. If you press the Home button while replaying a sequence of commands, it will return home immediately but then continue with the rest of the sequence. The command Home is not added to the command sequence. You can make your turtle s current position on the page into its new Home. See Turtle Options and Making Turtles. Clean You can clean the turtle s trail lines from your page by pressing Clean on the Keypad or Clean Trails on the Turtle toolbar.

Stopping the Turtle If you want to stop the turtle while it is replaying its commands, press the Stop Procedure button on the Turtle toolbar. The turtle can then be given the command Home on the Keypad. 13 Note that pressing Replay on the Keypad starts the command sequence from the beginning, not from the point that it was stopped. Clearing Your Commands The recording of your commands cannot be cleared from the Yellow Keypad. If you want to start again you can either: Select File > Open > New and choose Discard on the message box, or Go to the Green Keypad and use the red Clear button to clear the recording of your commands. You can now start a new set of commands. Note that the recording cannot be cleared by deleting a turtle, or selecting Insert New Page or Clean Page from the File menu at the edge of the screen. If you add another turtle after clearing the page in this way, any commands given to the new turtle are added to the existing recording. When you press Replay the new turtle will move along an unexpected path.

Using Pen Up; Pen Down Pen Down leaves a line trail behind the turtle; Pen Up leaves no trail. The Keypad always opens with Pen Down. 14 1. With Pen Down click Right > Forward. Remember that although the turtle is pointing down the screen, the Forward button on the Keypad is the arrow pointing up. The turtle leaves a line trail. 2. Select the Pen Up button and click Forward > Forward > Right. The turtle leaves no trail in the example, the plane takes off!

3. Select the Pen Down button and click Forward. The turtle leaves a trail line the plane lands! 15 Multiple Turtles You can have any number of turtles on your page. However, using the Keypad commands, they can only perform the same movements. You can place turtles on the page at any time. 1. Select the New Turtle button to open the Multimedia Bank of turtles.

2. Hold and drag a new turtle to a space on the page. 16 3. Press Replay on the Keypad and both turtles will follow the same set of commands. 4. If you add further commands, the turtles follow them together.

Green Keypad (Level 2) 17 The Green Keypad buttons introduce the logo command language and allow a set of commands to be repeated a set number of times. You can also set the turning angle and the distance to be moved. Sets of commands can be saved, edited and stored. The recording of your commands can also be cleared so that you can begin again.

Logo commands The basic logo commands are Forward, Backward, Left, Right, Pen Up, and Pen Down. 18 The number following Forward and Backward is the distance to be moved measured in turtle steps. The number following Left and Right is the angle to be turned in degrees. These numbers can be changed using the up and down arrows on the Keypad. Repeat and End The commands entered between pressing Repeat and then End are repeated the selected number of times. Repeat 4 will repeat the commands four times before ending. The number of repeats can be changed using the up and down arrows on the Keypad. Clear Pressing the Clear button removes all the commands you have entered on the page. Save You can use the Save button to save and edit a set of commands. The saved commands are stored as a procedure. See Saving Commands as Procedures.

Using Repeat and End Commands The commands Repeat and End allow you to control your turtle with fewer commands. 19 To create a square use the sequence: 1. Press Repeat 4. 2. Press Forward 20 > Left 90. The turtle moves forward and turns left. 3. Press the End button. The turtle finishes the square, having moved Forward 20 and Left 90 four times.

Drawing a Large Triangle You can change the distance, turning angle and number of repeats on the Keypad buttons to draw a variety of shapes. 20 If you are starting a new set of commands, press the Clear button to remove any previous recording. You can also press Home to return your turtle to its starting position and Clean to remove any trails. To draw a large triangle: 1. Set the Forward/Backward distance to 50, using the arrows to the right of the buttons. Set the Left/Right angle to 120. Set the Repeat button to 3.

2. Begin the command by pressing the Repeat button. 21 3. Press Forward 50 > Left 120. 4. Now press End. The turtle completes the triangle.

Saving Commands as Procedures You can use the Save button on the Keypad to store a sequence of commands as a procedure. Procedures are stored sets of commands. They can be run at any time using Procedures on the Turtle toolbar. You can also edit your commands in this window. 22 To save a sequence of commands as a procedure: 1. Select the Save button to open the Save recording window. Type the name of your procedure in the box for example, Triangle. The name of your procedure must begin with a letter and have no spaces. For example, if you name a procedure Small Triangle, it must be entered as SmallTriangle. 2. Now press the Edit button on the Save recording window. This activates the storage process - there is no need to edit the commands. The Procedure editing window opens and displays your commands. 3. If you edit the commands in the Procedure editing window for example, change Left to Right the command will be stored as the procedure Triangle. The edited version cannot be replayed using the Keypad, but must be run through Procedures on the Turtle toolbar.

4. Close the Procedure editing window to complete the storage process. 23 5. If you select Procedures on the Turtle toolbar, you can see that Triangle is now listed in the Procedures window. 6. To run the procedure, click Run on the Procedures window. See Writing Simple Procedures for more information on writing, editing and Running Procedures

Blue Keypad (Level 3) 24 The Blue Keypad has exactly the same functions as the Green Keypad. However, the text on the buttons shows the logo short commands used when writing control commands. Note that the Pen Up and Pen Down buttons are reversed on this pad. See the Green Keypad for information and tutorials on the functions.

Drawing an Octagon To practise using the Blue Keypad, try creating this octagon. 25 1. Before you begin, press the Clear button to remove any previous recording. You can also press Home to return your turtle to its starting position and Clean to remove any trails. 2. Use the arrows on the Keypad to set the Fd/Bk distance to 20, the Lt/Rt angle to 45 and the Repeat value to 8. 3. Select Repeat 8 > Fd 20 > Lt 45 > End. The turtle draws an octagon.

Writing Simple Procedures 26 You can use Easiteach Turtle to write procedures stored sets of commands. You can use a single procedure to draw different shapes by adding a parameter, such as the number of sides. You can also command multiple turtles to move independently. When writing and editing procedures, you can either use full words for the logo commands, e.g. Forward and Right, or the logo short commands, e.g. fd and rt. The words are not case sensitive, so you can use either capitals or lower case letters. You can write, edit, copy, delete and run procedures using the Procedures function on the Turtle toolbar. Drawing a Pentagon To write a simple procedure for drawing a pentagon: 1. Select New Turtle on the Turtle toolbar and place a turtle on the page. 2. Select Procedures on the Turtle toolbar, and press New on the Procedures window. This opens the Create procedure window.

3. Type the name of your procedure in the Procedure name box. The name must begin with a letter and have no spaces. 27 4. Now press Edit to open the Procedure editing window. The Create procedure window closes automatically, but do not close the Procedures window. 5. Type the commands between the square brackets in the Procedure editing window. Each command must be written on a separate line. 6. The sequence for a pentagon is: repeat 5 forward 20 right 360 / 5 end The logo commands are shown in blue text and the values in black. Note that the angle has been entered as 360 / 5. This automatically works out the angle to be turned to create a pentagon. You can use this method to draw any shape without having to work out the angles. If you want to draw a small triangle, for example, you can enter repeat 3, forward 20, right 360 /3 and end.

7. You can now either close or minimise the Procedure editing window or leave it open while you check the procedure. 28 8. Go to the Procedures window and select the procedure you want to run. Press Run to make the turtle draw a pentagon. Copying a Procedure You can use the Copy button on the Procedures window to copy a procedure. This is useful if you want to write a similar but not identical procedure. The copied procedure can then be edited. For example, you can increase the distance values to draw a larger shape. 1. Select Procedures from the Turtle toolbar, and click the procedure to be copied from the list in the Procedures window. 2. Press the Copy button on the Procedures window. The copied procedure appears selected in the list of procedures. The name contains the number of the

copy in this example it is Pentagon1. 29 3. Press Edit on the Procedures window to open the Procedure editing window. 4. Click the forward value and increase it to 50. 5. You can also rename the procedure to make it more identifiable in the procedures list. Click the name given before the opening bracket, and retype it. In the example, the name has been changed from Pentagon1 to PentagonLarge. The name listed in the Procedures window changes accordingly.

6. Select PentagonLarge in the Procedures window and press Run. The turtle draws a larger version of the shape. 30 Commanding PenUp and PenDown You can insert the command penup or pendown at any point when writing a procedure. Drawing a Broken Line 1. Select New Turtle on the Turtle toolbar and place a turtle on the page. In the example, the pencil has been placed at the bottom of the page. 2. Open Procedures and select New to open the Create procedure window.

3. Type the name BrokenLine in the Procedure name box and press Edit to open the Procedure editing window. 31 4. You can now enter the commands between the square brackets in the Procedure editing window: repeat 10 pendown forward 5 penup forward 5 end 5. To draw the broken line, press Run in the Procedures window. Hiding and Showing a Turtle You can command a turtle to hide and then appear again in another part of the page. 1. Select New Turtle and place a turtle on the page. In the example, the ant is placed to the bottom right. 2. Select Procedures and New to open the Create procedure window. Type the name of the procedure in the Procedure name box for example, AntTunnel. Now press Edit to open the Procedure editing window.

3. Type the commands between the square brackets: 32 show pendown forward 20 left 45 forward 20 hide penup forward 50 left 45 forward 20 show pendown forward 20 The command show is followed by the command pendown and the command hide is followed by the command penup. This stops the ant leaving trails when it is hidden. 4. Press Run in the Procedures window to watch the ant run and turn, hide and appear again.

33 Home and Clean When you are writing, editing and running procedures, you can use the buttons on the Procedures window or the Turtle toolbar to instruct turtles to go Home to their starting positions or to Clean turtle trails from the page. You can make your turtle s current position into its new Home. See Turtle Options and Making Turtles. Running Procedures Procedures are run through the Procedures window.

34 1. Select Procedures on the Turtle toolbar to open the window. 2. Select the procedure you require from the list in the window, and press Run. If you are writing or editing a procedure in the Procedure editing window, you can also click Run Procedure on the Turtle toolbar. Auto run You can select a procedure to run automatically when you open an Easiteach file. 1. Open Procedures on the Turtle toolbar, and select the procedure that you want to open. 2. Click the Auto run option on the Procedures window. The setting is saved when you save your file. Stopping Procedures The Stop Procedure button is used to stop all procedures that are running. Stop Procedure buttons are located on the Procedures window and the Turtle toolbar. The Stop

Procedure button is useful when you are creating and editing a procedure, and want to begin a test run again. 35 If you press Run the procedure will start from the beginning, not from the point at which it was stopped. Note that selecting Home while a procedure is running does not stop the procedure. The turtle returns Home but then continues with the rest of the sequence.

Writing More Advanced Procedures 36 Complex Patterns You can create complex patterns by nesting - inserting repeat sequences inside each other. Drawing a Spiral Pattern 1. Select New Turtle from the Turtle toolbar and place a turtle on the page. In the example, the plane is placed just left of centre to allow room for the pattern. 2. Select Procedures from the Turtle toolbar to open the Procedures window, and then press New to open the Create procedure window. 3. Type Spiral in the Procedure name box, and press Edit to open the Procedure editing window.

4. Type the commands between the square brackets: 37 repeat 36 right 10 forward 5 repeat 36 forward 1 right 10 end end 5. Press Run on the Procedures window to see the spiral pattern appear.

38 Drawing Polygons using Parameters Parameters are values that can be changed. You can change the parameters in procedures so that one procedure can be used to draw many different shapes. For example, you can write a procedure called Polygon and give it a parameter called sides, which would stand for the number of sides. Whenever you run the procedure Polygon, Turtle asks you for the parameter of sides. Entering a value of 5 for sides gives a pentagon; a value of 6 draws a hexagon, and a value of 3 draws a triangle. To write a procedure that draws polygons: 1. Select Procedures from the Turtle toolbar, and press New to open the Create procedure window. 2. Type the name Polygon into the Procedure name box and type sides in the Parameters box. 3. Now press Edit to open the Procedure editing window.

4. Type the command sequence between the square brackets, using a new line for each command: 39 repeat sides forward 20 right 360 / sides end When the procedure is run, the word sides in the commands is given whatever value you choose as the parameter. 5. You can now close the Procedure editing window. 6. When you press Run on the Procedures window, the parameter window for Polygon opens. You can now enter the value for sides.

7. A value of 8 draws an octagon. 40 8. A value of 3 produces a triangle. The parameters for a polygon are entered as numbers, but some parameters can be text. If a parameter is entered as text, it must be enclosed within double quotes - text.

Controlling Multiple Turtles You can write procedures that tell two or more turtles to behave differently at the same time. To do this you write a procedure for each turtle, but add a command to one procedure to launch the other. 41 1. Place two turtles on the page. The first turtle placed on the page becomes Turtle1 (t1) and the second turtle is Turtle2 (t2). See Placing a Turtle on the Page for further information. 2. Select Procedures on the Turtle toolbar and press New to open the Create procedure window. 3. Enter the name for Turtle1 in the Procedure name box on the Create procedure window in the example this is Plane1. Press Edit to open the Procedure editing window. 4. Now click the Procedures window and press New again to open the Create procedure window. Enter the name Plane2 for Turtle 2 in the Procedure name box and press Edit. You now have two editing windows open on the page and two turtles listed in the Procedures window.

5. You can now type the commands. When you enter a turtle command in either editing window, it is given to all active turtles on the page unless you write it for a specific turtle. To command a specific turtle, type the turtle name as t1 or t2, a full stop, and then the command for example t1.forward 20. 42 6. Click the Procedure: Plane1 editing window and write the commands for Plane1 (t1): launch plane2 forward 20 t1.right 45 t1.forward 20 t1.right 45 t1.forward 20 7. Now click the Procedure: Plane 2 editing window and write the commands for Plane2 (t2): t2.left 45 t2.forward 20 t2.left 45 t2.forward 20 t2.left 45 t2.forward 20

8. Select Plane1 in the Procedures window and press Run. 43 The procedure Plane1 immediately launches Plane2. Both turtles move Forward 20 because the first command to move in the Plane1 procedure was not written to a specific turtle. The turtles then follow their own specific commands. Inserting a Pen Up Command To command the turtles to run with Pen Up, leaving no trails, add the command penup to the procedure for Plane1. 1. Select Plane1 from the Procedures window and press Edit. 2. Insert the command penup on the line after the command launch plane2. launch plane2 penup forward 20 t1.right 45 t1.forward 20 t1.right 45 t1.forward 20

The command is not specific to a turtle, so both turtles will move with pen up. 3. Select Plane1 from the Procedures window and press Run to see the planes fly. 44 You can also change the name and speed of your planes. See Turtle Details for setting the name and speed of a turtle and Tips for Writing Procedures for setting or varying the speed when writing a procedure. Taking Turns If you want the turtles to take turns moving, you can write a single procedure containing commands to the specific turtles. For example, you can write a single procedure for the planes: forward 20 t1.right 45 t1.forward 20 t1.right 45 t1.forward 20 t2.left 45 t2.forward 20 t2.left 45 t2.forward 20 t2.left 45 t2.forward 20 When the procedure is run, both turtles move forward 20 because the command is unspecified. Next Plane1 moves through its commands, and finally Plane2 moves.

Tips for Writing Procedures 45 You can use a simple command to draw any regular shape without having to work out the angles. When you are entering the angle value for right or left, enter 360 / followed by the number of sides. For example, if you want to draw a triangle with equal sides of 20 write the command: repeat 3 forward 20 right 360 / 3 end You can make the turtle leave a stamp of its image by inserting the command stamp. The image is not a turtle, and is not cleaned off by clicking Clean Trails on the Turtle toolbar. To remove the stamp, select the Delete tool from the Easiteach toolbar and click on the stamp. The command Inactive makes the turtle inactive. If it is issued to all turtles on a page, then all turtles will become inactive. Further commands will have to be addressed to particular turtles. To make the turtle or turtles active again, issue the command Active.

You can make your turtles go faster or slower during a procedure. Speed is the distance moved by the turtle per second. The default speed of a turtle is 25.4, which is average speed. A value of 10 is slow and a value of 100 is fast. A value of 0 means that the turtle moves as fast as it can. You can enter the command speed anywhere in the procedure. For example, 46 forward 20 speed 25 forward 20 speed 100 forward 20 speed 0 forward 40 speed 25 forward 20 When you run this example, the turtle moves at normal speed, speeds up, and then returns to normal speed. The turtle can be made to speak by inserting the command say. The parameter for say can be text or numeric. For example, forward 20 say Hello

You can use the commands north and south, and east and west to move your turtle around the page. This can be a useful when playing orienteering games with your turtles. The turtle turns automatically at a 90 o angle. The commands are entered, for example, as: 47 north 20 west 20 south 20 east 20 This example would draw a square and bring the turtle back to its starting position. For more information on writing, editing and running procedures, see Writing Simple Procedures and Writing More Advanced Procedures. More Advanced Logo Commands Logo is a rich and powerful language and has many more commands than are covered by this guide. For example, conditional commands such as else, while and if, and the logo operators and functions used in conditional commands. The logo commands within Easiteach Turtle are based on those within the Softease Turtle program. Details of advanced logo commands can be found in the Softease Turtle guide, which can be downloaded from the Softease website at: www.softease.com/guides.

Turtle Options and Making Turtles 48 Changing Your Turtle s Settings You can use the Turtle details window to check the current settings for your turtle and change details such as speed, the units for distance, trail effects, and the turtle s reaction to meeting the edge of the page. To see your turtle s details, click Details on the Turtle toolbar to open the Turtle details window. The Turtle does not have to be in its Home position. If you have more than one turtle on the page, click the turtle to select it before opening the Turtle details window.

Name When you place your first turtle on the page, it is automatically given the name t1. Subsequent turtles are given the names t2, t3, and so on. You can give your turtle a name by typing it in the Name box. For example, you could call the digger Ben. 49 If you are controlling multiple turtles and write a command that is specific to Ben, you must use this name in the command line for example, Ben.forward 20. Active When the Active box is selected, the turtle obeys general commands. You can turn a turtle off by clicking the box to clear it. This can be useful when controlling multiple turtles. Hidden If your turtle has been hidden, this box will be selected. Click the box to clear it and show your turtle.

Show Direction When the Show direction box is selected, the turtle will turn to point in the direction in which it is going. This is suitable for symmetrical turtles with an obvious front and rear, such as the digger, ant or plane. Some turtles, however, need to keep their vertical orientation. To avoid your hot air balloon flying upside down, click the Show direction box to clear it. 50 Pen Down If the Pen down box is selected, your turtle leaves a trail line. To show no trail, click the Pen down box to clear it. You can set various trail options. Select Trail to bring up a palette of colours. Boundary The boundary settings affect the behaviour of the turtle when it reaches the edge of the page. There are four options to choose from free (the default setting), wrap, bounce and fence. free the turtle ignores the edge of the page wrap the turtle reappears on the opposite edge of the page bounce the turtle bounces off the side of the page fence the turtle stops at the edge of the page

Speed The default speed of an Easiteach turtle is 25.4 mm per second. You can set a new speed for your turtle by changing the number in the Speed box. A value of 10 is slow, 25 is average and 100 is fast. A value of 0 makes the turtle go as fast as it can. If you are using multiple turtles on the page you can give each of them a different speed. 51 Positioning Position This shows the turtle s current position on the page. You can type new settings into the x y boxes to move the turtle to another location on the page. Home This shows the turtle s current home position and heading. It returns here when given the command Home. You can give the turtle a new Home position by typing new settings in the x y boxes. Set home You can make your turtle s current position into its new home by clicking the Set home button. Units The default units for distance are in mm. These can be changed to inches by selecting the inches option.

Making a Turtle 52 You can make any text, shape or image a turtle. Images 1. To turn an object into a turtle, go to Resources at the bottom of the screen and select Multimedia Bank. You can choose an image from the Multimedia Bank or browse to your own images through this window. 2. Drag the image onto the page and place it on its Home position. This position is not activated until you press the Make Turtle button. 3. To make the image a turtle, click the image to select it. This activates the Make Turtle button on the Turtle toolbar.

4. Press Make Turtle to name the object a turtle. You can now command your turtle to move using the Keypad controls or write a command for your turtle. 53 For more information on setting the options for your turtle, see Changing Your Turtle s Settings. Text and Shapes You can use the Easiteach toolbar to create text or shapes, and make these into turtles. 1. Open the Easiteach toolbar and select Edit Mode. 2. Type the text or create a shape on the page. 3. Select Use Mode and drag the text or shape to its Home position. 4. You can now click the text or shape to activate the Make Turtle button on the Turtle toolbar. Press Make Turtle to complete the process. For more information on setting the options for your turtle, see Changing Your Turtle s Settings.

Turtle Variables 54 The Variables window is for advanced users of Turtle. It lists all the attributes (settings) that control the behaviour and appearance of a turtle. You can set many of the attributes of your turtle using this window. You can view the list of attributes by selecting the turtle and clicking Variables on the Turtle toolbar. Click an attribute and its value shows in the bottom entry box. Some values cannot be edited, and the box remains inactive. Active boxes can be edited or an option chosen.

55 If the attribute can only take specific values, such as LineStyle, an arrow appears in the bottom box. Click the arrow to reveal the drop-down menu of line styles. You can now select the line style you require. It is advisable not to use this window until you are very familiar with Turtle and the logo language and parameters. All the common settings can be made through the Details window. See Changing Your Turtle s Settings. The attributes used within Easiteach Turtle are based on those within the Softease Turtle program. Advanced information on turtle attributes can be found in the Softease Turtle guide, which can be downloaded from the Easiteach website at: www.softease.com/guides.

Games and Ideas for Whole Class Teaching 56 You can use any image as a background to create stimulating contexts for controlling the turtle. Go to Resources > Multimedia Bank. You can choose images from the Multimedia Bank or browse to your own images through this window. Use the drawing and shape tools on the Easiteach toolbar to create mazes and obstacles for your turtle to tackle. Easiteach Turtle contains ready-made games, grids and mazes. Select File > Open > Examples and click Turtle. Young beginners may like to try Turtle s FirstLogo, Shapes and Maze examples. They have simple screen buttons and do not require the Turtle toolbar functions. The file shown here is Maze.

Easiteach Turtle also contains the Dino Island navigation challenge and a grid for creating your own mazes. 57 Use the shape tools on the Easiteach toolbar to create obstacles for your maze. To navigate around Dino Island and the grid using the Keypad controls, press Keypad on the Turtle toolbar and select the Green Keypad button. Use the Keypad arrows to set the Forward/Backward buttons to 10 and the Left/Right buttons to 90. This allows you to move one square on the grid games.

Getting Support 58 If you have problems with Easiteach Turtle and you have a RM customer ID number: Visit www.rm.com/support, or Contact RM Support on 08709 202202 during office hours (Monday-Friday 8 a.m. to 6 p.m.). RM Part Number: 130-595 Easiteach Turtle Guide v1.0 Copyright 2005 Research Machines plc. All rights reserved.