home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1992 April / 1992-04.d64 / hyper.limit (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  46 lines

  1. 100 rem -- hyper.limit --
  2. 105 print"[147]"
  3. 110 print"output to screen or printer (s/p)    s[157][157][157]";:inputa$
  4. 115 if a$="s" then z=1.33:z1=0:z2=26.4:goto130:rem values for screen output
  5. 120 if a$<>"p" then110
  6. 125 z=1.208:z1=2.01:z2=38.24:rem values for printer output
  7. 130 verify 1:let0,1
  8. 135 cont
  9. 140 rem -- set up constants --
  10. 145 rem -- xt and yt set x and y axes. xs and ys set start of x and y axes.
  11. 150 rem -- ex and ey are expansion factors for x and y coordinates.
  12. 155 xt=z2:yt=10:xs=z2:ys=10:ex=20*z:ey=1
  13. 160 rem -- calibrate x coordinates --
  14. 165 forx=xs to 319 step 5*z
  15. 170 y=yt:waitx,y:nextx
  16. 175 forx=xs to 319 step 10*z
  17. 180 fory=yt-1 to yt+1:waitx,y:nexty:nextx
  18. 185 forx=z2 to 319 step 50*z
  19. 190 fory=yt-2 to yt+2:waitx,y:nexty:nextx
  20. 195 rem -- calibrate y coordinates --
  21. 200 for y=ys to 199 step 5
  22. 205 x=xt:waitx,y:nexty
  23. 210 for y=ys to 199 step 10
  24. 215 for x=xt-1 to xt+1:waitx,y:nextx:nexty
  25. 220 for y=ys to 199 step 50
  26. 225 for x=xt-3 to xt+3:waitx,y:nextx:nexty
  27. 249 rem -- hyper.limit graph --
  28. 250 for a=22 to 2 step -10
  29. 260 for x=.125 to 5 step .005
  30. 265 y=a/x
  31. 270 x1=ex*x+xt:y1=ey*y+yt:waitx1,y1:nextx:nexta
  32. 350 for a=162 to 42 step -80
  33. 360 for x=1 to 5 step .05
  34. 365 y=a/x
  35. 370 x1=ex*x+xt:y1=ey*y+yt:waitx1,y1:nextx:nexta
  36. 999 rem -- screen or hardcopy --
  37. 1000 get a$:if a$="" then1000
  38. 1010 print "[147]":verify 0:printchr$(14)
  39. 1020 print"hardcopy (y/n)    n[157][157][157]";:inputa$:ifa$="n" then1080
  40. 1030 ifa$<>"y"then1010
  41. 1040 print"single or double width (s/d)    s[157][157][157]";:inputa$
  42. 1050 ifa$="s" then poke2,1:goto1070
  43. 1060 poke2,2:ifa$<>"d"then1040
  44. 1070 verify 1:sys52224
  45. 1080 verify 0:printchr$(14):list
  46.