Category : Science and Education
Archive   : MECHAN93.ZIP
Filename : GEOMPAR.BAS

 
Output of file : GEOMPAR.BAS contained in archive : MECHAN93.ZIP
10 REM GEOMPAR - July 10,1990 ... DO NOT RENUMBER
20 REM ***********************************************************
30 F1$=" ##### " : F2$="###.###" : F3$=" ##"
40 DATA "INPUT CRANK 2-N1 3-N2 4-N3 5-L 6-R(L) 7-S(N3) 8-B(N3) "
50 DATA "INPUT SLDR 2-N1 3-N2 4-N3 5-L 9-M 6-B(N2) 7-S(N3) 8-B(N3) "
60 DATA "INPUT CYLNDR 2-N1 3-N2 4-N3 9-N5 5-M 6-L1 7-L2 "
65 DATA " 8-R(L2) 10-S(N5) 11-B(N5)"
70 DATA " PNT ON BODY 2-N1 3-N2 4-N3 5-L 6-R(L) 7-S(N3) 8-B(N3)"
80 DATA " 2-LINK DYAD 2-N1 3-N2 4-N3 5-M 10-N4 11-N5 6-L1 7-L2"
85 DATA " 8-R(l1) 9-R(l2) 14-S(N4) 15-B(N4) 16-S(N5) 17-B(N5) "
90 DATA " OSC SLDR 2-N1 3-N2 4-N3 5-M 9-N4 12-N5 6-L1 7-L2"
95 DATA " 8-E(L1) 10-S(N4) 11-B(N4) 13-S(N5) 14-B(N5)"
100 DATA" ROT GUIDE 2-N1 3-N2 4-N3 5-M 10-N4 13-N5 6-L1 7-L2"
105 DATA" 8-R(L2) 9-B(N3) 11-S(N4) 12-B(N4) 14-S(N5) 15-B(N5)"
110 DATA" SPUR GEARS 2-N1 3-N2 4-N3 5-N8 22-N9 13-N4 16-N5 6-L1 7-L2 11-L5"
113 DATA" 8-RHO1 9-RHO2 12-S(N3) 10-B(N3)"
115 DATA" 14-S(N4) 15-B(N4) 17-S(N5) 18-B(N5)"
120 DATA" SPRING 2-N1 3-N2 4-L1 5-L2 6-KS 7-L0"
130 DATA" DAMPER 2-N1 3-N2 4-L1 5-L2 6-CD"
140 FOR I= 1 TO 16: READ HEAD$(I) : NEXT I
146 RESTORE : IF DF$="N" THEN 460
150 CLS
151 PRINT"Option 1 - BASIC 3.2 with (640x350) EGA graphics"
152 PRINT" 2 - BASIC 3.1 with (640x200) CGA graphics"
155 PRINT
156 PRINT"Enter number which describes your computer [Default=";SCR$;"] ?";
157 Q$= INKEY$ : IF LEN(Q$)= 0 THEN 157
158 IF VAL(Q$) < 1 OR VAL(Q$) > 2 THEN CTYPE= 1 ELSE CTYPE= VAL(Q$)
160 IF CTYPE=1 THEN SCREEN 9 ELSE SCREEN 2
165 RESTORE : IF DF$= "N" THEN 460
169 IF ONCE$="T" THEN 480
170 REM **********************************
180 REM DEFINE THE GEOMETRIC PARAMETERS"
190 REM **********************************
200 T7=1
205 IF SCR$="1" THEN SCREEN 9 ELSE SCREEN 2
210 II=0 : RET$="geompar"
220 II= II+1 : IF II > T5 THEN 450
230 ON K(II) GOTO 240,260,280,300,320,340,360,380,400,420
240 IRET%= 250 : CHAIN "mechdri",3000,ALL
250 GOSUB 2060 : T7=T7+1 : GOTO 440
260 IRET%= 270 : CHAIN "mechdri",4000,ALL
270 GOSUB 1370 : T7=T7+1 : GOTO 440
280 IRET%= 290 : CHAIN "mechdri",5000,ALL
290 GOSUB 1670 : T7=T7+2 : GOTO 440
300 IRET%= 310 : CHAIN "mechdri",6000,ALL
310 GOSUB 2030 : GOTO 440
320 IRET%= 330 : CHAIN "mechdri",7000,ALL
330 GOSUB 2470 : T7=T7+2 : GOTO 440
340 IRET%= 350 : CHAIN "mechdri",8000,ALL
350 GOSUB 2980 : T7=T7+2 : GOTO 440
360 IRET%= 370 : CHAIN "mechdri",9000,ALL
370 GOSUB 3350 : T7=T7+2 : GOTO 440
380 IRET%= 390 : CHAIN "mechdri",10000,ALL
390 GOSUB 4150 : T7=T7+1 : GOTO 440
400 IRET%= 410 : CHAIN "mechdri",11000,ALL
410 GOSUB 3890 : GOTO 440
420 IRET%= 430 : CHAIN "mechdri",12000,ALL
430 GOSUB 4030 : GOTO 440
440 GOTO 220
450 PRINT : PRINT"GEOMETRY DEFINITION COMPLETE" : PRINT
460 CLS : GOSUB 470 : GOSUB 1100 : GOSUB 1160 : GOTO 1220 : GOTO 1290
470 H1=1 : CLS
480 PRINT
500 PRINT" CURRENT GEOMETRY DATA"
505 PRINT"---------------------------------------------------------------"
510 PRINT" Heading format is ITEM NUMBER-DESCRIPTOR"
511 PRINT" Example: 6-R(L)"
512 PRINT"---------------------------------------------------------------"
513 PRINT
514 PRINT" Enter Q to QUIT and write current data to the DAT file"
530 F1$=" #######" : F2$=" #####.###" : F3$=" ##"
540 FOR I= 1 TO T5
542 R1=I
545 IF K(I)=8 THEN ROWGEAR=I
550 IF K(I)=0 THEN 900
555 PRINT : PRINT TAB(15)"***** SEQUENCE NUMBER "I" *****" : PRINT
560 GOSUB 1350
570 ON K(I) GOTO 620,660,700,740,790,820,860,890,740,740
620 PRINT TAB(16); : IF D$="K" THEN G(I,4)=0 : G(I,7)=0 : G(I,8)=0
630 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,5);
640 PRINT USING F2$;G(I,6);G(I,7);G(I,8) : GOTO 900
660 PRINT TAB(16); : IF D$="K" THEN G(I,7)=0 : G(I,8)=0
670 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,5);G(I,9);
680 PRINT USING F2$;G(I,6);G(I,7);G(I,8) : GOTO 900
700 PRINT TAB(16);
710 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,9);G(I,5);G(I,6);G(I,7)
715 PRINT HEAD$(K+1)
720 PRINT TAB(14);:PRINT USING F2$;G(I,8);G(I,10);G(I,11) : GOTO 900
740 PRINT TAB(16);
750 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,5);
760 PRINT USING F2$;G(I,6); : IF K(I)=10 THEN PRINT : GOTO 900
770 PRINT USING F2$;G(I,7); : IF K(I)=9 THEN PRINT : GOTO 900
780 PRINT USING F2$;G(I,8); : PRINT : GOTO 900
790 PRINT TAB(16); : IF D$="K" THEN G(I,10)=0 : G(I,11)=0
795 IF D$="K" THEN G(I,14)=0:G(I,15)=0:G(I,16)=0:G(I,17)=0
800 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,5);G(I,10);G(I,11);G(I,6);G(I,7)
805 PRINT HEAD$(K+2);
810 PRINT TAB(14);:PRINT USING F2$;G(I,8);G(I,9);G(I,14);G(I,15);G(I,16);G(I,17)
815 GOTO 900
820 PRINT TAB(16); : IF D$="K" THEN G(I,9)=0:G(I,10)=0:G(I,11)=0:G(I,12)=0
825 IF D$="K" THEN G(I,13)=0 : G(I,14)=0
830 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,5);G(I,9);G(I,12);G(I,6);G(I,7)
835 PRINT HEAD$(K+3)
840 PRINT TAB(14);:PRINT USING F2$;G(I,8);G(I,10);G(I,11);G(I,13);G(I,14)
850 GOTO 900
860 PRINT TAB(16); : IF D$="K" THEN G(I,10)=0:G(I,11)=0:G(I,12)=0:G(I,13)=0
865 IF D$="K" THEN G(I,14)=0 : G(I,15)=0
870 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,5);G(I,10);G(I,13);G(I,6);G(I,7)
875 PRINT HEAD$(K+4)
880 PRINT TAB(14); : PRINT USING F2$;G(I,8);G(I,9);G(I,11);G(I,12);G(I,14);G(I,15) : GOTO 900
890 PRINT TAB(16);: IF D$="K" THEN G(I,13)=0 : G(I,16)=0
892 PRINT USING F3$;G(I,2);G(I,3);G(I,4);G(I,5);G(I,22);G(I,13);G(I,16);G(I,6);G(I,7);G(I,11)
895 PRINT HEAD$(K+5) : PRINT TAB(14); : PRINT USING F2$;G(I,8);G(I,9);G(I,12);G(I,10)
896 IF D$="K" THEN 900
897 PRINT HEAD$(K+6) : PRINT TAB(14); : PRINT USING F2$;G(I,14);G(I,15);G(I,17);G(I,18)
900 GOSUB 920
910 NEXT I
915 RETURN
916 REM Subroutine to Check DATA array - Individual Components
920 PRINT : PRINT "DATA OK ? [Default= Y] Y/N/Q ? ";
930 Q$= INKEY$ : IF LEN(Q$)=0 THEN 930
932 IF Q$="" OR Q$=" " THEN Q$="Q"
935 IF Q$="q" THEN Q$="Q"
936 IF Q$= "Q" THEN 1060
940 IF Q$="n" THEN Q$="N"
950 IF Q$<>"N" THEN Q$="Y"
960 PRINT Q$
970 IF Q$="N" THEN QN$="Y"
980 IF Q$="Y" THEN CLS : RETURN
1000 INPUT"ENTER data ITEM NUMBER ";C1
1010 PRINT"OLD DATA ..... ";G(R1,C1) : INPUT"NEW DATA ..... ? ",G(R1,C1)
1020 QN$="Y"
1030 GOTO 540
1040 IF K(1) <=3 THEN 1070
1050 PRINT"No input component has been specified " : CHAIN "MECHAN",,ALL
1060 RET$="GEOMPAR" : IRET%=1065 : CHAIN "WGEOM",,ALL
1065 IF DF$="Y" THEN CHAIN "INPUT",,ALL
1070 IF D$="K" THEN 1290
1080 IF D$="D" THEN GOSUB 1100
1090 GOSUB 1160
1100 PRINT" CURRENT MASS-INERTIA DATA"
1110 PRINT" -------------------------" : PRINT
1120 PRINT" MEMBER CENTROID MASS MOMENT OF INERTIA" : PRINT
1130 FOR I=2 TO T7:PRINT USING"##########";I;L(I); : PRINT " ";
1140 PRINT USING"###.######";M(I);I(I) : NEXT I : RETURN
1150 PRINT"ROW NUMBER";I;"--->"; : RETURN
1160 PRINT : PRINT"DATA OK ? [Default= Y] Y/N ? ";
1170 Q$= INKEY$ : IF LEN(Q$)=0 THEN 1170
1180 IF Q$="n" THEN Q$="N"
1190 IF Q$<>"N" THEN Q$="Y"
1200 PRINT Q$ : IF Q$="Y" THEN QN$="N"
1210 IF Q$ = "Y" THEN 1290 ELSE RETURN
1220 PRINT : INPUT"Member number ? ",R1
1225 IF R1 = 0 THEN CLS : GOSUB 1100 : GOSUB 1160
1230 PRINT"Do you wish to change (C)entroid, (M)ass, or (I)nertia ";
1231 PRINT" C/M/I ? "; : QN$="Y"
1232 C$= INKEY$ : IF LEN(C$)=0 THEN 1232
1241 IF C$="c" THEN C$="C"
1242 IF C$="m" THEN C$="M"
1243 IF C$="i" THEN C$="I"
1245 PRINT C$ : PRINT
1250 IF C$="C" THEN INPUT"Change centroid to point number ? ",L(R1)
1260 IF C$="M" THEN INPUT"Change mass to ? ",M(R1)
1270 IF C$="I" THEN INPUT"Change moment of inertia to ? ",I(R1)
1275 CLS : GOSUB 1100 : GOSUB 1160
1280 IF Q$="Y" THEN 1290 ELSE 1220
1290 NFP%=T2 : NP%=T1 : NC%=T5 : NM%=T7
1295 CLOSE #2 : IF D$="Y" THEN CHAIN "DYNAN",540,ALL
1300 NFP%=T2 : NP%=T1 : NC%=T5 : NM%=T7
1302 IF D$="K" THEN 1310
1305 RET$="GEOMPAR" : IRET%=1310 : CHAIN"WGEOM",,ALL
1310 CHAIN "INPUT",,ALL
1320 REM ************************************
1330 REM SUBROUTINE TO PRINT DATA HEADING
1340 REM ************************************
1350 K=K(I) : KK=K : IF K=4 THEN KK=5 : GOTO 1358
1351 IF K=5 THEN KK=6 : GOTO 1358
1352 IF K=6 THEN KK=8 : GOTO 1358
1353 IF K=7 THEN KK=10 : GOTO 1358
1354 IF K=8 THEN KK=12 : GOTO 1358
1355 IF K=9 THEN KK=15 : GOTO 1358
1356 IF K=10 THEN KK=16 : GOTO 1358
1358 PRINT " ";HEAD$(KK) : RETURN
1360 REM *******************************************************
1365 REM *******************************************************
1370 I=II : G(I,1)=I
1380 PRINT:PRINT"ENTER DATA FOR AN INPUT SLIDER" : PRINT
1390 REM *******************************************************
1400 INPUT"Point number for fixed reference point ....... N1= ";G(I,2):N1=G(I,2)
1410 INPUT"Point number for moving slider pivot ......... N2= ";G(I,3):N2=G(I,3)
1420 INPUT"Member number for the input slider ........... L= ";G(I,5):L=G(I,5)
1430 PRINT"Angle of slider motion relative to x-axis B(";N2;")= ";
1440 INPUT G(I,6) : B(N2)=G(I,6)
1450 T1=T1+1
1460 PRINT
1470 INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
1480 IF Q$ <> "N" THEN 1500
1490 T1= T1-1 : GOTO 1370
1500 IF D$="K" THEN G(I,4)=0 : RETURN
1510 L3=1
1520 PRINT"Mass of the input slider ................ M(";L;")= ";
1530 INPUT G(I,9) : M(L)=G(I,9)
1540 PRINT"Point number for slider centroid ............. N3= ";
1550 INPUT G(I,4) : N3=G(I,4) : L(L)=N3
1560 PRINT"Length of the S-vector to centroid ...... S(";N3;")= ";
1570 INPUT G(I,7) : S(N3)=G(I,7)
1580 PRINT"Angle from slider direction to S-vector .. B(";N3;")= ";
1590 INPUT G(I,8) : B(N3)=G(I,8)
1600 PRINT"External member connected at moving pivot "N2" L4= ";
1610 INPUT G(I,10) : L4= G(I,10)
1620 PRINT : INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
1630 IF Q$ <> "N" THEN T1= T1+1 : GOTO 1650
1640 GOTO 1510
1650 RETURN
1660 REM *******************************************************
1670 I=II : G(I,1)= I
1680 PRINT:PRINT"ENTER DATA FOR AN INPUT CYLINDER" : PRINT
1690 REM *******************************************************
1700 INPUT"Point number for cylinder fixed pivot ........ N1= ";G(I,2) : N1=G(I,2)
1710 INPUT"Point number for driven-crank fixed pivot .... N2= ";G(I,3) : N2=G(I,3)
1720 INPUT"Point number for driven-crank moving pivot ... N3= ";G(I,4) : N3=G(I,4)
1740 INPUT"Mode of assembly for the input cylinder ...... M= ";G(I,5):M=G(I,5)
1750 INPUT"Member number for the input cylinder ......... L1= ";G(I,6):L1=G(I,6)
1760 INPUT"Member number for the driven crank ........... L2= ";G(I,7):L2=G(I,7)
1770 PRINT"Length of the driven crank ............... R(";L2;")= ";
1780 INPUT G(I,8) : R(L2)= G(I,8)
1790 PRINT
1800 INPUT"DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
1810 IF Q$ <> "N" THEN T1= T1+1 : GOTO 1830
1820 GOTO 1700
1830 IF D$="K" THEN G(I,9)=0 : G(I,10)=0 : GOTO 2010
1840 PRINT"Point number for centroid of member ";L2;
1850 INPUT" ...... N5= ";G(I,9) : N5= G(I,9) : L(L2)=G(I,9)
1860 PRINT"Length of the S-vector .................. S(";N5;")= ";
1870 INPUT S(N5) : G(I,10)=S(N5)
1880 PRINT"Angle from R-vector to S-vector ......... B(";N5;")= ";
1890 INPUT B(N5) : G(I,11)=B(N5)
1900 PRINT"Mass of member ";L2;" .................... M(";L2;")= ";
1910 INPUT M(L2)
1920 PRINT"Moment of inertia of member ";L2;" ....... I(";L2;")= ";
1930 INPUT I(L2)
1940 PRINT"External member connected at joint N1=";N1;" ...... L3= ? ";
1950 INPUT L3 : G(I,12)=L3
1960 PRINT"External member connected at joint N2=";N2;" ...... L4= ? ";
1970 INPUT L4 : G(I,13)=L4
1980 PRINT
1990 INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
2000 IF Q$ <> "N" THEN T1=T1+1 : GOTO 2010
2005 GOTO 1840
2010 RETURN
2020 REM ********************************************************************
2030 PRINT:PRINT"ENTER DATA FOR A POINT ON A RIGID BODY":PRINT:I=II: G(I,1)=I
2040 REM ********************************************************************
2050 GOTO 2080
2060 I=II : G(I,1)=I
2070 PRINT:PRINT"ENTER DATA FOR AN INPUT CRANK":PRINT
2080 INPUT"Member number .............................. L= ? ",L:G(I,5)=L
2090 INPUT"Point number for tail of the R-vector ..... N1= ? ",G(I,2):N1=G(I,2)
2100 INPUT"Point number for head of the R-vector ..... N2= ? ",G(I,3) : N2= G(I,3)
2110 IF K(II)=4 THEN INPUT"Point number for head of the S-vector ..... N3= ? ",G(I,4) : N3= G(I,4) : GOTO 2140
2120 IF D$="D" THEN PRINT"Point number for centroid of member ";L;" ... N3= ";
2130 IF D$="D" THEN INPUT G(I,4) : N3=G(I,4)
2140 PRINT"Length of the R-vector ................ R(";L;")= ";
2150 IF K(II)=4 THEN PRINT R(L)
2160 IF K(II)=1 THEN INPUT R(L)
2170 G(I,6)= R(L)
2180 IF K(II)=1 AND D$="K" THEN 2230
2190 IF K(II)= 1 THEN PRINT"Length of the S-vector to centroid .... S(";N3;")= ";
2195 IF K(II)= 4 THEN PRINT"Length of S-vector .. point ";N1;"to ";N3;".. S(";N3;")= ";
2200 INPUT G(I,7) : S(N3)= G(I,7)
2210 PRINT"Angle from the R-vector to S-vector ... B(";N3;")= ";
2220 INPUT G(I,8) : B(N3)= G(I,8)
2230 IF K(II)=1 AND D$="D" THEN T1=T1+2
2240 IF K(II)=1 AND D$="K" THEN T1=T1+1
2250 IF K(II)=4 THEN T1=T1+1
2260 PRINT : INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
2270 IF Q$ <> "N" THEN 2310
2280 IF K(II)=1 THEN T1=T1-1
2290 IF K(II)=4 THEN T1=T1-1
2300 GOTO 2080
2310 IF K(II)=4 THEN RETURN
2320 IF D$="K" THEN G(I,4)=0 : RETURN
2330 PRINT "Centroid of member ";L;" is located at point";N3
2340 L(L)=N3
2350 PRINT"Mass of member ";L;" .................... M(";L;")= ";:INPUT M(L)
2360 PRINT"Moment of inertia of member ";L;" ....... I(";L;")= ";:INPUT I(L)
2370 PRINT : INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
2380 IF Q$="N" THEN 2330
2390 PRINT"External member connected at joint N1=";N1;" ..... L3= ";
2400 INPUT G(I,9) : L3= G(I,9)
2410 PRINT"External member connected at joint N2=";N2;" ..... L4= ";
2420 INPUT G(I,10) : L4= G(I,10)
2430 PRINT : INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$= "n" THEN Q$="N"
2440 IF Q$="N" THEN 2390
2450 RETURN
2460 REM ***********************************************************
2470 PRINT:PRINT"ENTER DATA FOR A TWO-LINK DYAD":PRINT:I=II:G(I,1)=I
2480 REM ***********************************************************
2490 T1= T1+1
2500 INPUT"Point number for first reference point ..... N1= ? ",G(I,2):N1=G(I,2)
2510 INPUT"Point number for second reference point .... N2= ? ",G(I,3):N2=G(I,3)
2520 INPUT"Point number for common point of interest .. N3= ? ",G(I,4):N3=G(I,4)
2530 INPUT"Mode of assembly ........................... M= ? ",G(I,5): M=G(I,5)
2540 PRINT"Member number containing joint N1=";N1;" ....... L1= ";
2550 INPUT G(I,6) : L1= G(I,6)
2560 PRINT"Member number containing joint N2=";N2;" ....... L2= ";
2570 INPUT G(I,7) : L2=G(I,7)
2580 PRINT"Length of the R-vector on link ";L1;" ...... R(";L1;")= ";
2590 INPUT G(I,8)
2600 PRINT"Length of the R-vector on link ";L2;" ...... R(";L2;")= ";
2610 INPUT G(I,9)
2620 R(L1)= G(I,8) : R(L2)= G(I,9)
2630 PRINT : INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
2640 IF Q$<>"N" THEN 2660
2650 T1= T1-1 : GOTO 2490
2660 IF D$="K" THEN G(I,10)=0 : G(I,11)=0 : RETURN
2670 L1=G(I,6) : PRINT"Point number for centroid of member ";L1;" ";
2680 INPUT N4 : G(I,10)= N4 : L(L1)= N4
2690 PRINT"Length of the S-vector ................. S(";N4;")= ";
2700 INPUT G(I,14) : S(N4)=G(I,14)
2710 PRINT"Angle from the R-vector to the S-vector B(";N4;")= ";
2720 INPUT G(I,15) : B(N4)=G(I,15)
2730 PRINT"Mass of the member ";L1;" ................ M(";L1;")= ";
2740 INPUT M(L1)
2750 PRINT"Moment of inertia of member ";L1;" ....... I(";L1;")= ";
2760 INPUT I(L1)
2770 L2=G(I,7) : PRINT"Point number for centroid of member ";L2;" ";
2780 INPUT N5 : G(I,11)= N5 : L(L2)= N5
2790 PRINT"Length of the S-vector ................ S(";N5;")= ";
2800 INPUT G(I,16) : S(N5)= G(I,16)
2810 PRINT"Angle from the R-vector to the S-vector B(";N5;")= ";
2820 INPUT G(I,17) : B(N5)= G(I,17)
2830 PRINT"Mass of the member ";L2;" ................ M(";L2;")= ";
2840 INPUT M(L2)
2850 PRINT"Moment of inertia of member ";L2;" ....... I(";L2;")= ";
2860 INPUT I(L2)
2870 T1=T1+2
2880 PRINT : INPUT "DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
2890 IF Q$="N" THEN T1=T1-2 : GOTO 2670
2900 PRINT"External member connected at joint N1=";N1;" ..... L3= ";:INPUT L3
2910 G(I,12)=L3
2920 PRINT"External member connected at joint N2=";N2;" ..... L4= ";:INPUT L4
2930 G(I,13)=L4
2940 PRINT : INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
2950 IF Q$="N" THEN 2900
2960 RETURN
2970 REM ************************************************************
2980 PRINT : PRINT"ENTER DATA FOR AN OSCILLATING SLIDER" : PRINT :I=II: G(I,1)=I
2990 REM ************************************************************
3000 INPUT"Point number for ref point on the guide member .......... N1= ";N1
3010 INPUT"Point number for reference point on the slider .......... N2= ";N2
3020 INPUT"Point number for reference point on the guide path ...... N3= ";N3
3030 G(I,2)= N1 : G(I,3)= N2 : G(I,4)= N3 : T1= T1+1
3040 INPUT"Mode of assembly ..................................... M= ";M
3050 INPUT"Member number containing the guide path .............. L1= ";L1
3060 INPUT"Member number for the slider ......................... L2= ";L2
3070 PRINT"Offset of point ";N1;" from the guide path .......... E(";L1;")= ";
3080 INPUT G(I,8) : G(I,6)= L1 : G(I,7)= L2 : G(I,5)= M
3090 PRINT : INPUT"DATA OK ? Y/N ? ",Q$ : IF Q$="n" THEN Q$="N"
3100 IF Q$="N" THEN T1=T1-1 : GOTO 3000
3110 IF D$="K" THEN G(I,9)=0 : G(I,12)=0 : RETURN
3120 L1=G(I,6) : PRINT"Point number for centroid of member ";L1;" ";
3130 INPUT N4 : G(I,9)=N4 : L(L1)=N4 : T1=T1+1
3140 PRINT"Length of the S-vector ............... S(";N4;")= ";:INPUT G(I,10)
3150 PRINT"Angle from the R-vector to the S-vector B(";N4;")= ";:INPUT G(I,11)
3160 PRINT"Mass of member ";L1;" ................... M(";L1;")= ";:INPUT M(L1)
3170 PRINT"Moment of inertia of member ";L1;" ...... I(";L1;")= ";:INPUT I(L1)
3180 L2= G(I,7) : PRINT"Point number for centroid of member ";L2;" ";
3190 INPUT N5 : G(I,12)=N5 : L(L2)=N5 : T1=T1+1
3200 PRINT"Length of the S-vector ............... S(";N5;")= ";:INPUT G(I,13)
3210 PRINT"Angle from the R-vector to the S-vector B(";N5;")= ";:INPUT G(I,14)
3220 PRINT"Mass of member ";L2;" ................... M(";L2;")= ";:INPUT M(L2)
3230 PRINT"Moment of inertia of member ";L2;" ...... I(";L2;")= ";:INPUT I(L2)
3240 INPUT"DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
3250 IF Q$ <> "N" THEN 3270
3260 IF Q$="N" THEN T1=T1-2 : GOTO 3110
3270 PRINT"External member connected at joint N1=";N1;" ..... L3=";:INPUT L3
3280 G(I,15)=L3
3290 PRINT"External member connected at joint N2=";N2;" ..... L4=";:INPUT L4
3300 G(I,16)=L4
3310 PRINT : INPUT"DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
3320 IF Q$="N" THEN 3270
3330 RETURN
3340 REM *******************************************************
3350 PRINT :PRINT"ENTER DATA FOR A ROTATING GUIDE" : PRINT :I=II: G(I,1)=I
3360 REM *******************************************************
3370 INPUT"Point number for ref point on the guide .... N1= ";G(I,2):N1=G(I,2)
3380 INPUT"Point number for ref point on 2-joint link .. N2= ";G(I,3):N2=G(I,3)
3390 INPUT"Point number for slider pivot ............... N3= ";G(I,4):N3=G(I,4)
3400 INPUT"Mode of assembly ............................ M= ";G(I,5):M=G(I,5)
3410 PRINT
3420 PRINT"Enter member number =1 if guide is fixed with W(1)=A(1)=0 "
3430 PRINT" otherwise = any member with known angular motion"
3440 PRINT
3450 INPUT"Member number with straight-line guide .... L3= ";G(I,16):L3=G(I,16)
3460 IF L3<>1 THEN 3490
3470 INPUT"Angle for the fixed guide from the X-axis B(N3)= ";G(I,9)
3480 W(1)=0 : A(1)=0 : T(1)=0 : B(N3)= G(I,9)
3490 INPUT"Member number for the slider .............. L1= ";G(I,6):L1=G(I,6)
3500 INPUT"Member number for the 2-joint link ........ L2= ";G(I,7):L2=G(I,7)
3510 PRINT"Length of R-vector on 2-joint link ..... R(";L2;")= ";
3520 INPUT "";G(I,8) : R(L2)=G(I,8)
3530 IF L3=1 THEN GOTO 3570
3540 PRINT"Angle from R-vector on moving guide member ";L3;
3550 PRINT" to guide path ... B(";N3;")= ";
3560 INPUT G(I,9) : B(N3)=G(I,9)
3570 IF D$="K" THEN G(I,10)=0 : G(I,13)=0 : GOTO 3680
3580 INPUT"Point number for centroid of the slider ...... N4= ";N4:G(I,10)=N4
3590 PRINT"Length of S-vector to centroid ";N4;" of slider ";
3600 INPUT G(I,11) : S(N4)=G(I,11)
3610 PRINT"Angle from guide path to slider centroid S-vector B(";N4;")= ";
3620 INPUT G(I,12) : B(N4)=G(I,12)
3630 INPUT"Point number for centroid of 2-joint link..... N5= ";N5:G(I,13)=N5
3640 PRINT"Length of the S-vector to centroid ";N5;" on 2-joint link ";
3650 INPUT G(I,14) : S(N5)=G(I,14)
3660 PRINT"Angle R-vector to centroid S-vector on 2-joint link.. B(";N5;")= ";
3670 INPUT G(I,15) : B(N5)= G(I,15)
3680 T1=T1+1
3690 PRINT : INPUT "DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
3700 IF Q$<>"N" THEN 3720
3710 T1= T1-1 : GOTO 3370
3720 IF D$="K" THEN RETURN
3730 L(L1)=N4 : T1=T1+1
3740 PRINT"Mass of member ";L1;" ................... M(";L1;")= ";:INPUT M(L1)
3750 PRINT"Moment of inertia of member ";L1;" ...... I(";L1;")= ";:INPUT I(L1)
3760 L(L2)=N5 : T1=T1+1
3770 PRINT"Mass of member ";L2;" ................... M(";L2;")= ";:INPUT M(L2)
3780 PRINT"Moment of inertia of member ";L2;" ...... I(";L2;")= ";:INPUT I(L2)
3790 PRINT :INPUT"DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
3800 IF Q$="N" THEN T1=T1-2 : GOTO 3730
3810 REM MEMBER L3 CONTAINS JOINT N1 .. DEFINED EARLIER
3820 REM G(I,16)=L3
3830 PRINT"External member connected to joint ";N2;" ..... L4=";:INPUT L4
3840 G(I,17)=L4
3850 PRINT : INPUT"DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
3860 IF Q$="N" THEN T1=T1-2 : GOTO 3730
3870 RETURN
3880 REM **************************************************************
3890 PRINT:PRINT"ENTER DATA FOR A LINEAR SPRING" : PRINT :I=II: G(I,1)=I
3900 REM **************************************************************
3910 INPUT"Point number at one end of the spring ... N1= ";N1:G(I,2)=N1
3920 INPUT"Point number at other end of spring ... N2= ";N2:G(I,3)=N2
3930 PRINT"Member number which includes point ";N1;" ....... L1= ";
3940 INPUT L1 : G(I,4)=L1
3950 PRINT"Member number which includes point ";N2;" ....... L2= ";
3960 INPUT L2 : G(I,5)=L2
3970 INPUT"Spring constant ( lb/in or newtons/mm) ....... KS= ";KS:G(I,6)=KS
3980 INPUT"Initial length of the free spring ............ L0= ";L0:G(I,7)=L0
3990 PRINT : INPUT"DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
4000 IF Q$="N" THEN 3910
4010 RETURN
4020 REM **************************************************************
4030 PRINT:PRINT"ENTER DATA FOR A VISCOUS DAMPER" : PRINT :I=II: G(I,1)=I
4040 REM **************************************************************
4050 INPUT"Point number at one end of the damper ... N1= ";N1:G(I,2)=N1
4060 INPUT"Point number at other end of damper ... N2= ";N2:G(I,3)=N2
4070 PRINT"Member number which includes point ";N1;" ... L1= ";
4080 INPUT L1 : G(I,4)=L1
4090 PRINT"Member number which includes point ";N2;" ... L2= ";
4100 INPUT L2 : G(I,5)=L2
4110 INPUT"Viscous damping constant (check units) ...... CD= ";KD:G(I,6)=KD
4120 PRINT : INPUT"DATA OK ? Y/N ? ";Q$ : IF Q$="n" THEN Q$="N"
4130 IF Q$="N" THEN 4050
4140 RETURN
4150 REM ***************************************************************
4160 PRINT"ENTER DATA FOR SPUR GEARS" : PRINT : I=II : G(I,1)= I
4170 REM ***************************************************************
4300 PRINT "Point number at center of first gear .... N1= ";
4310 INPUT N1 : G(I,2)= N1
4320 PRINT "Point number at center of second gear .... N2= ";
4330 INPUT N2 : G(I,3)= N2
4340 PRINT"Point number on extension of second gear . N3= ";
4350 INPUT N3 : G(I,4)= N3
4351 PRINT"Is the first gear part of the FIXED member ? Y/N ? ";
4352 Q$= INKEY$ : IF LEN(Q$)=0 THEN 4352
4353 IF Q$="y" THEN Q$="Y"
4354 IF Q$<>"Y" THEN Q$="N"
4355 PRINT Q$
4356 IF Q$="N" THEN 4360
4357 L1=1 : MN(L1)= L1 : G(I,6)= L1 : W(L1)=0 : A(L1)=0 : GOTO 4450
4360 PRINT "Member number for the first gear ......... L1= ";
4370 INPUT L1 : G(I,6)= L1
4380 IF L1 > 1 THEN 4450
4390 GOSUB 4400 : GOTO 4360
4400 PRINT
4410 PRINT"Member number 1 is reserved for the FIXED reference member."
4420 PRINT
4430 PRINT"Enter a new member number "
4440 RETURN
4450 PRINT"Is the second gear part of the FIXED member? Y/N ? ";
4452 Q$= INKEY$ : IF LEN(Q$)=0 THEN 4452
4453 IF Q$="y" THEN Q$="Y"
4454 IF Q$ <> "Y" THEN Q$= "N"
4455 PRINT Q$
4456 IF Q$ <> "Y" THEN 4469
4457 IF L1=1 THEN PRINT"ERROR: The first gear is already FIXED" : GOTO 4469
4461 L2=1 : MN(L2)= L2 : G(I,7)=L2 : W(L2)=0 : A(L2)=0 : GOTO 4491
4469 PRINT "Member number for the second gear ........ L2= ";
4470 INPUT L2 : G(I,7)= L2
4480 IF L2 > 1 THEN 4491
4490 GOSUB 4400 : GOTO 4469
4491 PRINT"Is the arm part of the FIXED reference member 1 ? Y/N? ";
4492 Q$= INKEY$ : IF LEN(Q$)=0 THEN 4492
4493 IF Q$="y" THEN Q$="Y"
4494 IF Q$<>"Y" THEN Q$="N"
4495 PRINT Q$
4496 IF Q$="N" THEN 4500
4497 IF L1=1 OR L2=1 THEN PRINT"ERROR: One of the gears is already fixed." : GOTO 4500
4498 L5=1 : MN(L5)=L5 : G(I,11)= L5 : W(L5)=0 : A(L5)=0 : GOTO 4540
4500 PRINT "Member number for ARM connecting centers "N1" and "N2" ... L5= ";
4510 INPUT L5 : G(I,11)= L5
4520 IF L5 > 1 THEN T7= T7-1 : GOTO 4540
4530 GOSUB 4400 : GOTO 4500
4540 PRINT"Point number on gear "L1" at contact point .... N8= ";
4541 INPUT N8 : G(I,5)= N8
4542 PRINT"Point number on gear "L2" at contact point .... N9= ";
4543 INPUT N9 : G(I,22)= N9
4551 PRINT : PRINT"Data OK ? [Default=Y] Y/N ? ";
4552 Q$= INKEY$ : IF LEN(Q$)=0 THEN 4552
4553 IF Q$="n" THEN Q$="N"
4554 IF Q$<>"N" THEN Q$="Y" : T1= T1+3
4555 PRINT Q$
4556 IF Q$= "N" GOTO 4300
4560 PRINT
4570 PRINT "Enter a NEGATIVE value for RHO for INTERNAL GEARS"
4580 PRINT
4590 PRINT "Radius of the first gear "L1" ........... RHO1= ";
4600 INPUT RHO1 : G(I,8)= RHO1
4610 PRINT "Radius of the second gear "L2" .......... RHO2= ";
4620 INPUT RHO2 : G(I,9)= RHO2
4630 PRINT : M= +1
4640 IF RHO1 < 0 OR RHO2 < 0 THEN M= -1
4650 IF RHO1 < 0 AND RHO2 < 0 THEN PRINT "Impossible !" : GOTO 4560
4660 IF RHO1 < 0 AND ABS(RHO1) < RHO2 THEN PRINT"RHO1 < RHO2 ?": GOTO 4560
4670 IF RHO2 < 0 AND ABS(RHO2) < RHO1 THEN PRINT"RHO2 < RHO1 ?": GOTO 4560
4680 IF M < 0 AND RHO1 < 0 THEN PRINT"Contact is CONCAVE : CONVEX"
4690 IF M > 0 THEN PRINT"Contact is CONVEX : CONVEX"
4700 PRINT:PRINT"The R-vectors for both gears are initially in the same"
4710 PRINT"direction as the ARM R-vector from point "N1" to point "N2
4720 PRINT
4730 PRINT"Length of S-vector to point "N3" on gear "L2" ... S("N3")= ";
4740 INPUT S(N3) : G(I,12)= S(N3)
4750 PRINT"Angle from R("L2") to S("N3") ................... B("N3")= ";
4760 INPUT B(N3) : G(I,10)= B(N3)
4761 PRINT : PRINT"Data OK ? [Default=Y] Y/N ?";
4762 Q$= INKEY$ : IF LEN(Q$)= 0 THEN 4762
4763 IF Q$="n" THEN Q$="N"
4764 IF Q$<>"N" THEN Q$="Y" : T1= T1 + 4
4765 PRINT Q$
4766 IF Q$="N" THEN 4560
4770 IF D$ <> "K" THEN 4780
4778 RETURN
4780 PRINT
4790 PRINT"Mass of gear "L1" ................. M("L1")= ";
4800 INPUT M(L1)
4810 PRINT"Momemt of Inertia for gear "L1" ... I("L1")= ";
4820 INPUT I(L1) : PRINT
4830 PRINT"Mass of gear "L2" ................. M("L2")= ";
4840 INPUT M(L2)
4850 PRINT"Moment of inertia for gear "L2" ... I("L2")= ";
4860 INPUT I(L2) : PRINT
4870 PRINT"Is the centroid of gear "L1" at the gear center ? ";
4880 Q$= INKEY$ : IF LEN(Q$)=0 THEN 4880
4881 IF Q$="y" THEN Q$="Y"
4882 IF Q$ <> "Y" THEN Q$="N"
4883 PRINT Q$
4890 IF Q$= "Y" THEN L(L1)= N1 : N4=N1 : S(N4)=0 : B(N4)=0 : GOTO 4960
4900 PRINT : PRINT"Point number for centroid of gear "L1;
4910 INPUT L(L1) : N4= L(L1)
4920 PRINT"S-vector to centroid of gear "L1;
4930 INPUT S(N4)
4940 PRINT"Angle from ARM R-vector to S-vector B("N4")";
4950 INPUT B(N4) : PRINT
4960 N4= L(L1) : G(I,13)= N4 : G(I,14)= S(N4) : G(I,15)= B(N4)
4970 PRINT"Is the centroid of gear "L2" at the gear center ? ";
4980 Q$= INKEY$ : IF LEN(Q$)=0 THEN 4980
4981 IF Q$="y" THEN Q$="Y"
4982 IF Q$ <> "Y" THEN Q$="N"
4983 PRINT Q$
4990 IF Q$= "Y" THEN L(L2)=N2 : N5= N2 : S(N5)=0 : B(N5)=0 : GOTO 5060
5000 PRINT : PRINT"Point number for centroid of gear "L2;
5010 INPUT L(L2) : N5= L(L2)
5020 PRINT"S-vector to centroid of gear "L2;
5030 INPUT S(N5)
5040 PRINT"Angle from ARM R-vector to S-vector B("N5")";
5050 INPUT B(N5)

5060 N5= L(L2) : G(I,16)= N5 : G(I,17)= S(N5) : G(I,18)= B(N5)
5070 PRINT : PRINT"External member connected at point "N1" ... L3= ";
5080 INPUT L3 : G(I,19)= L3
5090 PRINT"External member connected at point "N3" ... L4= ";
5100 INPUT L4 : G(I,20)= L4
5105 PRINT"External member connected at point "N2" ... L6= ";
5106 INPUT L6 : G(I,21)= L6
5120 PRINT "Data OK ? [Default= Y] Y/N ?";
5130 Q$= INKEY$ : IF LEN(Q$)=0 THEN 5130
5140 IF Q$="n" THEN Q$="N"
5142 IF Q$ <> "N" THEN Q$= "Y" : T1= T1 + 4
5144 PRINT Q$
5150 RETURN
5160 PRINT : GOTO 4780


  3 Responses to “Category : Science and Education
Archive   : MECHAN93.ZIP
Filename : GEOMPAR.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/