Shows plots of trig functions in relation to quadrants.
Appears on
One of a series of library tapes. Programs on these tapes were renamed to a number series. This tape contained programs 20121 to 20163. These tapes were compiled by Tony Willing.
Gallery
Source Code
4 REM 2068 graphics and trig 5 REM by 6 REM Andy Centek Garden City, MI 8 PAPER 0: INK 7: CLS : GO SUB 200 10 GO SUB 1000 14 PRINT AT 2,5;"Trig. affects on graphics." 15 PRINT "Showing plots of trig functions in relation to quadrants." 16 PAUSE 0: CLS 20 CLS : PRINT TAB 14;"MENU" 22 PRINT ''"1-Graph with trig functions"'" labeled on graph." 24 PRINT ''"2-Sample program" 26 PRINT ''"3-Run a program" 28 INPUT n 30 IF n<>1 AND n<>2 AND n<>3 THEN GO TO 28 32 IF n=1 THEN GO TO 40 34 IF n=2 THEN GO SUB 300 36 GO TO 399 39 STOP 40 CLS 44 PLOT 0,88: DRAW 255,0 45 PLOT 128,0: DRAW 0,166 50 PRINT AT 0,12;"Quadrants" 55 PRINT AT 0,6;"II";AT 0,23;"I";AT 21,6;"III";AT 21,23;"IV" 57 PRINT AT 2,5;"+SIN ";AT 3,5;"\a\a\a\a";AT 4,5;"-COS ";AT 3,10;"=-TAN " 58 PAUSE 10: PRINT AT 2,20;"+SIN ";AT 3,20;"\a\a\a\a";AT 3,25;"=+TAN ";AT 4,20;"+COS " 59 PAUSE 10: PRINT AT 17,5;"-SIN ";AT 18,5;"\a\a\a\a";AT 18,10;"=+TAN ";AT 19,5;"-COS " 60 PAUSE 10: PRINT AT 17,20;"-SIN ";AT 18,20;"\a\a\a\a";AT 18,25;"=-TAN ";AT 19,20;"-COS " 61 PRINT AT 21,15;"-Y";AT 1,15;"+Y";AT 10,0; OVER 1;"-X";AT 10,30; OVER 1;"+X" 64 PLOT 128,88: DRAW 40,35: PLOT 128,88: DRAW 30,0: DRAW 0,27 65 PRINT AT 7,20;"S";AT 8,20;"i";AT 9,20;"n" 66 PLOT 128,88: DRAW 42,0: DRAW 0,38 67 PRINT AT 6,22;"T";AT 7,22;"a";AT 8,22;"n" 68 PRINT AT 11,17;"Cos" 69 CIRCLE 128,88,40 70 FOR a=-40 TO 40 STEP 1.25: BEEP .01,-a: BEEP .01,+a: NEXT a 97 INPUT "Enter >>m<< ( ret to menu)";a$ 98 IF a$<>"m" THEN GO TO 97 100 GO TO 20 199 STOP 202 PRINT AT 0,4;"Coming up---GRAPHICS " 204 PRINT INVERSE 1;AT 19,0;"I AM COMPUTING--PLEASE WAIT!!" 205 FOR x=15 TO 0 STEP -1: BEEP .01,x: PRINT AT INT (RND*2-x),INT (RND*x+x);"*": NEXT x 206 BRIGHT 1: PAPER 1: INK 7: BORDER 0 208 FOR n=0 TO 12 210 FOR a=0 TO 65 STEP 3 225 LET r=2-(a*SIN (n/3*PI)) 230 LET c=10-(a*COS (n/6*PI)) 235 PLOT 120,90: DRAW c,r 240 NEXT a 245 NEXT n 250 PRINT INVERSE 1;AT 19,0;" ANDY CENTEK, JR. " 260 PRINT AT 1,5;"*";AT 5,3;"*";AT 10,25;"*";AT 20,7;"*" 270 PAUSE 300: CLS : RETURN 300 REM ** DRAW graph ** 305 CLS 310 PLOT 0,88: DRAW 255,0: PLOT 128,0: DRAW 0,166 320 PRINT AT 0,12;"Quadrants" 325 PRINT AT 0,6;"II";AT 0,23;"I";AT 21,6;"III";AT 21,23;"IV" 330 PRINT AT 21,15;"-Y";AT 1,15;"+Y";AT 10,0; OVER 1;"-X";AT 10,30; OVER 1;"+X" 335 PAUSE 100 340 FOR a=0 TO 360 STEP 3 345 LET x=30*SIN (a*PI/180) 350 LET y=20*COS (a*PI/180) 352 PRINT AT 18,5;"X=";INT (x);AT 19,5;"Y=";INT (y) 355 PLOT 128+x,88+y: DRAW x,y 356 PRINT AT 17,20;"A=0 to 360";AT 18,19;"X=20 x SIN A";AT 19,19;"Y=30 x COS A" 357 PAUSE 20: PRINT AT 18,5;"X= ";AT 19,5;"Y= "; 360 NEXT a 365 INPUT "return to menu";a$: PAUSE 0 370 GO TO 20 398 STOP 400 REM ** main program ** 401 CLS : PRINT BRIGHT 1;'"Showing the effects of the"'"multipliers of the SIN and COS." 402 PAUSE 0: INPUT "ENTER multipliers, ONE number for the SIN (1 - 35) and ONE forthe COS. (1 - 30)";s,c 404 PAPER 1: INK 7: BORDER 5 405 CLS 406 GO TO 460 410 FOR a=0 TO 360 STEP 3 420 LET y=c*COS (a*PI/180) 430 LET x=s*SIN (a*PI/180) 435 PLOT 128+x,88+y: DRAW x,y 455 NEXT a 456 INPUT "Another or a new program (a or n)?";q$ 457 IF q$<>"a" AND q$<>"n" THEN GO TO 456 458 IF q$="a" THEN CLS : GO TO 400 459 GO TO 500 460 REM ** draw graph** 461 CLS 465 PLOT 0,88: DRAW 255,0: PLOT 128,0: DRAW 0,166 475 PRINT AT 0,12;"Quadrants" 480 PRINT AT 0,6;"II";AT 0,23;"I";AT 21,6;"III";AT 21,23;"IV" 485 PRINT AT 21,15;"-Y";AT 1,15;"+Y";AT 10,0; OVER 1;"-X";AT 10,30; OVER 1;"+X" 492 PRINT AT 18,2;s;" x SIN";AT 19,2;c;" x COS"; 496 GO TO 410 500 REM ** dividing PI by degrees ** 505 CLS 507 PRINT '''"Dividing PI by degrees(0 to 360)";"Input degrees for..."; 508 INPUT "SIN ";d1: INPUT ;"COS ";d2 509 CLS : PLOT 0,88: DRAW 255,0: PLOT 128,0: DRAW 0,166 510 FOR a=0 TO 720 STEP 2.5 515 PRINT AT 21,0;"PI/";d1;" SIN - PI/";d2;" COS" 525 LET y=25*COS (a*PI/d2) 530 LET x=35*SIN (a*PI/d1) 535 PLOT 128+x,88*y: DRAW x,y 545 NEXT a 550 INPUT "Another or next program(a/n)?";q$ 555 IF q$<>"a" AND q$<>"n" THEN GO TO 550 560 IF q$="a" THEN GO TO 500 600 CLS 605 REM ** plot over functions ** 610 PRINT '"Values for SIN and COS."'" Max. SIN Val. = 120"'" Max. COS Val. =80" 611 PRINT '"Dividing PI by degrees (0-360)" 612 INPUT "SIN";s: INPUT "COS";c: INPUT "STEP ";s1: INPUT "SIN PI / degrees";d1: INPUT "COS PI / degrees";d2 613 IF s>120 OR c>80 THEN CLS : PRINT AT 11,13;"TOO BIG !!": GO TO 610 614 CLS : PRINT AT 19,1;s;" x SIN PI/";d1;AT 20,1;c;" x COS PI/";d2; 615 FOR a=0 TO 360 STEP 3 617 PLOT 0,88: DRAW 255,0: PLOT 128,0: DRAW 0,166 619 FOR a=0 TO 720 STEP s1 620 LET y=c*COS (a*PI/d2) 625 LET x=s*SIN (a*PI/d1) 630 PLOT 128+(x/2),88+(y/2): DRAW x/2,y/2 635 NEXT a 640 INPUT "Another or back to menu ?(a/b) ";q$ 645 IF q$<>"a" AND q$<>"b" THEN GO TO 640 646 IF q$="a" THEN GO TO 612 660 GO TO 20 1000 REM get line USR a 1002 FOR n=0 TO 7 1004 READ a: POKE USR "a"+n,a 1006 NEXT n 1010 DATA 0,0,0,255,0,0,0,0 1015 RETURN 9998 STOP 9999 SAVE "GrafTrig" LINE 1