MSW Logo - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

MSW Logo

Description:

FD Moves the turtle forward. BK Moves the turtle backwards. RT Turns the ... REPEAT 20[SQUARE RT 18] REPEAT 60[PENTAGON RT 6] REPEAT 10[DECAGON RT 36] ... – PowerPoint PPT presentation

Number of Views:3211
Avg rating:3.0/5.0
Slides: 10
Provided by: abbys
Category:
Tags: msw | decagon | hexagon | logo

less

Transcript and Presenter's Notes

Title: MSW Logo


1
MSW Logo
  • Drawing Polygons

2
MSW Commands
  • To ask the turtle to move I had to use the
    following commands
  • FD Moves the turtle forward
  • BK Moves the turtle backwards
  • RT Turns the turtle to the right
  • LT Turns the turtle to the left
  • CS Clears the screen
  • HT Hides the turtle
  • ST Shows the turtle

3
MSW Commands Cntd.
  • After each of the FD and BK commands we must tell
    the turtle a distance to move.
  • e.g FD 100 will move the turtle forward 100
    pixels
  • After each of the RT and LT commands we must tell
    the turtle an angle to move.
  • e.g RT 90 will turn the turtle 90 to its right

4
Steps of Drawing a Square
1) FD 100 RT 90
2) FD 100 RT 90
3) FD 100 RT 90
4) FD 100 RT 90
Quick Way REPEAT 4FD 100 RT 90
5
Steps of Drawing a Triangle
1) FD 100 RT 120
2) FD 100 RT 120
3) FD 100 RT 120
Quick Way REPEAT 3FD 100 RT 120
6
Defining a Hexagon
  • TO HEXAGON
  • REPEAT 6FD 100 RT 60
  • END
  • Now we just need to type HEXAGON every time we
    wish to draw a hexagon

7
Drawing Patterns
  • We can use defining shapes to draw patterns.
    Following are some examples
  • REPEAT 20SQUARE RT 18

8
REPEAT 60PENTAGON RT 6
9
REPEAT 10DECAGON RT 36
Write a Comment
User Comments (0)
About PowerShow.com