home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / logo / labybug / demo.bug < prev    next >
Text File  |  1989-12-31  |  3KB  |  150 lines

  1. to "poly  :d :a
  2. forward :d
  3. right :a
  4. poly :d :a
  5. end
  6.  
  7. to "start  
  8. DRAW
  9. BG 2 PC 3
  10. LT 120 HT
  11. POLYS 1 123 3
  12. PR [ Welcome to The Great Logo Adventure! ]
  13. WAIT 5
  14. PR [...powerful ideas in mind-sized bytes. ]
  15. WAIT 5
  16. UNO
  17. end
  18.  
  19. to "polys  :S :A :I
  20. IF :S > 160 [STOP]
  21. FD :S  RT :A
  22. POLYS ( :S + :I ) :A :I
  23. end
  24.  
  25. to "crystal  :count
  26. IF :COUNT > 8 STOP
  27. SHAPE
  28. LT 45
  29. FD 70
  30. MAKE "COUNT :COUNT + 1
  31. CRYSTAL :COUNT
  32. end
  33.  
  34. to "shape  
  35. REPEAT 2 [ FD 40 RT 90  ]
  36. REPEAT 2 [ FD 20 RT 90  ]
  37. FD 40 RT 90
  38. REPEAT 2 [ FD 10 RT 90 ]
  39. FD 20
  40. end
  41.  
  42. to "wait  :t
  43. IF :T = 0 STOP
  44. MAKE "T :T - 1
  45. WAIT :T
  46. end
  47.  
  48. to "final  
  49. NODRAW CT
  50. CURSOR 1 6
  51. PR [    But Logo is much more than just]
  52. PR [ Turtle Graphics. It puts some very]
  53. PR [ powerful ideas at your fingertips --]
  54. JL PR [ ideas like structured programming,]
  55. PR [        interactive graphics]
  56. PR [            local and global variables,]
  57. PR [                list processing,]
  58. PR [                   recursion.]
  59. JL PR [ Logo is a conversational language with]
  60. PR [ no threshold or ceiling. Preschoolers]
  61. PR [ can enjoy intuitive learning while]
  62. PR [ professionals can explore AI and other]
  63. PR [ advanced subjects.]
  64. WAIT 30
  65. CLEARWS
  66. LOAD "DEMO2
  67. START
  68. end
  69.  
  70. to "turtle.walk  
  71. DRAW CT HT
  72. PC 1
  73. PU SETXY 20 30 PD
  74. CRYSTAL 0
  75. PR [ A Turtle Walk. ]
  76. WAIT 10
  77. end
  78.  
  79. to "je  
  80. NODRAW CT CURSOR 1 1
  81. end
  82.  
  83. to "jc  
  84. BG 0 DRAW
  85. end
  86.  
  87. to "jl  
  88. PRINT "
  89. end
  90.  
  91. to "jp  
  92. REPEAT 3 [JI]
  93. end
  94.  
  95. to "ji  
  96. TYPE CHAR 32
  97. end
  98.  
  99. to "jb  
  100. PR [ FORWARD 50 ] WAIT 2 FD 50 WAIT 5
  101. PR [ RIGHT 90 ] WAIT 2 RT 90 WAIT 5
  102. PR [ BACK 50 ] WAIT 2 BK 50 WAIT 5
  103. PR [ LEFT 60 ] WAIT 2 LT 60 WAIT 5
  104. PR [ SETY 0 ] WAIT 2 SETY 0 WAIT 5
  105. PR [ HIDETURTLE ] WAIT 2 HT WAIT 5
  106. PR [ SETX 0 ] WAIT 2 SETX 0 WAIT 5
  107. PR [ SHOWTURTLE ] WAIT 2 ST WAIT 5
  108. PR [ PENUP ] WAIT 2 PU WAIT 5
  109. PR [ SETXY 25 10 ] WAIT 2 SETXY 25 10 wait 15
  110. PR [ PENDOWN ]  WAIT 2 PD WAIT 2
  111. PR [ REPEAT 3 [ FD 50 RT 120 ] ] WAIT 2 REPEAT 3 [ FD 50 RT 120] WAIT 5
  112. PR [ CLEARSCREEN ] WAIT 2 CS WAIT 5
  113. PR [ PC 2 ] WAIT 2 PC 2 WAIT 5
  114. PR [ REPEAT 5 [ LT 18 FD 50 REPEAT 5 [ FD 20 RT 144 ] RT 90 ] ]
  115. WAIT 2
  116. REPEAT 5 [ LT 18 FD 50 REPEAT 5 [ FD 20 rt 144 ] rt 90 ]
  117. wait 10
  118. print [ DRAW ] wait 2 DRAW wait 10
  119. print [ REPEAT 30 [ REPEAT 4 [ FD 40 RT 90 ] RT 12 ] ]
  120. wait 10
  121. repeat 30 [ repeat 4 [ fd 40 rt 90 ] rt 12 ] wait 15
  122. TURTLE.WALK
  123. FINAL
  124. end
  125.  
  126. to "uno  
  127. print [ This drawing was made with the ]
  128. wait 5
  129. print [ Logo turtle... ]
  130. wait 5
  131. je cursor 5 1
  132. print [ ...a cybernetic pet who draws as she]
  133. jl print [ moves across the screen.  By directing]
  134. jl print [ the turtle to create graphic designs, ]
  135. jl print [ programmers of all ages begin to ]
  136. jl print [ explore some unique aesthetic and ]
  137. jl print [ mathematical issues. ]
  138. cursor 1 22
  139. print [ Take a look! ]
  140. wait 15 draw st jb
  141. end
  142.  
  143. to "pr  :LIST
  144. PRINT :LIST
  145. end
  146.  
  147. t [ mathematical issues. ]
  148. cursor 1 22
  149. print [ Take a look! ]
  150. wait 15 draw st jb