home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #3.1
/
RBBSIABOX31.cdr
/
pool
/
plotshut.bas
< prev
next >
Wrap
BASIC Source File
|
1990-09-29
|
5KB
|
140 lines
2 'Space Shuttle plot for ROLAND MX800 or WATANABE flatbed plotters
4 'Taken from ROLAND BBS by Trevor Marshall, 3/14/84
10 'PLOT
20 KEY OFF
30 X=0:Y=0:Z=0:X3=0:Y3=0:Z3=0:AM=0:BM=0:CM=0:DM=0:EM=0:FM=0:GM=0:HM=0:IM=0:D=0:P=0:B=0:H=0:U=0:V=0:U1=0:V1=0
40 DIM V(300,3),E(300)
50 CLS
60 READ NV
70 FOR P=1 TO NV
80 READ V(P,1),V(P,2),V(P,3)
90 V(P,1) = .12 * V(P,1)
100 V(P,2) = .12 * V(P,2)
110 V(P,3) = .12 * V(P,3)
120 NEXT P
130 READ NE
140 FOR E=1 TO NE
150 READ E(E)
160 NEXT E
170 SCREEN 2
180 D=120
190 LPRINT "J";8:LPRINT "M";0;",";0
200 LPRINT "M";0;",";0
210 LPRINT "D";3000;",";0
220 LPRINT "D";3000;",";2600
230 LPRINT "D";0;",";2600
240 LPRINT "D";0;",";0
250 LPRINT "D";1500;",";0;",";1500;",";2600
260 LPRINT "M";3000;",";1300
270 LPRINT "D";0;",";1300
271 LPRINT "M";2975;",";2575:LPRINT "Q2"
272 LPRINT "S7"
273 LPRINT "PSpace Shuttle"
280 LOCATE 1,1
290 XOFF(1)=-250:YOFF(1)=250
300 XOFF(2)=-250:YOFF(2)=1300
310 XOFF(3)=1250:YOFF(3)=250
320 XOFF(4)=1250:YOFF(4)=1300
330 FOR INDEX=1 TO 4
340 IF INDEX=1 THEN P0=0:P1=0:P2=0
350 IF INDEX=2 THEN P0=125:P1=190:P2=0
360 IF INDEX=3 THEN P0=180:P1=180:P2=180
370 IF INDEX=4 THEN P0=45:P1=45:P2=45
380 LPRINT "J";INDEX
390 CLS
400 P=6.28 * P0 / 255 - 3.1416
410 B=6.28 * P2 / 255
420 H=6.28 * P1 / 255
430 GOSUB 600
440 XV = -D * CP * SH: REM ---SEE SUB.---
450 YV = -D * CP * CH
460 ZV = -D * SP
470 REM ---PROJECT NE POINTS---
480 FOR E=1 TO NE
490 X = V( ABS ( E ( E ) ), 1 )
500 Y = V( ABS ( E ( E ) ), 2 )
510 Z = V( ABS ( E ( E ) ), 3 )
520 GOSUB 730
530 IF E(E)>0 THEN LINE (U1*2+75,V1+20)-(U*2+75,V+20)
540 IF E(E)>0 THEN LPRINT "M";INT(U1+75)*5+XOFF(INDEX);",";INT(V1+20)*5+YOFF(INDEX)';",";INT(U+75)*10;",";INT(V+20)*10
550 IF E(E)>0 THEN LPRINT "D";INT(U1+75)*5+XOFF(INDEX);",";INT(V1+20)*5+YOFF(INDEX);",";INT(U+75)*5+XOFF(INDEX);",";INT(V+20)*5+YOFF(INDEX)
560 U1 = U: V1 = V
570 NEXT E
580 LPRINT "H"
590 NEXT INDEX:END
600 CH = COS (H): SH = SIN (H)
610 CP = COS (P): SP = SIN (P)
620 CB = COS (B): SB = SIN (B)
630 AM = CB * CH - SH * SP * SB
640 BM = -CB * SH - SP * CH * SB
650 CM = CP * SB
660 DM = SH * CP
670 EM = CP * CH
680 FM = SP
690 GM = -CH * SB - SH * SP * CB
700 HM = SH * SB - SP * CH * CB
710 IM = CP * CB
720 RETURN
730 X = X - XV
740 Y = Y - YV
750 Z = Z - ZV
760 X3 = AM * X + BM * Y + CM * Z
770 Y3 = DM * X + EM * Y + FM * Z
780 Z3 = GM * X + HM * Y + IM * Z
790 U = 135 + 13.5 * D * X3 / Y3
800 V = 80 - 11.5 * D * Z3 / Y3
810 RETURN
820 DATA 124
830 DATA 0,-2.2,46,1.5,-2.6,46,2.2,-4.6,46,1.7,-6.5,46,0,-6.7,46
840 DATA -1.7,-6.5,46,-2.2,-4.6,46,-1.5,-2.6,46
850 DATA 0,-.8,43,2.8,-1.5,43,4,-4.5,43,3,-7.2,43,0,-8,43,-3,-7.2,43
860 DATA -4,-4.5,43,-2.8,-1.5,43
870 DATA 0,1.7,38,4.6,0,38,5.8,-4.4,38,4,-8.2,38,0,-9,38,-4,-8.2,38
880 DATA -5.8,-4.4,38,-4.6,0,38
890 DATA 0,4,32.5,4.5,1,32.5,5.8,-4.6,32.5,4,-9,32.5,0,-9.5,32.5,-4,-9,32.5
900 DATA -5.8,-4.6,32.5,-4.5,1,32.5
910 DATA 0,8,26.3,3.5,7,26.3,7.8,2,26.3,8,-7,26.3,0,-9.8,26.3,-8,-7,26.3
920 DATA -7.8,2,26.3,-3.5,7,26.3
930 DATA 0,8,21.5,3.8,7.5,21.5,8,3,21.5,8,-8,21.5,0,-9.8,21.5,-8,-8,21.5
940 DATA -8,3,21.5,-3.8,7.5,21.5
950 DATA 0,8,14,4.7,7,14,8,4,14,8,-8.7,14,0,-10,14,-8,-8.7,14,-8,4,14
960 DATA -4.7,7,14
970 DATA 0,8,4,4.7,7,4,8,4,4,8,-8.7,4,0,-10,4,-8,-8.7,4,-8,4,4
980 DATA -4.7,7,4
990 DATA 0,8,-12,4.7,7,-12,8,4,-12,8,-8.7,-12,0,-10,-12,-8,-8.7,-12,-8,4,-12
1000 DATA -4.7,7,-12
1010 DATA 0,8,-27.3,4.7,7,-27.3,8,4,-27.3,8,-8.7,-27.3,0,-10,-27.3,-8,-8.7,-27.3
1020 DATA -8,4,-27.3,-4.7,7,-27.3
1030 DATA 0,8,-35.6,4.7,7,-35.6,8,4,-35.6,8,-8.7,-35.6,0,-10,-35.6,-8,-8.7,-35.6
1040 DATA -8,4,-35.6,-4.7,7,-35.6
1050 DATA 0,9,-43,2,8.5,-43,8.8,1.5,-43,9,-10,-43,0,-10.8,-43,-9,-10,-43
1060 DATA -8.8,1.5,-43,-2,8.5,-43
1070 DATA 0,9.5,-48,2,9.3,-48,9.2,1.5,-48,10,-10,-48,0,-10.2,-48,-10,-10,-48
1080 DATA -9.2,1.5,-48,-2,9.3,-48
1090 DATA 8.7,-8.7,21,15,-8.7,-16,35,-10,-36,35,-10,-40
1100 DATA -8.7,-8.7,21,-15,-8.7,-16,-35,-10,-36,-35,-10,-40
1110 DATA 0,13,-37,0,33,-60,0,33,-69,0,14,-60
1120 DATA 6,11,-43,6,11,-48,11,5,-43,11,5,-48,-6,11,-43,-6,11,-48,-11,5,-43
1130 DATA -11,5,-48
1140 DATA 259
1150 DATA -1,2,3,4,5,6,7,8,1,-9,10,11,12,13,14,15,16,9,-17,18,19,20,21,22,23,24,17
1160 DATA -25,26,27,28,29,30,31,32,25,-33,34,35,36,37,38,39,40,33
1170 DATA -41,42,43,44,45,46,47,48,41,-49,50,51,52,53,54,55,56,49
1180 DATA -57,58,59,60,61,62,63,64,57,-65,66,67,68,69,70,71,72,65
1190 DATA -73,74,75,76,77,78,79,80,73,-81,82,83,84,85,86,87,88,81
1200 DATA -89,90,91,92,93,94,95,96,89,-97,98,99,100,101,102,103,104,97
1210 DATA -1,9,17,25,33,41,49,57,65,73,81,89,97
1220 DATA -2,10,18,26,34,42,50,58,66,74,82,90,98
1230 DATA -3,11,19,27,35,43,51,59,67,75,83,91,99
1240 DATA -4,12,20,28,36,44,52,60,68,76,84,92,100
1250 DATA -5,13,21,29,37,45,53,61,69,77,85,93,101
1260 DATA -6,14,22,30,38,46,54,62,70,78,86,94,102
1270 DATA -7,15,23,31,39,47,55,63,71,79,87,95,103
1280 DATA -8,16,24,32,40,48,56,64,72,80,88,96,104
1290 DATA -44,105,106,107,108,92
1300 DATA -46,109,110,111,112,94
1310 DATA -81,113,114,115,116,89
1320 DATA -82,117,118,-83,119,120
1330 DATA -87,121,122,-88,123,124
1340 DATA -117,119,-121,123,-118,120,-122,124