1 / 23

Programming Class

Programming Class. Logo Programming Fall 2011 – Session 7. Teacher: M. Taghizadeh Sobhan Highschool. Pen Up, Pen Down. So far, all of our drawings have had two limitations. First, they are entirely made up of lines (no solid shapes). Second, all of the lines are connected.

caelan
Download Presentation

Programming Class

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Class Logo Programming Fall 2011 – Session 7 Teacher: M. Taghizadeh Sobhan Highschool

  2. Pen Up, Pen Down So far, all of our drawings have had two limitations. First, they are entirely made up of lines (no solid shapes). Second, all of the lines are connected. In this lesson, we will overcome these limitations. We will learn how to move the turtle without drawing a line. We will also learn how to fill in the outline of a shape with a solid color.

  3. Pen Up, Pen Down • PU PEN UP • PD PEN DOWN

  4. Pen Up, Pen Down Draw a dashed line

  5. Pen Up, Pen Down Draw a dashed line • REPEAT 10 [ • FD 5 • PU • FD 5 • PD • ]

  6. Pen Up, Pen Down Draw a dashed line in function 1 • To dash :length • REPEAT :length/10 [ • FD 5 PU FD 5 PD • ] • End • Dash 300

  7. Pen Up, Pen Down Draw a dashed line in function 2 • To dash :length :size • REPEAT int(:length/(:size*2)) [ • FD :size PU FD :size PD • ] • End • Dash 300 8

  8. Pen Up, Pen Down INT Function • Repeat 10 [ ... ] • Repeat 20 [ ... ] • Repeat 17 [ ... ] • Repeat integer [ ... ]

  9. Pen Up, Pen Down INT Function • Int ( number ) integer of number • Int (17.7) 17 • Int (13.33333) 13 • Int (758.254) 758

  10. Pen Up, Pen Down Draw a dashed line in function 3 • To dash :length :size1 :size2 • REPEAT int(:length/(:size1+:size2)) [ • FD :size1 PU FD :size2 PD • ] • End • Dash 300 5 10

  11. Pen Up, Pen Down Draw a dashed rectangle • To dash :length :size • REPEAT int(:length/:size*2) [ • FD :size PU FD :size PD • ] • End • repeat 4 [dash 300 10 rt 90]

  12. Pen Up, Pen Down Draw a series of rectangles 50 10

  13. Pen Up, Pen Down Draw a series of rectangles • TO SQUARE :LENGTH • REPEAT 4 [ FD :LENGTH RT 90 ] • END • To rect_series • repeat 5 [ • square 50 • pu • rt 90 fd 60 lt 90 • pd • ] • end

  14. Pen Up, Pen Down Draw a series of circles 50 10

  15. Pen Up, Pen Down Draw a series of circles • To circles_series • repeat 5 [ • circle 50 • pu • rt 90 fd 110 lt 90 • pd • ] • end

  16. Pen Up, Pen Down Draw a series of rectangles 60 100

  17. Pen Up, Pen Down Draw a series of rectangles

  18. Pen Up, Pen Down Draw a series of circles

  19. Pen Up, Pen Down Draw a series of circles

  20. Pen Up, Pen Down Draw a series of 6-edges HIVE

  21. Procedure Saving Drawings • Bitmap • Save As

  22. Procedure Change Pen Color, Pen Size, Color Screen • Set • Pen Size • Pen Color • Screen Color

  23. The End Logo Programming Fall 2011 – Session 7 Teacher: M. Taghizadeh Sobhan Highschool

More Related