home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 3 / 64er_Magazin_Sonderheft_03_86-03_1986_Markt__Technik_de_Side_B.d64 / funktionsplotter (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  70 lines

  1. 10 rem christian schoske
  2. 20 (NULL)1,"o=1:goto90"+chr$(13)
  3. 30 (NULL) 2,"run"+chr$(13)
  4. 40 (NULL) 3,"o=0:goto90"+chr$(13)
  5. 50 (NULL)0
  6. 60 print"[147]geben sie fuer f(x) die funktion ein.   anschliessend return[146] druecken"
  7. 70 print"f1[146] bildschirm loeschen":print"f3[146] bildschiem nicht loeschen":print
  8. 80 print"200 def fna(q)=f(x)" :end
  9. 90 rem
  10. 100 (NULL)0:print:print:input"masstab ";sc
  11. 110 print:print"koordinatensystem "
  12. 120 print:printspc(3)"[170]"spc(8)"[170]"spc(9)"[170]"spc(17)"1  [170]"spc(8)"[170]  2"spc(6)"[170]  3"
  13. 130 print"[175][175][175][186][175][175][175][175]"spc(4)"[170]"spc(9)"[170][175][175][175][175][175][175][175]"spc(13)"[170]"spc(8)"[170]"spc(9)"[170] "
  14. 140 printspc(3)"[170]"spc(8)"[170]"spc(9)"[170]"spc(20)"[170]"spc(8)"[170][175][175][175][175][175][175][175][175] [170]"
  15. 150 get(NULL)a$:a%=val(a$):ifa%<1ora%>3then150
  16. 160 (NULL)1,1,1
  17. 170 (NULL)1,o:(NULL)1,38,0," "
  18. 180 ona%goto 330,350,370
  19. 190 rem
  20. 200 def fna(q)=sqr(x)
  21. 210 z=0
  22. 220 (NULL)
  23. 230 x=(-ax+z)/sc
  24. 240 (NULL)270
  25. 250 y=sc*(fna(x))
  26. 260 (NULL)1,z,ay-y
  27. 270 z=z+1
  28. 280 (NULL)(NULL)z<320
  29. 290 (NULL)1,38,0,"e"
  30. 300 get(NULL)a$:ifa$="c"then620:(NULL)(NULL)0
  31. 310 print"[147]f1 neuer masstab":print"f2 neue funtion[145]"
  32. 320 end
  33. 330 ay=100:ax=160:(NULL)1,0,ayto320,ay:(NULL)1,ax,0toax,200
  34. 340 goto380
  35. 350 ay=199:ax=0:(NULL)1,ax,0toax,ay:(NULL)1,ax,ayto320,ay
  36. 360 goto380
  37. 370 ay=100:ax=0:(NULL)1,ax,0toax,200:(NULL)1,ax,ayto320,ay
  38. 380 gosub400:ifo<>0thengosub510
  39. 390 goto190
  40. 400 we =320/sc
  41. 410 ifwe >=230thenm=50
  42. 420 ifwe >=200andwe <230thenm=25
  43. 430 ifwe >=120andwe <200thenm=20
  44. 440 ifwe >= 65andwe <120thenm=10
  45. 450 ifwe >= 26andwe < 65thenm=5
  46. 460 ifwe >= 13andwe < 26thenm=2
  47. 470 ifwe<13thenm=1:f=1
  48. 480 return
  49. 510 ya=ay:   xa=ax:mc=0:ifm>1thenf=1
  50. 520 (NULL)
  51. 530 ford=1tom
  52. 540 xa=xa+sc:ya=ya-sc:if(xa/f)>312then(NULL)
  53. 550 nextd:mc=mc+1
  54. 560 if(xa/f/8)-1>39then580
  55. 570 (NULL)1,(xa/f),ayto(xa/f),(ay-5):(NULL)1,(xa/f/8-1),(ay/8)-1,str$(mc*m)
  56. 580 if(ya/f/8)<1then600
  57. 590 (NULL)1,ax,(ya/f)to(ax+5),(ya/f):(NULL)1,(ax/8+1),(ya/f/8),str$(mc*m)
  58. 600 (NULL)
  59. 610 return
  60. 620 open4,4:z=0:cmd4
  61. 630 fora=0to27
  62. 640 forb=0to31
  63. 650 forc=0to10
  64. 660 ford=0to6:(NULL)(b*10+c),(a*7+d):if(NULL)(2)=1thenz=z+2^d
  65. 670 nextd
  66. 680 z=z+128:a$=a$+chr$(z):z=0:nextc
  67. 690 printchr$(8)a$;:a$="":nextb
  68. 700 print" ":nexta
  69. 710 print#4,chr$(15):close4:goto300
  70.