First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.

Slides:



Advertisements
Similar presentations
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
Advertisements

How to use your new tablets. Please locate your seat identified with your name tag, that will be your computer.
Objects in Alice: Positioning and Moving Them By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
Dimensioning Dimensioning Gateway To Technology®
Getting started with LEGO NXT Mindstorms software This is intended to be a short introduction to the LEGO Mindstorms software and programming the LEGO.
Logo Lesson 1 TBE Fall 2004 Farah Fisher.
Princess & Dragon – Version 2 By Michael Hoyle under the direction of Professor Susan Rodger Duke University July 2012 Part 2: Using Methods.
1. Tuesday: Halloween Shoot due TOMORROW. You must make a contact sheet of your photos and print it from my computer tomorrow. -5 pts for every day I don’t.
First things first – open SketchUp. You may be asked to choose a ‘Template’ For everyday use, choose the Simple Template – Meters Do not choose the Template.
Roads in MineSight.
Computer Science 1000 LOGO I. LOGO a computer programming language, typically used for education an old language (1967) the basics are simple: move a.
Using Logo and Logic Please use speaker notes for additional information!
Logo Lesson 4 TBE Fall 2004 Farah Fisher. Prerequisites Create basic and complex shapes using Logo procedures Create Logo procedures that use variables.
Logo Lesson 3 TBE 540 Fall 2004 Farah Fisher. Prerequisites for Lesson 3 Before beginning this lesson, the student must be able to… Use simple Logo commands.
1 Psych 5500/6500 The t Test for a Single Group Mean (Part 5): Outliers Fall, 2008.
Logo Lesson 2 Logo Procedures
SOLIDWORKS: Lesson III – Patterns & Mirrors
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
The logo above represents Windows Movie Maker. Whenever you see that logo, you know it is a Movie Make project. It is time to get started. Remember.
Maths Notes Number 5. Decimals
Tutorial for Arrays and Lists By Ruthie Tucker. Description This presentation will cover the basics of using Arrays and Lists in an Alice world This presentation.
Click your mouse for next slide Flash – Introduction and Startup Many times on websites you will see animations of various sorts Many of these are created.
Introduction to Scratch!
LOGO SOFTWARE BY: SAVE 9S. INTRODUCTION Logo is a software that can be found at : Shared area> High School > ICT > take home software > LOGO32. This is.
Click on Slide Show Scroll down to Action Buttons. Click on it.
> 1 Diagrams in Word Faculty of Health Alan Grace.
Getting Started With AutoCAD ENGR 2 Week #1 Laboratory.
Agent P, I have been hearing some rumours about a Python Turtle.
TURTLE GRAPHICS IP MR. MELLESMOEN. LOGO IN THE 1970’S THERE WAS A SIMPLE BUT POWERFUL PROGRAMMING LANGUAGE CALLED LOGO THAT WAS USED BY A FEW.
MSW Logo By Awin 9s.
Logo For beginners By Dali Matthews 9S What is logo?
An introduction to Logo Mike Warriner Engineering Director, Google Note: This course is not an endorsement of Logo by Google. All views in this document.
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
Animation Basics. A) Animation In animation we attempt to make things that aren’t really there appear as though they could actually exist and move in.
A little help Formatting Your Magazine Prepared especially for you by Mrs. Bianco.
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
1.To begin click: File, New, then select Design 2.Draw a circle, then use the dimension tool to set it’s size to 84 diameter or 42 radius. 3. Next draw.
Loops & Graphics IP 10 Mr. Mellesmoen Recall Earlier we wrote a program listing numbers from 1 – 24 i=1 start: TextWindow.WriteLine(i) i=i+1 If.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
Alice Learning to program: Part Two Writing Your Own Methods by Ruthie Tucker and Jenna Hayes Under the direction of Professor Susan Rodger Duke University,
Creating a Historical Tour in Alice By Jenna Hayes May 2010.
Graphics Concepts CS 2302, Fall /17/20142 Drawing in Android.
By Liam Lane How To Use MSW LOGO.
Any combination of the prime factorization. Find the number that “GAZINTA” all the numbers. 6 goes into 12, 2 times and into 18, 3 times. The only number.
Tutorial for Arrays and Lists. Description This presentation will cover the basics of using Arrays and Lists in an Alice world It uses a set of chickens.
To view this in “presentation” mode, go to Slide Show  View Show (the toolbar at the top of the page) Use the “Enter” key to advance to the next slide.
HOW THEY WORK AND WHAT THEY DO. Jay Jay 9S. A control program is a type of programming that allows you to control systems. Control programs are used in.
Fractal Art. What is Fractal Art? A fractal is a geometric shape that has self similarity, that is it can be split into pieces that are approximate reduced.
First of all – lets look at the window’s you are going to use. At the top you have a toolbar, with all your various tools you can use when customising.
Procedures and Variables Control Logo 1. What you will do today  You will make your code more efficient by using procedures  You will create shapes.
Turtle Graphics Lesson 2 1. There are 3 homeworks to complete during the six lessons of this unit. Your teacher will let you know when a homework has.
Functions. functions: a collection of lines of code with a name that one can call. Functions can have inputs and outputs.
Search for it on your computer
LOGO WHAT IS IT? HOW TO USE IT AND HOW USEFUL CAN IT BE?
Hackety Hack! Written by Krystal Salerno Presented by _______________.
FLOWCHARTS Part 1.
LOGO BY Kaotip 9S.
LOGO 32 By: Xenon 9S.
Agent P, I have been hearing some rumours about a Python Turtle.
Learning to program with Logo
Google SketchUp – How to
Unit 11 – PowerPoint Interaction
Drawing Lewis structures
Go to =>
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
Any combination of the prime factorization.
Directions are in slide notes. You can view them in two ways
Presentation transcript:

First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your procedures. Under that you have the large window, called Graphics where you can see what effect your commands are having. Underneath that you have the Listener where you actually give your commands. Talking of commands, lets have a look at a few of the more basic ones, and get your turtle doing something.

The very first, most used commands you will need are incredibly simple. FD X commands your turtle to go forwards by value X RT X commands your turtle to turn to the right by X degrees. Lets do something simple, how about a square. Type fd 50 and then rt 90 four times. Your listener should look like this after you have finished.

As you can see, this method, while hard to get wrong, takes quite a lot of typing to get any sort of shape, imagine trying to draw a circle like this. There is a far easier way to do this however. Type CS to clear your screen, so we can start on something slightly more advanced. Now, lets make a circle. Unless you want your hands to fall off though, we are going to have to find a slightly faster way to do this. Lets make a procedure.

Now, lets decide what to call your procedure. Were going to draw a circle, so lets call our procedure circle. Type edit circle This should open up a new window, like this. It should be titled Circle, and start with TO CIRCLE. Now, lets make it do something shall we. We want it to draw a circle, without having to do lots of typing. The answer to this is the Repeat command.

As the name suggests, the repeat command repeats whatever you tell it to. What we are going to do is tell it to draw a circle. So, type: repeat 360 [fd 1 rt 1] This tells the procedure to repeat 360 times the commands fd 1 then rt 1. So the repeat command can be summed up like this: repeat X [Y] Which means repeat command Y, X times. Press F2 to leave the editor. You should see circle defined in your listener.

Now, lets test our procedure. Type circle into your listener, and press enter. You should see this. To vary the size of your circle, change how much the turtle moved in the FD command in your procedure. However, that takes time, and you arent sure of what it will look like until you have done it. Lets speed this up shall we. Lets use variables.

A variable is something we can change in the procedure, without having to edit it every time. Lets call our variable X. So, open your procedure with edit circle, and lets change it around a bit. Where it says, TO CIRCLE, change it so it says TO CIRCLE :X. This means that when you type circle, you must also give a value of X. Now, change your procedure, so is says repeat 360 [fd :X rt 1] Now you can vary how far the turtle moves every repeat. Press F2, and try typing circle 2. You should see this.

Now, with variables, a whole new world of possibilities has opened up for us. If we put our minds to it we could make any shape we could ever imagine. You can have as many variables as you like in a procedure, for example you could have a procedure called SHAPE :X :Y :Z Or any other combination. Now lets make a procedure that will make a shape with a number of sides :X and a side length :Y As you may know, the exterior angle of a shape is 360/No. of sides. So our procedure would look something like this. First, lets call it POLYGON

Now, type edit POLYGON into your listener. We need the top to say TO POLYGON :X :Y Then, type repeat :X [fd :Y rt 360/:X] This lets us set the number of sides, and the length of each side. Lets give it a go shall we? Lets start with a square, of side length 50, and of course with 4 sides. You should get this, if not, go back and check for any typo's in your procedure. Now, one more thing before we get onto some really hard stuff.

With all the circles weve drawn, we have set the circumference, not the radius. Lets see if we can try and make a procedure where we set the radius, of the circle, and the program works out the rest. So first, were going to need a variable, :X, and the value of pi. Logo takes this value to 3.14, which is close enough for our means. Lets call our procedure CircleR – meaning it is a circle where you set the radius. So, type edit circler in your listener, and type this: Give the procedure a variable :X Tell it to repeat 360 times: forward 2*π*:X then right turn by 1. Remember, to multiply use * not x. R Circumference Circumference = π*R*2 π*D D

So, with all that done, does your procedure look like this: TO CIRCLER :X REPEAT 360 [FD ((PI * 2 * :X) / 360) RT 1] END If so – well done, you have made a procedure where the value :X is the radius, and the circumference is done by Logo. Try is out, and you should get this, set :X to 50. This is useful for making a drawing significantly more precise. Now, lets move onto something even better – spirals!

Weve made all sorts of shapes, but they all have one thing in common; they start and end at the same place. What about a shape that starts at one place, and ends in another, like a spiral. Lets start with something basic, like a square spiral. This involves quite a jump in procedure complexity – so make sure you type everything correctly first time! Lets call it Sqspiral – square spiral. Type edit sqspiral into your listener, and give it 2 variables, X and Y. First, were going to need to stop our spiral growing out of control, so type IF :X > 200 [stop] Then just tell it to go forwards by X and right by Y. Then – and this is the important bit, type sqspiral :X + 1 :Y This is the bit that makes it expand into a spiral. Go to next slide for the finished procedure. You will notice that here the procedure calls itself, otherwise you would have to type it every time :X changed! How tiring!

Does your procedure look like this: TO SQSPIRAL :X :Y IF :X > 200 [STOP] FD :X RT :Y SQSPIRAL :X + 1 :Y END If so, well done, and lets give it a go. Press F2 to save it, and then type sqspiral 0 90 into your listener. Does it look like this? With this procedure you can make a spiral with any number of sides, with right angles, or with triangles, or anything you can imagine, within some limits. This procedure will not produce a circular spiral, so thats what were going to do next.

Now, lets start on our circular spiral. We need to give it a name first. Lets call is Cspiral. To get it to work, we need to work a few things out first. We need to work out, for example, the distance between two layers of the spiral, and make this distance constant throughout the spiral. This instantly means that we are going to have an :X + Y part in there somewhere. Now we need to find an appropriate value for Y. To work this out we need another constant, Z. So, if Z is the distance between two layers, say 0.1, and Y is what we do to :X, then we need to increase :X by 0.1 every 360 of rotation. The answer is now clear. Y = 0.1/360. So now we know what our procedure is going to look like. Try and put it together, and see if it works. Remember all the limiters to stop it expanding out of control! Go to the next slide to see my solution to this problem.

Does your procedure look something like this? Note: The only reason we have a variable is so that we can change it within the procedure itself. TO CSPIRAL :X FD :X RT 1 IF :X > 2 [STOP] CSPIRAL :X + (0.10 / 360) END And, does the spiral it produces look something like this? (set :X as 0.1) If not, give it another go, or just copy out the procedure I used.

That was fun – but it is still quite limited. Lets move onto something a bit more fun. Lets make an animation. This will require a few steps, but well get there! First, I am going to explain why I have designed it like I have, and then Ill set you to putting it all together for yourself. The animation I have made is very simple, but requires 4 different procedures to work. This is because when I was putting it together I did it step by step, to make sure that everything worked. This has the added bonus of slowing the animation down enough that it doesnt hurt your eyes when you play it. You can amalgamate all the procedures into one if you so wish, but I dont think you will like the result, and it gives you quite a headache after a while. So, lets begin!

Our first procedure were going to make is called TA. Its very simple, and it goes: RT 30 FD 50 REPEAT 2 [RT 120 FD 50] Then we have TA2, which goes: TA REPEAT 2 [FD 50 LT 120] FD 50 You will notice that this procedure draws on a previous procedure. Now for TA3, and it goes: TA2 PE TA2 PD PE means pen erase – which causes the pen to erase any lines it touches. PD is pen draw, the default mode. And now, for the final one, called ANI. ANI goes: REPEAT [TA4 RT 1] Give it a go, put them all together, then sit back and watch. It is very basic, but all my attempts to make a more advanced animation have been met with failure. Perhaps you will have more luck? One more thing. This animation will never stop, and if you leave it too long, it crashes your computer. To stop it, press this icon (the one on the right)

If all goes to plan, you should see this on your screen (click to start and stop when viewing as slide show.)