home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / libbasic / exponent.bas < prev    next >
BASIC Source File  |  1992-04-21  |  689b  |  33 lines

  1.  
  2.  
  3.     ' draw an exponential graph
  4.  
  5.     open "Here is an exponential curve" for graphics as #g
  6.  
  7.     print #g, "color blue"
  8.     print #g, "down"
  9.  
  10.     for x = 1 to 300 step 25
  11.         print #g, "line "; x ; " 0"; " "; x ; " 350"
  12.         print #g, "line 0 "; x; " 350 "; x
  13.     next x
  14.  
  15.     print #g, "place 0 0"
  16.     print #g, "color red"
  17.  
  18.     for x = 1 to 270 step 10
  19.         print #g, "goto "; x ; " "; (x * x / 260) + 10
  20.         print #g, "place "; x ; " "; (x * x / 260) + 10
  21.         print #g, "\o"
  22.     next x
  23.  
  24.     print #g, "place 0 32"
  25.     print #g, "color green"
  26.     print #g, "\\\Exponential \Plot "
  27.  
  28.         print #g, "flush"
  29.  
  30.     input r$
  31.  
  32.     close #g
  33.