home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / libbasic / turtle2.bas < prev    next >
BASIC Source File  |  1992-03-10  |  772b  |  38 lines

  1.  
  2.     ' This is a turtle graphics demo
  3.  
  4.     dim color$(3)
  5.  
  6.     color$(0) = "red"
  7.     color$(1) = "green"
  8.     color$(2) = "yellow"
  9.     color$(3) = "blue"
  10.  
  11.     print "Opening Graphics Window"
  12.     open "Turtle Graphics Spiral" for graphics_fs as #turtleOut
  13.  
  14.     print "Writing spiral data..."
  15.  
  16.     print #turtleOut, "home"
  17.     print #turtleOut, "down"
  18.     print #turtleOut, "north"
  19.     print #turtleOut, "fill black"
  20.     print #turtleOut, "size 8"
  21.  
  22.     for x = 1 to 200
  23.         print #turtleOut, "color "; color$(x - int(x/4) * 4)
  24.         print #turtleOut, "turn 122"
  25.         print #turtleOut, "go "; x*2
  26.     next x
  27.  
  28.     print #turtleOut, "flush"
  29.  
  30.     input r$
  31.  
  32.     print "Closing Window" : print
  33.     close #turtleOut
  34.  
  35.     print "Done."
  36.  
  37.  
  38.