Monday, June 8, 2009

How to use MSW Logo

Microsoft Logo is a basic programming tool that can be used to make many intricate designs. First you must learn the simple commands and then you can move on to the more intricate problems.

First of all I have to introduce the turtle




The turtle moves based on your commands and draws as it moves

The basic commands are:
Fd=Forward and it is followed by a length such as fd 100 which means forward 100 turtle steps while drwing a line
Rt= Rotate right and it is followed by the number of degrees such as rt 90 which rotates the turtle right to make a right angle
Lt= Rotate left and it is followed by the number of degrees such as lt 90 which rotates the turtle left to make a right angle angle

Now that you know these basic commands it is time to learn how to make some shapes.

Square: The way to start this process is by entering the command "to square" giving you an input box. The next step is entering "repeat 4 [fd 100 rt 90]" and then you will end the process by entering end.







Trianlges: The way to start this process is by entering the command "to strianlg" giving you an input box. The next step is entering "left repeat 3 [fd 100 rt 120]" and then you will end the process by entering end.

Now to move on to resizeable shapes.

Resizeable Square: The way to start this process is by entering the command "to square :length" giving you an input box. The next step is entering "repeat 4 [fd :length rt 90]" and then you will end the process by entering end. The reason you put :length is because that allows you to enter square 100 or square 150 and each time the turtle will go forward 100 or 150 turtle steps based on the length you entered.

Resizeable Triangle: The way to start this process is by entering the command "to triangle :length" giving you an input box. The next step is entering "repeat 3 [fd :length rt 120]" and then you will end the process by entering end. The reason you put :length is because that allows you to enter triangle 100 or triangle 150 and each time the turtle will go forward 100 or 150 turtle steps based on the length you entered.


The next round of shapes will be rotated shapes.

Rotated Squares: This will have not one but six squares in the figure. First you make a square and then enter rt 60. You repeat this process six times to make six squares. The easy command for this shape is "repeat 6 [square rt 60]"


Rotated Triangle: This figure will have not one but 6 triangles. First you make a triangle and then enter rt 60. You repeat this process six times to make six triangles. The easy command for this shape is "repeat 6 [triangle rt 60]". If it comes out looking weird then you need to enter lt 90 before you start the process so your turtle is in the right place.


A really cool design you can make in logo is based off the rotated triangle

The way I made this shape was by making the rotated triangle and then continued on to do fd 100, lt 120, square, fd 100, lt 60, square, fd 100, lt 60, square, fd 100, lt 60, square, fd 100, lt 60, square, fd 100, lt 60 and finally square.