home *** CD-ROM | disk | FTP | other *** search
/ Magic Disk 64 / Magic_Disk_64_93-12_1993_-_de_Side_B.d64 / geo-meister / geo-meister .a7ae (.txt)
Encoding:
Commodore BASIC  |  1996-01-01  |  9.6 KB  |  506 lines

  1. 10 rem geo-meister v1.0
  2. 20 rem (c) 1993 by oliver keineke
  3. 30 rem :
  4. 40 rem fuer magic disk 64
  5. 50 :
  6. 60 clr:dimm$(100):goto260
  7. 70 :
  8. 80 rem =================
  9. 90 rem = prozedur   f1 =
  10. 100 rem =================
  11. 110 :
  12. 120 poke214,22:sys58640:printtab(12)"- [198]1  druecken -"
  13. 130 get a$:if a$="" then 110
  14. 140 if a$<>"[133]" then 110
  15. 150 return
  16. 160 :
  17. 170 rem =================
  18. 180 rem = systemmeldung =
  19. 190 rem =================
  20. 200 :
  21. 210 print"[147]        *** [199]eo-[205]eister [214]1.0 ***          "
  22. 220 print"[145]       (c) 1993 by [207]liver [203]eineke[160]      "
  23. 230 print"[145][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]"
  24. 240 return
  25. 250 :
  26. 260 rem ============================
  27. 270 rem = definition d. funktionen =
  28. 280 rem ============================
  29. 290 :
  30. 300 def fnhg(x)=(x/2)*sqr(3)
  31. 310 def fnfg(x)=((x*x)/4)*sqr(3)
  32. 320 :
  33. 330 def fndq(x)=x*sqr(2)
  34. 340 def fnfq(x)=x*x
  35. 350 :
  36. 360 def fnuk(x)=2*(NULL)*x
  37. 370 def fnfk(x)=(NULL)*x*x
  38. 380 :    
  39. 390 def fndw(x)=x*sqr(3)
  40. 400 def fnvw(x)=x*x*x
  41. 410 def fnow(x)=6*(x*x)
  42. 420 :
  43. 430 def fnvt(x)=((x*x*x)/12)*sqr(2)
  44. 440 def fnot(x)=x*x*sqr(3)
  45. 450 def fnht(x)=(x/3)*sqr(6)
  46. 460 :
  47. 470 def fnvk(x)=(4/3)*x*x*x*(NULL)
  48. 480 def fnok(x)=4*x*x*(NULL)
  49. 490 :
  50. 500 rem ==============
  51. 510 rem = hauptmenue =
  52. 520 rem ==============
  53. 530 :
  54. 540 printchr$(14):poke657,128:poke788,52:poke792,193
  55. 550 poke53280,2:poke53281,10:poke646,2
  56. 560 a=1:gosub 170
  57. 570 printtab(12)"[200]auptmenue"
  58. 580 printtab(11)"[183][183][183][183][183][183][183][183][183][183][183][183]"
  59. 590 for i=1 to 3
  60. 600 read m$(i)
  61. 610 print tab(10)m$(i):print
  62. 620 next i
  63. 630 gosub 670
  64. 640 on a goto 830,2480,4870
  65. 650 data"[198]laechenfiguren","[210]aumfiguren","[208]rogrammende"
  66. 660 :
  67. 670 rem ==================
  68. 680 rem = auswahlroutine =
  69. 690 rem ==================
  70. 700 :
  71. 710 poke214,2*a+5:poke211,10:sys58640:print""m$(a)
  72. 720 get x$:if x$="" then 720
  73. 730 if x$=chr$(13) then return
  74. 740 if x$="" then 790
  75. 750 if x$<>"[145]" then 720
  76. 760 poke214,2*a+5:poke211,10:sys58640:print m$(a)
  77. 770 a=a-1:if a<1 then a=1
  78. 780 goto 710
  79. 790 poke214,2*a+5:poke211,10:sys58640:print m$(a)
  80. 800 a=a+1:if a>3 then a=3
  81. 810 goto 710
  82. 820 :
  83. 830 rem ============================
  84. 840 rem = menue 1: flaechenfiguren =
  85. 850 rem ============================
  86. 860 :
  87. 870 a=1:gosub 170
  88. 880 :
  89. 890 printtab(8)"[205]enue 1: [198]laechenfiguren"
  90. 900 printtab(7)"[183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
  91. 910 for i=1 to 7
  92. 920 read m$(i)
  93. 930 print tab(8)m$(i)
  94. 940 next i
  95. 950 gosub 1000
  96. 960 on a goto 1160,1370,1550,1730,1940,2110,2310
  97. 970 data "gleichseitiges [196]reieck","allgemeines [196]reieck","[209]uadrat","[210]echteck"
  98. 980 data "[208]arallelogramm","[212]rapez","[203]reis"
  99. 990 :
  100. 1000 rem =====================
  101. 1010 rem = 2. auswahlroutine =
  102. 1020 rem =====================
  103. 1030 :
  104. 1040 poke214,a+6:poke211,8:sys58640:print""m$(a)
  105. 1050 get x$:if x$="" then 1050
  106. 1060 if x$=chr$(13) then return
  107. 1070 if x$="" then 1120
  108. 1080 if x$<>"[145]" then 1050
  109. 1090 poke214,a+6:poke211,8:sys58640:print m$(a)
  110. 1100 a=a-1:if a<1 then a=1
  111. 1110 goto 1000
  112. 1120 poke214,a+6:poke211,8:sys58640:print m$(a)
  113. 1130 a=a+1:if a>7 then a=7
  114. 1140 goto 1000
  115. 1150 :
  116. 1160 rem ====================
  117. 1170 rem = gleichs. dreieck =
  118. 1180 rem ====================
  119. 1190 :
  120. 1200 gosub 170
  121. 1210 :
  122. 1220 poke19,64
  123. 1230 input"[211]eitenlaenge a : ";sl
  124. 1240 poke19,0
  125. 1250 print:print
  126. 1260 print"      2"
  127. 1270 print"     a   [160] 1/2"
  128. 1280 print" [193] = [192]  * 3     =";fnfg(sl)
  129. 1290 print"     4"
  130. 1300 print
  131. 1310 print"     a   [160][160]1/2"
  132. 1320 print" h = [192] *[160] 3     =";fnhg(sl)
  133. 1330 print"     2"
  134. 1340 :
  135. 1350 gosub 80:goto 10
  136. 1360 :
  137. 1370 rem ===================
  138. 1380 rem = allgem. dreieck =
  139. 1390 rem ===================
  140. 1400 :
  141. 1410 gosub 170
  142. 1420 :
  143. 1430 poke19,64
  144. 1440 input"[199]rundseite g : ";ga
  145. 1450 poke19,0:print:poke19,64
  146. 1460 input"[200]oehe      h : ";ha
  147. 1470 poke19,0
  148. 1480 print:print
  149. 1490 aa=(1/2)*ga*ha
  150. 1500 print"     1"
  151. 1510 print" [193] = [192] * g * h = ";aa
  152. 1520 print"     2"
  153. 1530 gosub 80:goto 10
  154. 1540 :
  155. 1550 rem ===========
  156. 1560 rem = quadrat =
  157. 1570 rem ===========
  158. 1580 :
  159. 1590 gosub 170
  160. 1600 :
  161. 1610 poke19,64
  162. 1620 input"[211]eitenlaenge a : ";sq
  163. 1630 poke19,0
  164. 1640 print:print:print"  d = [196]iagonale":print
  165. 1650 print"          1/2"
  166. 1660 print" d = a * 2    = ";fndq(sq)
  167. 1670 print:print
  168. 1680 print"      2"
  169. 1690 print" [193] = a        = ";fnfq(sq)
  170. 1700 :
  171. 1710 gosub 80:goto 10
  172. 1720 :
  173. 1730 rem ============
  174. 1740 rem = rechteck =
  175. 1750 rem ============
  176. 1760 :
  177. 1770 gosub 170
  178. 1780 :
  179. 1790 poke19,64
  180. 1800 input"[211]eitenlaenge a : ";ar
  181. 1810 poke19,0:print:poke19,64
  182. 1820 input"[211]eitenlaenge b : ";br
  183. 1830 poke19,0
  184. 1840 print:print:print"  d = [196]iagonale":print
  185. 1850 dr=sqr( (ar*ar)+(br*br) )
  186. 1860 fr=ar*br
  187. 1870 print"                1/2"
  188. 1880 print"     [176]  2    2 [174]
  189. 1890 [153]" d = / a  + b  exp       = ";dr
  190. 1900 [153]:[153]" atn = a * b             = ";fr
  191. 1910 :
  192. 1920 [141] 80:[137] 10
  193. 1930 :
  194. 1940 [143] ==================
  195. 1950 [143] = parallelogramm =
  196. 1960 [143] ==================
  197. 1970 :
  198. 1980 [141] 170
  199. 1990 :
  200. 2000 [151]19,64
  201. 2010 [133]"chr$rundseite g : ";gp
  202. 2020 [151]19,0:[153]:[151]19,64
  203. 2030 [133]"left$oehe      h : ";hp
  204. 2040 [151]19,0
  205. 2050 [153]:[153]
  206. 2060 fp[178]gp[172]hp
  207. 2070 [153]" atn = g * h = ";fp
  208. 2080 :
  209. 2090 [141] 80:[137] 10
  210. 2100 :
  211. 2110 [143] ==========
  212. 2120 [143] = trapez =
  213. 2130 [143] ==========
  214. 2140 :
  215. 2150 [141] 170
  216. 2160 :
  217. 2170 [151]19,64
  218. 2180 [133]"(NULL)eitenlaenge a : ";at
  219. 2190 [151]19,0:[153]:[151]19,64
  220. 2200 [133]"(NULL)eitenlaenge c : ";ct
  221. 2210 [151]19,0:[153]:[151]19,64
  222. 2220 [133]"left$oehe        h : ";ht
  223. 2230 [151]19,0:[153]:[153]
  224. 2240 ft[178]((at[170]ct)[173]2)[172]ht
  225. 2250 [153]"     a+c"
  226. 2260 [153]" atn = tantantan * h = ";ft
  227. 2270 [153]"      2"
  228. 2280 :
  229. 2290 [141] 80:[137] 10
  230. 2300 :
  231. 2310 [143] =========
  232. 2320 [143] = kreis =
  233. 2330 [143] =========
  234. 2340 :
  235. 2350 [141] 170
  236. 2360 :
  237. 2370 [151]19,64
  238. 2380 [133]"(NULL)adius r : ";rk
  239. 2390 [151]19,0
  240. 2400 [153]:[153]:[153]"  (NULL) =close(NULL)mfang":[153]
  241. 2410 [153]" (NULL) = 2 *closepi * r = ";[165]uk(rk)
  242. 2420 [153]
  243. 2430 [153]"           2"
  244. 2440 [153]" atn = pi * r     = ";[165]fk(rk)
  245. 2450 :
  246. 2460 [141] 80:[137] 10
  247. 2470 :
  248. 2480 [143] ========================
  249. 2490 [143] = menue 2: raumfiguren =
  250. 2500 [143] ========================
  251. 2510 :
  252. 2520 a[178]8:b[178]1:[141] 170
  253. 2530 :
  254. 2540 [153][163]10)"(NULL)enue 2: (NULL)aumfiguren"
  255. 2550 [153][163]7)"usrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusr"
  256. 2560 [129] i[178]1 [164] 16
  257. 2570 [135] m$(i)
  258. 2580 [139] i[179]8 [167] [130] i
  259. 2590 [153] [163]9)m$(i)
  260. 2600 [130] i
  261. 2610 [141] 2670
  262. 2620 [145] b [137] 2850,3060,3320,3530,3710,3940,4150,4380,4690
  263. 2630 [131] "(NULL)uerfel","(NULL)uader","(NULL)risma","(NULL)yramide","regulaeres (NULL)etraeder"
  264. 2640 [131] "allgemeiner (NULL)ylinder","gerader (NULL)reiszylinder","gerader (NULL)reiskegel"
  265. 2650 [131] "(NULL)ugel"
  266. 2660 :
  267. 2670 [143] =====================
  268. 2680 [143] = 3. auswahlroutine =
  269. 2690 [143] =====================
  270. 2700 :
  271. 2710 [151]214,b[170]6:[151]211,9:[158]58640:[153]""m$(a)
  272. 2720 [161] x$:[139] x$[178]"" [167] 2720
  273. 2730 [139] x$[178][199](13) [167] [142]
  274. 2740 [139] x$[178]"" [167] 2800
  275. 2750 [139] x$[179][177]"on" [167] 2720
  276. 2760 [151]214,b[170]6:[151]211,9:[158]58640:[153] m$(a)
  277. 2770 a[178]a[171]1:[139] a[179]8 [167] a[178]8
  278. 2780 b[178]b[171]1:[139] b[179]1 [167] b[178]1
  279. 2790 [137] 2670
  280. 2800 [151]214,b[170]6:[151]211,9:[158]58640:[153] m$(a)
  281. 2810 a[178]a[170]1:[139] a[177]16 [167] a[178]16
  282. 2820 b[178]b[170]1:[139] b[177]9 [167] b[178]9
  283. 2830 [137] 2670
  284. 2840 :
  285. 2850 [143] ===========
  286. 2860 [143] = wuerfel =
  287. 2870 [143] ===========
  288. 2880 :
  289. 2890 [141] 170
  290. 2900 :
  291. 2910 [151]19,64
  292. 2920 [133]"(NULL)eitenlaenge a : ";aw
  293. 2930 [151]19,0
  294. 2940 [153]:[153]:[153]"  d = (NULL)aumdiagonale; (NULL) = (NULL)berflaeche":[153]
  295. 2950 [153]"          1/2"
  296. 2960 [153]" d = a * 3      = ";[165]dw(aw)
  297. 2970 [153]:[153]
  298. 2980 [153]"      3"
  299. 2990 [153]" (NULL) = a          = ";[165]vw(aw)
  300. 3000 [153]:[153]
  301. 3010 [153]"          2"
  302. 3020 [153]" (NULL) = 6 * a      = ";[165]ow(aw)
  303. 3030 :
  304. 3040 [141] 80:[137] 10
  305. 3050 :
  306. 3060 [143] ==========
  307. 3070 [143] = quader =
  308. 3080 [143] ==========
  309. 3090 :
  310. 3100 [141] 170
  311. 3110 :
  312. 3120 [151]19,64
  313. 3130 [133]"(NULL)eitenlaenge a : ";aw
  314. 3140 [151]19,0:[153]:[151]19,64
  315. 3150 [133]"(NULL)eitenlaenge b : ";bw
  316. 3160 [151]19,0:[153]:[151]19,64
  317. 3170 [133]"(NULL)eitenlaenge c : ";cw
  318. 3180 [151]19,0:[153]:[153]:[153]"  d = (NULL)aumdiagonale; (NULL) = (NULL)berflaeche":[153]
  319. 3190 dq[178][186]( (aw[172]aw)[170](bw[172]bw)[170](cw[172]cw) )
  320. 3200 vq[178]aw[172]bw[172]cw
  321. 3210 oq[178]2[172](aw[172]bw[170]bw[172]cw[170]cw[172]aw)
  322. 3220 [153]"                    1/2"
  323. 3230 [153]"     or 2    2    2 ^
  324. 3240 print" d = [173]a  + b  + c  [189]       = ";dq
  325. 3250 print:print
  326. 3260 print"[145] [214] = a * b * c             = ";vq
  327. 3270 print:print
  328. 3280 print" [211] = 2 * (a*b + b*c + c*a) = ";oq
  329. 3290 :
  330. 3300 gosub 80:goto 10
  331. 3310 :
  332. 3320 rem ==========
  333. 3330 rem = prisma =
  334. 3340 rem ==========
  335. 3350 :
  336. 3360 gosub 170
  337. 3370 :
  338. 3380 poke19,64
  339. 3390 input"[199]rundflaeche  [199] : ";gp
  340. 3400 poke19,0:print:poke19,64
  341. 3410 input"[205]antelflaeche [205] : ";mp
  342. 3420 poke19,0:print:poke19,64
  343. 3430 input"[200]oehe         h : ";hp
  344. 3440 poke19,0:print:print:print"  [211] = [207]berflaeche":print
  345. 3450 vp=gp*hp
  346. 3460 op=2*gp+mp
  347. 3470 print" [214] = [199] * h     = ";vp
  348. 3480 print
  349. 3490 print" [211] = 2 * [199] + [205] = ";op
  350. 3500 :
  351. 3510 gosub 80:goto 10
  352. 3520 :
  353. 3530 rem ============
  354. 3540 rem = pyramide =
  355. 3550 rem ============
  356. 3560 :
  357. 3570 gosub 170
  358. 3580 :
  359. 3590 poke19,64
  360. 3600 input"[199]rundflaeche [199] : ";gp
  361. 3610 poke19,0:print:poke19,64
  362. 3620 input"[200]oehe        h : ";hp
  363. 3630 poke19,0:print:print
  364. 3640 vp=(gp/3)*hp
  365. 3650 print"     1"
  366. 3660 print" [214] = [192] * [199] * h = ";vp
  367. 3670 print"     3"
  368. 3680 :
  369. 3690 gosub 80:goto 10
  370. 3700 :
  371. 3710 rem ====================
  372. 3720 rem = regul. tetraeder =
  373. 3730 rem ====================
  374. 3740 :
  375. 3750 gosub 170
  376. 3760 :
  377. 3770 poke19,64
  378. 3780 input"[211]eitenlaenge a : ";at
  379. 3790 poke19,0:print:print:print"  [211] = [207]berflaeche":print
  380. 3800 print"      3"
  381. 3810 print"     a     1/2"
  382. 3820 print" [214] = [192][192] * 2    = ";fnvt(at)
  383. 3830 print"     12"
  384. 3840 print
  385. 3850 print"      2    1/2"
  386. 3860 print" [211] = a  * 3    = ";fnot(at)
  387. 3870 print
  388. 3880 print"     a    1/2"
  389. 3890 print" h = [192] * 6     = ";fnht(at)
  390. 3900 print"     3"
  391. 3910 :
  392. 3920 gosub80:goto10
  393. 3930 :
  394. 3940 rem ====================
  395. 3950 rem = allgem. zylinder =
  396. 3960 rem ====================
  397. 3970 :
  398. 3980 gosub 170
  399. 3990 :
  400. 4000 poke19,64
  401. 4010 input"[199]rundflaeche[160] [199] : ";gz
  402. 4020 poke19,0:print:poke19,64
  403. 4030 input"[205]antelflaeche [205] : ";mz
  404. 4040 poke19,0:print:poke19,64
  405. 4050 input"[200]oehe         h : ";hz
  406. 4060 poke19,0:print:print:print"  [211] = [207]berflaeche":print
  407. 4070 oz=2*gz+mz
  408. 4080 vz=gz*hz
  409. 4090 print" [211] = 2 * [199] + [205] =[160]";oz
  410. 4100 print
  411. 4110 print" [214] = [199] * h     = ";vz
  412. 4120 :
  413. 4130 gosub 80:goto 10
  414. 4140 :
  415. 4150 rem =========================
  416. 4160 rem = gerader kreiszylinder =
  417. 4170 rem =========================
  418. 4180 :
  419. 4190 gosub 170
  420. 4200 :
  421. 4210 poke19,64
  422. 4220 input"[210]adius r : ";rk
  423. 4230 poke19,0:print:poke19,64
  424. 4240 input"[200]oehe  h : ";hk
  425. 4250 poke19,0:print:print:print"  [211] = [207]berflaeche; [205] = [205]antelflaeche":print
  426. 4260 ok=2*rk*(NULL)*(rk+hk)
  427. 4270 vk=(rk*rk)*(NULL)*hk
  428. 4280 mk=2*(NULL)*rk*hk
  429. 4290 print" [211] = 2 * pi * r * (r + h) = ";ok
  430. 4300 print
  431. 4310 print"      2"
  432. 4320 print" [214] = r  * pi * h          = ";vk
  433. 4330 print
  434. 4340 print" [205] = 2 * pi * r * h       = ";mk
  435. 4350 :
  436. 4360 gosub 80:goto 10
  437. 4370 :
  438. 4380 rem ======================
  439. 4390 rem = gerader kreiskegel =
  440. 4400 rem ======================
  441. 4410 :
  442. 4420 gosub 170
  443. 4430 :
  444. 4440 poke19,64
  445. 4450 input"[210]adius      r : ";rk
  446. 4460 poke19,0:print:poke19,64
  447. 4470 input"[211]eitenkante s : ";sk
  448. 4480 poke19,0:print:poke19,64
  449. 4490 input"[200]oehe       h : ";hk
  450. 4500 poke19,0:print:print:print"  [211] = [207]berflaeche; [205] = [205]antelflaeche"
  451. 4510 print"  [199] = [199]rundflaeche":print
  452. 4520 gk=(rk*rk)*(NULL)
  453. 4530 ok=(NULL)*rk*(rk+sk)
  454. 4540 mk=(NULL)*rk*sk
  455. 4550 vk=((1/3)*(rk*rk))*(NULL)*hk
  456. 4560 print" [211] = pi * r * (r + s) = ";ok
  457. 4570 print
  458. 4580 print" [205] = pi * r * s       = ";mk
  459. 4590 print
  460. 4600 print"     1         2"
  461. 4610 print" [214] = [192] * pi * r  * h  = ";vk
  462. 4620 print"     3"
  463. 4630 print 
  464. 4640 print"      2"
  465. 4650 print" [199] = r  * pi          = ";gk
  466. 4660 :
  467. 4670 gosub 80:goto 10
  468. 4680 :
  469. 4690 rem ======================
  470. 4700 rem = gerader kreiskegel =
  471. 4710 rem ======================
  472. 4720 :
  473. 4730 gosub 170
  474. 4740 :
  475. 4750 poke19,64
  476. 4760 input"[210]adius r : ";rk
  477. 4770 poke19,0:print:print:print"  [211] = [207]berflaeche":print
  478. 4780 print"     4  3"
  479. 4790 print" [214] = [192] r  * pi   = ";fnvk(rk)
  480. 4800 print"     3"
  481. 4810 print
  482. 4820 print"          2"
  483. 4830 print" [211] = 4 * r  * pi = ";fnok(rk)
  484. 4840 :
  485. 4850 gosub 80:goto 10
  486. 4860 :
  487. 4870 rem ================
  488. 4880 rem = programmende =
  489. 4890 rem ================
  490. 4900 :
  491. 4910 gosub 170
  492. 4920 :
  493. 4930 print"[145][145]                                        "
  494. 4940 print"[145]              [208]rogrammende              "
  495. 4950 print"[145]                                        "
  496. 4960 poke214,13:poke211,10:sys58640:print"[211]icher?";
  497. 4970 get y$:if y$="" then 4960
  498. 4980 if y$="j" then print" [202]a!":for pa=1 to 100:next pa:goto 5010
  499. 4990 if y$="n" then print" [206]ein!!":for pa=1 to 100:next pa:goto 10
  500. 5000 goto 4960
  501. 5010 print"[147]"
  502. 5020 poke214,12:poke211,9:sys58640
  503. 5030 print"[194]is zum naechsten [205]al."
  504. 5040 for wa=1 to 250
  505. 5050 sys64738
  506.