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 >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
70 lines
10 rem christian schoske
20 (NULL)1,"o=1:goto90"+chr$(13)
30 (NULL) 2,"run"+chr$(13)
40 (NULL) 3,"o=0:goto90"+chr$(13)
50 (NULL)0
60 print"[147]geben sie fuer f(x) die funktion ein. anschliessend return[146] druecken"
70 print"f1[146] bildschirm loeschen":print"f3[146] bildschiem nicht loeschen":print
80 print"200 def fna(q)=f(x)" :end
90 rem
100 (NULL)0:print:print:input"masstab ";sc
110 print:print"koordinatensystem "
120 print:printspc(3)"[170]"spc(8)"[170]"spc(9)"[170]"spc(17)"1 [170]"spc(8)"[170] 2"spc(6)"[170] 3"
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] "
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]"
150 get(NULL)a$:a%=val(a$):ifa%<1ora%>3then150
160 (NULL)1,1,1
170 (NULL)1,o:(NULL)1,38,0," "
180 ona%goto 330,350,370
190 rem
200 def fna(q)=sqr(x)
210 z=0
220 (NULL)
230 x=(-ax+z)/sc
240 (NULL)270
250 y=sc*(fna(x))
260 (NULL)1,z,ay-y
270 z=z+1
280 (NULL)(NULL)z<320
290 (NULL)1,38,0,"e"
300 get(NULL)a$:ifa$="c"then620:(NULL)(NULL)0
310 print"[147]f1 neuer masstab":print"f2 neue funtion[145]"
320 end
330 ay=100:ax=160:(NULL)1,0,ayto320,ay:(NULL)1,ax,0toax,200
340 goto380
350 ay=199:ax=0:(NULL)1,ax,0toax,ay:(NULL)1,ax,ayto320,ay
360 goto380
370 ay=100:ax=0:(NULL)1,ax,0toax,200:(NULL)1,ax,ayto320,ay
380 gosub400:ifo<>0thengosub510
390 goto190
400 we =320/sc
410 ifwe >=230thenm=50
420 ifwe >=200andwe <230thenm=25
430 ifwe >=120andwe <200thenm=20
440 ifwe >= 65andwe <120thenm=10
450 ifwe >= 26andwe < 65thenm=5
460 ifwe >= 13andwe < 26thenm=2
470 ifwe<13thenm=1:f=1
480 return
510 ya=ay: xa=ax:mc=0:ifm>1thenf=1
520 (NULL)
530 ford=1tom
540 xa=xa+sc:ya=ya-sc:if(xa/f)>312then(NULL)
550 nextd:mc=mc+1
560 if(xa/f/8)-1>39then580
570 (NULL)1,(xa/f),ayto(xa/f),(ay-5):(NULL)1,(xa/f/8-1),(ay/8)-1,str$(mc*m)
580 if(ya/f/8)<1then600
590 (NULL)1,ax,(ya/f)to(ax+5),(ya/f):(NULL)1,(ax/8+1),(ya/f/8),str$(mc*m)
600 (NULL)
610 return
620 open4,4:z=0:cmd4
630 fora=0to27
640 forb=0to31
650 forc=0to10
660 ford=0to6:(NULL)(b*10+c),(a*7+d):if(NULL)(2)=1thenz=z+2^d
670 nextd
680 z=z+128:a$=a$+chr$(z):z=0:nextc
690 printchr$(8)a$;:a$="":nextb
700 print" ":nexta
710 print#4,chr$(15):close4:goto300