home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Input 64
/
Input_64_86-01_1986_Verlag_Heinz_Weise_de.d64
/
wurfsimulator
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2023-02-26
|
7KB
|
108 lines
900 rem mp $1900-$237f input 64/joerg huth
999 poke50257,16
2000 deffnx(t)=v0*cos(a)*t
2001 deffny(t)=-g/2*t*t+v0*sin(a)*t+y0
2002 deffnt(t)=v0*sin(a)/g+sqr((v0*sin(a)/g)^2+2*y0/g)
2003 deffnm(t)=v0*cos(a)*tf
2004 deffnn(t)=(v0*sin(a))^2/g/2+y0
2005 poke53280,5:poke53281,15:print"[147]"chr$(14):g=9.81:v0=4:k=(NULL)/180:a=45*k
2010 tf=fnt(t):xk=1.8:yk=.94
2015 sy=985248
2020 poke839,1
2500 poke53280,5:poke53281,15:print"[147]"chr$(14)
2510 sys6430:gosub40000:dn$="0123456789+-.e"
3000 rem modus : eingabe (f1)
3003 poke832,1:poke53269,3
3005 print"[147] f1:[197]ingabe f3:[194]erechnung f5:[198]lugbahn"
3007 print"----------------------------------------";
3010 print"1:[215]inkel 2:[199]esch. 3:[200]oehe 4:[203]oord. 5:[195][204][211]";
3009 print"----------------------------------------[145]";
3015 poke198,0
3020 geta$:ifa$>"0"anda$<"6"then3040
3030 ifa$="[134]"then4000
3035 ifa$="[135]"then5000
3037 goto3020
3040 onasc(a$)-49goto3200,3300,3400,3500
3100 rem eingabe des winkels (modus f1)
3105 print"[147] [197]ingabe des [193]bschusswinkels ([193]lpha)"
3110 print"---------------------------------------- [193]lter [215]ert:";a/k
3120 sys8320,3,0," [193]lpha=? ":sys8352,3,9,11,dn$,x$:x=val(x$)
3130 print"[145]";:ifx<0orx>90then3105
3140 a=x*k:gosub40020:goto3005
3200 rem eingabe der abschussgeschwindigkeit (modus f1)
3205 print"[147][197]ingabe der [193]bschussgeschwindigkeit (v0)";
3210 print"---------------------------------------- [193]lter [215]ert:";v0
3220 sys8320,3,0," v0=? ":sys8352,3,6,11,dn$,x$:x=val(x$)
3230 print"[145]";:ifx<=0then3205
3240 v0=x:goto3005
3300 rem eingabe der abschusshoehe y(0) (modus f1)
3303 a$=str$(y0)
3305 print"[147] [197]ingabe der [193]bschusshoehe ( y(0) )"
3310 print"----------------------------------------[193]lt:";a$;
3320 printtab(60)"max:"str$(yk*144/165)
3325 sys8320,3,0,"y(0)=? ":sys8352,3,7,11,dn$,x$:x=val(x$)
3330 print"[145]";:ifx>=0andx<=yk*144/165theny0=x:gosub40030:goto3005
3335 goto3305
3400 rem eingabe des koodinatensystemes xk yk (modus f1)
3405 print"[147][197]ingabe des [203]oordinatensystems (x-[193]chse)";
3407 tf=fnt(t):m=fnm(tf):n=fnn(t):x=1.1*m:ifm*164/317<nthenx=1.1*n*317/164
3410 print"---------------------------------------- y= 0.5*x "
3413 ifx<=0thenx=1.0e-30
3414 kj=10^int(log(x)/log(10)):x=int(x/kj*10+.99999999)*kj/10
3415 sys8320,3,0," x=?"x" ":sys8352,3,5,11,dn$,x$:x=val(x$)
3420 print"[145]";:ifx<=0then3405
3430 xk=x:yk=x*164/317
3432 ifyk>0thenkj=10^int(log(yk)/log(10)):yk=int(yk/kj*10+.99999999)*kj/10
3435 ify0*165/144>ykthena$="undefiniert":goto3305
3440 gosub40030:goto3005
3500 sys6418:goto3005
4000 rem modus : berechnung (f3)
4003 poke832,255:poke53269,0:sys6400
4004 tf=fnt(t)
4005 print"[147] f1:[197]ingabe f3:[194]erechnung f5:[198]lugbahn"
4007 print"----------------------------------------"
4008 print"[197]ingaben:"
4009 print"[163][163][163][163][163][163][163][163][163]"
4010 print"[216]-[193]chse: "str$(xk);"m"
4020 print"[217]-[193]chse: "str$(yk);"m"
4030 print"[193]bschusswinkel: "str$(a/k);" [199]rad"
4040 print"[193]bschussgeschw.:"str$(v0);"m/s"
4050 print"[193]bschusshoehe: "str$(y0);"m"
4060 print"----------------------------------------[197]rgebnisse:"
4065 print"[163][163][163][163][163][163][163][163][163][163][163][163][163]"
4070 print"[205]ax. [198]lughoehe: "str$(fnn(t));"m"
4075 uf=fnt(t)
4080 print"[198]lugweite: "str$(fnm(tf));"m"
4090 print"[198]lugzeit: "str$(tf);"s"
4100 print"- - - - - - - - - - - - - - - - - - - -"
4110 print"x(t)="v0*cos(a)"[157]*t"
4120 print"y(t)=";-g/2"[157]*t^2+";v0*sin(a);"[157]*t+"y0
4125 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192] (c) 1986 by [201][206][208][213][212] 64 (";
4126 print"[202]oerg [200]uth)"
4130 geta$:ifa$="[133]"then3000
4140 ifa$="[135]"then5000
4150 goto4130
5000 rem modus : flugbahn (f5)
5003 poke832,1:poke53269,3
5005 print"[147] f1:[197]ingabe f3:[194]erechnung f5:[198]lugbahn"
5007 print"----------------------------------------";
5010 ifpeek(839)=0thenprint"@:[197]chtzeit +/-:vor/zurueck *:[196]raw on/off";:goto5017
5015 print"@:[197]chtzeit +/-:vor/zurueck *:[196]raw on/off";
5017 print" [197]inen [205]oment bitte ![145][145][145]":print
5030 tf=fnt(t):m=fnm(tf):ifm>xkthenx=1.1*158:t=1.1*xk*tf/m:goto5040
5035 x=m/xk*158:t=tf
5040 poke842,x:poke841,(x-peek(842))*256:s=sy*t/511
5050 ifs>4.294967e9thens=256^4-1
5060 p=256^4:forx=0to3:p=p/256:poke846-x,s/p:s=s-peek(846-x)*p:next
5200 ab=y0*164/yk:t0=v0*sin(a)*164*t/yk/511:t1=-g*164*t*t/2/yk/511/511
5220 poke847,ab+1:sys6427,t0,t1
6990 print" [145][145]"
6995 print"x:"str$(xk)"m"tab(20)"y:"str$(yk)"m";
7000 poke198,0:sys6424:ifpeek(840)=1then3000
7010 goto4000
9999 end
40000 poke828,111:sys6406:sys6412:gosub40020:poke837,226-(y0/yk*163)
40010 sys6421:return
40020 poke835,a*60/(NULL):sys6415:return
40030 poke837,226-(y0/yk*163):sys6421:return