Building Programs

Mindtools Home



Building Programs








Flash Player

This site makes use of the Macromedia Flash plugin to display videos.

Click here to download the Macromedia Flash player.


Video Tutorials

Wherever you see the eye icon on this site,
it is a link to a video tutorial.

 

 

Making the Turtles Move

We will start by making the Turtles follow simple commands

Go to the Movement Commands.  Drag out a Forward and a Turn command

By double clicking on the blocks you can make the Turtles follow your commands in SpaceLand.

Try out some of the other movement blocks.

Using the Pen

Put together a block of commands like this

This will repeat the following set of commands 4 times:

move the turtles forward 10 steps, turn left 90 degrees

The turtles will have walked out a square, but it can happen so quickly that you don't always see it. 

Turtles carry a pen, and by commanding them to put the pen down before moving means that they leave a trail, enabling you to see where they have been.

 

Naming Procedures

We now have a small procedure (set of instructions) that will command the turtle to draw a square.

We will name it and attach it to a button in SpaceLand so we can run it whenever we want. 

First attach a procedure hat to the block of commands - give it a name.

Then put a run once block into the Runtime area, and put the procedure block inside it.

Now in SpaceLand you have a block to click on to make your procedure run.

 

Setting Up

Sometimes you want to clear up SpaceLand for a fresh start.  You can do this by putting some commands into the Setup area.  This will create a Setup button in SpaceLand that you can use.

Place the following commands in the Setup area:


Clear All removes all objects from SpaceLand, so you have to create 2 new turtles.

 

1. Create a procedure that will make the turtles draw hexagons.

2. Create a procedure that will make the turtles draw triangles.

3. Design and create some drawings of your own choice. 


This page has been produced by Margaret Meijers.  Questions concerning its content may be directed by email to margaret.meijers@education.tas.gov.au.  This page was last modified on Monday, 07 January 2008. The URL for this page is http://www.mindtools.tased.edu.au/starlogo_tng/building_programs.htm .

 Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.
Attribution should include the statement: "This has been adapted from a resource originally created by Margaret Meijers at http://www.mindtools.tased.edu.au"