X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=blobdiff_plain;f=math%2Fsin_cos.bas;h=81a118669dadd1c5d39b191c1019ee399ec3a08e;hp=037b626f87bdfd694fdd836460838a480344f6c3;hb=08a50b7a860f6aa39f58108a07e2fc13e46260b9;hpb=68c9ea9c1b1c03a3d38bd585f0bdeee6371cb05b diff --git a/math/sin_cos.bas b/math/sin_cos.bas old mode 100755 new mode 100644 index 037b626..81a1186 --- a/math/sin_cos.bas +++ b/math/sin_cos.bas @@ -1,38 +1,38 @@ ' SIN & COS table ' made by Svjatoslav Agejenko ' in 2003.12 -' H-Page: svjatoslav.eu -' E-Mail: svjatoslavagejenko@gmail.com +' homepage: svjatoslav.eu +' email: svjatoslav@svjatoslav.eu xs = 640 ys = 480 -scr = 12 'Video mode +scr = 12 'Video mode strs = 0 xs = xs / 11.3 ys = ys / 11.7 -IF strs = 0 THEN ELSE GOTO 1 +IF strs = 0 THEN ELSE GOTO 1 SELECT CASE scr -CASE 12, 11 -strs = 16 + CASE 12, 11 + strs = 16 -CASE 9, 10 -strs = 14 + CASE 9, 10 + strs = 14 -CASE 1, 13, 2, 7, 8 -strs = 8 + CASE 1, 13, 2, 7, 8 + strs = 8 END SELECT 1 SCREEN scr FOR b = 1 TO 10 -LINE (0, b * ys)-(xs * 10, b * ys), 8 -LINE (b * xs, 0)-(b * xs, ys * 10), 8 -LOCATE 10 * ys / strs + 2, b * xs / 8 + 1 -PRINT CHR$(b + 48) + LINE (0, b * ys)-(xs * 10, b * ys), 8 + LINE (b * xs, 0)-(b * xs, ys * 10), 8 + LOCATE 10 * ys / strs + 2, b * xs / 8 + 1 + PRINT CHR$(b + 48) NEXT b LOCATE 10 * ys / strs + 2, xs * 10 / 8 + 0 @@ -48,21 +48,21 @@ LINE (0, ys * 5 + 1)-(xs * 10, ys * 5 + 1), 14 LINE (5 * xs + 1, 0)-(5 * xs + 1, 10 * ys), 14 FOR a = 0 TO 10 STEP .05 -x = a * xs -y = SIN(a) * ys * 5 + ys * 5 -IF a > 0 THEN LINE (x1, y1)-(x, y), 15 -x1 = x -y1 = y + x = a * xs + y = SIN(a) * ys * 5 + ys * 5 + IF a > 0 THEN LINE (x1, y1)-(x, y), 15 + x1 = x + y1 = y NEXT a LOCATE y / strs + 1, xs * 10 / 8 PRINT "sin" FOR a = 0 TO 10 STEP .05 -x = a * xs -y = COS(a) * ys * 5 + ys * 5 -IF a > 0 THEN LINE (x1, y1)-(x, y), 12 -x1 = x -y1 = y + x = a * xs + y = COS(a) * ys * 5 + ys * 5 + IF a > 0 THEN LINE (x1, y1)-(x, y), 12 + x1 = x + y1 = y NEXT a LOCATE y / strs + 1, xs * 10 / 8 PRINT "cos"