1 COMMON A, AL, B, BASEONLY, C, C$, C1, CAT$, CC, CKT$, D, D$, DD, DIA, DIMN$, DMS, E, EO, EX$, F, F$, FD, FF, FQ, FRQ, G$, GO$, I, I$, L, LATLONG, LD, LL, LN, LS, LW, LX, MAX, MENU, MIN, MX, N, NN, NT, OV, P, PI, PROG$, Q, QQ, QU, R, RA, RC, T, T$, U, U$, UH, UL$, V$, VC, W, WHIP, WIRD, WW, X, X$, X1, XS, Z$, ZP, ZS
10 'INVOLUTE - 2 APR 88 - rev. 23 FEB 94, 09 MAR 2010
20 IF EX$=""THEN EX$="\bas\menu\dosmenu"
30 CLS:SCREEN 0:KEY OFF
40 U$=STRING$(80,205)
50 COLOR 15,2:PRINT " INVOLUTE of a CIRCLE ";:COLOR 7,0
60 PRINT U$;
70 PRINT "Press number in ( ) to:"
80 PRINT U$;
90 PRINT " (1)  Run";
100 PRINT " (2)  Exit";
110 Z$=INKEY$:IF Z$="2"THEN RUN EX$
120 IF Z$="1"THEN 130 ELSE 110
130 SCREEN 8:U$="###,###.###"
140 PRINT "INVOLUTE of a CIRCLE";STRING$(80,45)
150 LOCATE 3,12:PRINT "Y"
160 LOCATE 12,50:PRINT "X"
170 LOCATE 12,11:PRINT "O"
180 LOCATE 7,11:PRINT "A"
190 LOCATE 17,11:PRINT "B"
200 S=4.199999E-01                                 'aspect ratio for screen 2
210 R=92:H=91:PI=3.141592
220 LINE (R,H+R*S)-(R,25)
230 LINE (R,H)-(381,H),,,&H5555
240 CIRCLE (R,H),R
250 I=80:L=0
260 FOR Z=1 TO I
270 L=L+PI/I
280 X=R*((SIN(L)-L*COS(L)))+R
290 Y=H-(R*(COS(L)+L*SIN(L)))*S
300 PSET (X,Y)
310 NEXT Z
320 I=10:L=0
330 FOR Z=1 TO I
340 L=L+PI/I
350 X=R*((SIN(L)-L*COS(L)))+R
360 Y=H-(R*(COS(L)+L*SIN(L)))*S
370 A=R*SIN(L):B=R*COS(L)*S
380 LINE (R+A,H-B)-(X,Y),,,&H1111
390 IF Z<>7 THEN 500
400 '
410 LINE (R+A,H-B)-(X,Y)
420 LINE (R,H)-(X,Y)
430 LINE (R+A,H-B)-(R,H)
440 LOCATE 14,21:PRINT "E"
450 LOCATE 5,37:PRINT "C"
460 CIRCLE (R,H),R/2,,1.799999*PI,PI/2
470 LOCATE 11,19:PRINT CHR$(237)
480 LOCATE 7,32:PRINT "a"
490 '
500 NEXT Z
510 LINE (R,Y)-(X,Y),,,&H5555
520 LOCATE 17,50:PRINT "D"
530 LOCATE 19:PRINT STRING$(80,45)
540 '
550 'INPUT DATA
560 LOCATE 20:INPUT "ENTER: Radius OE.........";OE
565 IF OE=0 THEN 560
570 LOCATE 20:PRINT STRING$(40,32)
580 AB=2*OE:BD=PI*OE:ACD=OE*PI^2/2
590 LOCATE 3,55:PRINT "Radius OE=     ";USING U$;OE
600 LOCATE 4,55:PRINT "Diameter AB=   ";USING U$;AB
610 LOCATE 5,55:PRINT "Base Line BD=  ";USING U$;BD
620 LOCATE 6,55:PRINT "Involute ACD=  ";USING U$;ACD
630 '
640 LOCATE 20:PRINT STRING$(40,32):LOCATE 20
650 PRINT "ENTER: -1 to exit or angle ";CHR$(237);CHR$(248);;" ";:INPUT L
660 LOCATE 20:PRINT STRING$(40,32)
670 IF L<0 THEN 920
680 IF L>180 THEN 640
690 FOR Q=55 TO 80:LOCATE 8,Q:PRINT CHR$(219):NEXT Q
700 Z=L*PI/180
710 LOCATE 8,55:PRINT "Values for point C are:   "
720 LOCATE 9,55:PRINT "-----------------------   "
730 LOCATE 10,55
740 PRINT "Angle ";CHR$(237);;" =";USING "#############.##";L;:PRINT CHR$(248)
750 X=OE*(SIN(Z)-Z*COS(Z))
760 LOCATE 14,55:PRINT "Coordinate X=  ";USING U$;X
770 Y=OE*(COS(Z)+Z*SIN(Z))
780 LOCATE 15,55:PRINT "Coordinate Y=  ";USING U$;Y
790 CO=SQR(X^2+Y^2)
800 CE=SQR(CO^2-OE^2)
810 LOCATE 11,55:OCE=(ATN(OE/CE))*180/PI
820 PRINT "Angle a =";USING "#############.##";OCE;:PRINT CHR$(248)
830 LOCATE 12,55
840 PRINT "Angle COE =";USING "###########.##";90-OCE;:PRINT CHR$(248)
850 LOCATE 17,55:PRINT "Line CO=       ";USING U$;CO
860 LOCATE 18,55:PRINT "Line CE=       ";USING U$;CE
870 GOTO 640
880 LOCATE 17,55:PRINT "Line CO=       ";USING U$;CO
890 LOCATE 18,55:PRINT "Line CE=       ";USING U$;CE
900 GOTO 640
910 '
920 LOCATE 20:PRINT "Press (1) for new radius or (2) to quit";
930 Z$=INKEY$:IF Z$="2"THEN 10
940 IF Z$="1"THEN 950 ELSE 930
950 LOCATE 20:PRINT STRING$(50,32)
960 FOR Z= 3 TO 18
970 LOCATE Z,55:PRINT STRING$(26,32):NEXT Z
980 GOTO 550
