Download presentation
Presentation is loading. Please wait.
Published byJeffry Austin Modified over 8 years ago
1
LOGO WHAT IS IT? HOW TO USE IT AND HOW USEFUL CAN IT BE?
2
HOW TO GET LOGO32 In St Andrews school computer system, you can get the program in the ‘take home software’ file. Y:\highschool\ict\takehomesoftware\Logo. You can download and install Logo from these websites: http://www.softronix.com/logo.html http://www.softronix.com/download/mswlogo65.exe
3
WHAT IS LOGO? Logo is a programming language created to direct, command the turtle to move around. Logo is used in robotic control, telecommunications and multimedia.
4
This command draws a triangle Where commands are shown Insert commands here The turtle/pen Edall
5
BASICS COMMANDS NEED TO KNOW: fd & bk : forwards and backwards. lt & rt : Left turn and right turn. pu & pd : Pen up and Pen down. Here are some simple shapes: pd Fd 100 rt 90 Fd 100 rt 90 Fd 100 rt 90 fd 100 pd rt 45 forward 90 rt 90 forward 90 rt 90 rt 45 forward 90 forward 20 The number that goes after ‘fd’ is the number of step you want the turtle to take. (100 steps is approx. 10 cm) The number that goes after ‘rt’ or ‘lt’ is the number of degrees, you want the turtle to turn.
6
ADVANCE COMMANDS More advance commands include: Repeat ARC Setfloodcolor and fill If a mistake is made, penerase can be used. The circle code is already built into the system. So instead of typing ‘ ACR 360 100’, you can just type ‘circle 100’. This is repeat of six triangles with pen colour and fill.
7
COLOURING TO COLOUR THE SHAPE: (remember to use American spelling while writing commands!) Setfloodcolor: this set the colour to a colour RGB (RED GREEN BLUE)values, which you need to put in after setfloodcolor. The values goes form 0 to 255. ex: setfloodcolor [255 0 0] this give a red colour. fill – fill in the color that was set. In order to fill, the turtle need to be in the shape that was to be colored, when commanded fill color that was set by setfloodcolor will fills the area. TO CHANGE PEN COLOUR AND SIZE: SetPC: set pen color. This set the colours of the line that will be drawn following this command. An RGB of colours need to be put in also. Ex: SetPC [0 255 0] changes the pen color to green SetPenSize: set pen size. This set the size of the line that is to be drawn. The width of the pen is to be put in also. Ex: SetPenSize [2 2] Pennormal: change pen back to normal size and colour. Which is back.
8
PROCEDURE What is procedure? Procedure is the thing you want to make. For example: to square :length REPEAT 4 [FD :length RT 90] end The square is what you want to make. So it is a procedure.
9
SUB-ROUTINES What is a Sub-routine? A sub-routine is all the command you need to make a procedure. For example: to square :length REPEAT 4 [FD :length RT 90] end This is the command or ‘routine’ that the turtle have to follow to carry out an procedure.
10
VARIABLE - LENGTH Variable is data that change. ‘Length’ is one variable in the command. For example (this is typed into edall): to square :length REPEAT 4 [FD :length RT 90] end Is added here so later when inputting the code you can just type ‘square 100’ ( 100 paces/units)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.