home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Software
/
1520-HOW-TO-TUTORIAL
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
29KB
|
1,291 lines
1000 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1001 [143]" (null) (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$ (null)
1002 REM" [221] [221] PLOTTER PROGRAMMING [221] [221]
1003 [143]" (null) MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null) (null)
1004 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1005 :
1006 :
1007 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1008 REM"[160][221] FILE OPENING CONVENTIONS [221]
1009 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1010 :
1011 REM" [213][192][192][192][192][192] FILE NUMBER
1012 [143]" (null)
1013 REM" [221] [213][192][192][192] DEVICE ADDRESS
1014 [143]" (null) (null)
1015 REM" [221] [221] [213][192] SECONDARY ADDRESS
1016 [143]" (null) (null) (null) (PORT SELECT)
1017 REM" [221] [221] [221]
1018 [143]" (null) (null) (null)
1019 REM" [221] [221] [221] PORT FUNCTION
1020 [143]" > > > TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN
1021 OPEN 4,6 :REM ASCII DATA STRING
1022 OPEN 1,6,1 :REM PLOT COMMANDS
1023 OPEN 2,6,2 :REM PEN COLOR SELECT
1024 OPEN 3,6,3 :REM SELECT CHAR SIZE
1025 OPEN 44,6,4 :REM CHAR ROTATION
1026 OPEN 5,6,5 :REM DASH LINE SELECT
1027 OPEN 6,6,6 :REM UPPER/LOWER CASE
1028 OPEN 7,6,7 :REM PLOTTER RESET
1029 :
1030 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1031 [143]" (null) CHARACTER PRINTING (null)
1032 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1033 :
1034 [143] PRINTING IS THROUGH PORT 0,
1035 [143] USING FILE NUMBER #4. THE
1036 [143] SYNTAX IS THE SAME AS FOR
1037 [143] THE STANDARD PRINTER.
1038 :
1039 [143] PRINTING WITH QUOTED STRINGS
1040 :
1041 : [152]4,"QUOTED TEXT STRING"
1042 :
1043 [143] PRINTING WITH STRING VARIABLES
1044 :
1045 : S$[178]"STRING VARIABLE"
1046 : [152]4,S$
1047 :
1048 [143] PRINTING WITH CHR$ CODES
1049 :
1050 : [152]4,[199](67)[199](72);
1051 : [152]4,[199](82)[199](36);
1052 : [152]4,[199](32)[199](67);
1053 : [152]4,[199](79)[199](68);
1054 : [152]4,[199](69)[199](83)
1055 :
1056 [143] PRINTING WITH TAB AND SPC
1057 :
1058 : [152]4,">"[163]10);
1059 : [152]4,"I TABBED TO HERE"
1060 :
1061 : [152]4,">"[166]10);
1062 : [152]4,"I SPACED TO HERE"
1063 :
1064 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1065 REM" [221] USING THE OTHER PORTS [221]
1066 [143]" (null) WITH CHARACTER PRINTING (null)
1067 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1068 :
1069 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1070 REM" [221] SELECTING PEN COLOR [221]
1071 [143]"CLOSEMID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1072 :
1073 REM SELECTING DIFFERENT PEN
1074 REM COLORS IS DONE BY PRINTING
1075 REM THE PEN COLOR CODE THROUGH
1076 REM PORT 2 USING FILE #2.
1077 :
1078 REM PEN COLOR CODES ARE:
1079 :
1080 REM "0" = BLACK
1081 REM "1" = BLUE
1082 REM "2" = GREEN
1083 REM "3" = RED
1084 :
1085 : DATA BLACK,BLUE,GREEN,RED
1086 :
1087 : FOR I=0 TO 3
1088 : READ S$
1089 : PRINT#2,I :REM CHANGE COLOR
1090 : PRINT#4,"THIS PEN IS "S$
1091 : NEXT I
1092 :
1093 REM RESET PEN COLOR TO DEFAULT
1094 :
1095 : PRINT#2,"0" :REM BLACK PEN
1096 :
1097 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1098 [143]"CLOSE(null) SELECTING CHARACTER SIZE (null)
1099 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1100 :
1101 [143] SELECTING OTHER CHARACTER
1102 [143] SIZES IS DONE BY PRINTING
1103 [143] THE CHARACTER SIZE THROUGH
1104 [143] PORT 3 USING FILE #3.
1105 :
1106 [143] CHARACTER SIZE CODES ARE:
1107 :
1108 [143] "0" = 80 CHARACTERS/LINE
1109 [143] "1" = 40 CHARACTERS/LINE
1110 [143] "2" = 20 CHARACTERS/LINE
1111 [143] "3" = 10 CHARACTERS/LINE
1112 :
1113 : [131] 80,40,20,10
1114 :
1115 : [129] I[178]0 [164] 3
1116 : [135] S$
1117 : [152]3,I :[143] CHANGE SIZE
1118 : [152]4,[201]([196](I),1);
1119 : [152]4,"="S$"/LINE"
1120 : [152]4
1121 : [130] I
1122 :
1123 [143] RESET SIZE TO DEFAULT
1124 :
1125 : [152]3,"1" :[143] 40/LINE
1126 :
1127 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1128 REM"[160][221] CHARACTER ROTATION [221]
1129 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1130 :
1131 REM CHARACTERS TO BE PRINTED MAY
1132 REM BE ROTATED 90 DEGREES TO THE
1133 REM RIGHT BY PRINTING THE VALUE
1134 REM OF ROTATION THROUGH PORT 4
1135 REM USING FILE #44.
1136 :
1137 REM ROTATION CODES ARE:
1138 :
1139 REM "0" = NORMAL HORIZONTAL
1140 REM "1" = 90 DEGREE ROTATION
1141 :
1142 : DATA V,E,R,T,I,C,A,L
1143 :
1144 : PRINT#4,"HORIZONTAL LINE"
1145 :
1146 : PRINT#44,"1" :REM SET ROTATION
1147 :
1148 : PRINT#4,"E N I L D E T A T O R"
1149 :
1150 : FOR I=1 TO 8
1151 : READ S$
1152 : PRINT#4,S$
1153 : NEXT I
1154 :
1155 REM RESTORE DEFAULT ORIENTATION
1156 :
1157 : PRINT#44,"0" :REM HORIZONTAL
1158 :
1159 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1160 [143]" (null) DASHED LINE CHARACTERS (null)
1161 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1162 :
1163 [143] CHARACTERS MAY BE PRINTED
1164 [143] USING DASHED LINES BY
1165 [143] PRINTING THE LINE SEGMENT
1166 [143] SIZE CODE THROUGH PORT 5
1167 [143] USING FILE NUMBER #5.
1168 [143] ALLOWABLE VALUES ARE 0 TO
1169 [143] 15. SIZE CODES ARE:
1170 :
1171 [143] 0 = SOLID LINE
1172 [143] 1 = SMALLEST SEGMENT
1173 [143] 2 = LARGER SEGMENT
1174 [143] .
1175 [143] .
1176 [143] 15 = LARGEST SEGMENT
1177 :
1178 [143] USE LARGE CHARACTERS
1179 :
1180 : [152]3,"3" :[143] 10/LINE
1181 : [152]4
1182 :
1183 [143] PRINT EVERY THIRD SIZE LINE
1184 :
1185 : [129] I[178]0 [164] 15 [169] 3
1186 : [152]5,I :[143] CHANGE LINE
1187 : [152]4,"DASHED"
1188 : [130] I
1189 :
1190 [143] RESTORE DEFAULT SIZE AND LINE
1191 :
1192 : [152]3,"1" :[143] 40/LINE
1193 : [152]5,"0" :[143] SOLID LINE
1194 :
1195 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1196 REM" [221] UPPER AND LOWER CASE [221]
1197 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1198 :
1199 REM UPPER AND LOWER CASE CAN BE
1200 REM PRINTED AT ALL TIMES. THE
1201 REM DEFAULT IS TO PRINT ALL
1202 REM NORMAL CHARACTERS IN UPPER
1203 REM CASE AND SHIFTED CHARACTERS
1204 REM IN LOWER CASE. THIS CAN BE
1205 REM REVERSED BY PRINTING THE
1206 REM CASE SELECT CODE THROUGH
1207 REM PORT 6 USING FILE NUMBER #6.
1208 :
1209 REM CASE SELECT CODES ARE:
1210 :
1211 REM "0" = DEFAULT CASE
1212 REM "1" = REVERSE CASE
1213 :
1214 : PRINT#4
1215 : PRINT#4,"DEFAULT CASE:"
1216 : GOSUB 1228 :REM PRINT CHARS
1217 :
1218 : PRINT#6,"1" :REM REVERSE CASE
1219 :
1220 : PRINT#4
1221 : PRINT#4,"REVERSE CASE:"
1222 : GOSUB 1228 :REM PRINT CHARS
1223 :
1224 : GOTO 1240 :REM JUMP SUBROUTINE
1225 :
1226 REM PRINT CHARACTER SET
1227 :
1228 : FOR I=64 TO 95
1229 : PRINT#4,CHR$(I);
1230 : NEXT I
1231 : PRINT#4
1232 : FOR I=192 TO 223
1233 : PRINT#4,CHR$(I);
1234 : NEXT I
1235 : PRINT#4
1236 : RETURN
1237 :
1238 REM RESTORE DEFAULT CASE
1239 :
1240 : PRINT#6,"0" :REM DEFAULT CASE
1241 :
1242 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1243 [143]" (null) PLOTTING LINES (null)
1244 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1245 :
1246 [143] LINES OF ANY LENGTH CAN BE
1247 [143] DRAWN IN ANY DIRECTION AND
1248 [143] THE PEN CAN BE MOVED TO ANY
1249 [143] POINT IN THE PLOTTING AREA
1250 [143] BY PRINTING THE APPROPRIATE
1251 [143] COMMAND THROUGH PORT 1 USING
1252 [143] FILE NUMBER #1.
1253 :
1254 [143] THE FORMAT FOR THE PRINT
1255 [143] STATEMENT WHEN PRINTING TO
1256 [143] PORT 1 IS:
1257 :
1258 [143] PRINT#1,"C",X,Y
1259 :
1260 [143] WHERE:
1261 :
1262 [143] C = ONE OF THE COMMANDS
1263 [143] X = THE X COORDINATE
1264 [143] Y = THE Y COORDINATE
1265 :
1266 [143] COMMANDS ARE:
1267 :
1268 [143] "I" = SET RELATIVE ORIGIN
1269 [143] "H" = MOVE HOME ABSOLUTE
1270 [143] "M" = MOVE ABSOLUTE TO X,Y
1271 [143] "R" = MOVE RELATIVE TO X,Y
1272 [143] "D" = DRAW ABSOLUTE TO X,Y
1273 [143] "J" = DRAW RELATIVE TO X,Y
1274 :
1275 [143] NOTE:
1276 :
1277 [143] MOVE - IMPLIES PEN UP
1278 [143] DRAW - IMPLIES PEN DOWN
1279 [143] ABSOLUTE - REFERENCED TO
1280 [143] HOME POSITION
1281 [143] RELATIVE - REFERENCED TO
1282 [143] RELATIVE ORIGIN
1283 [143] SET WITH "I"
1284 :
1285 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1286 REM" [221] PLOTTING AREA BOUNDS [221]
1287 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1288 :
1289 REM THE PLOTTING AREA IS ABOUT
1290 REM 3 3/4 INCES WIDE BY ABOUT
1291 REM 15 3/4 INCHES LONG. IS IS
1292 REM GRADUATED AS FOLLOWS:
1293 :
1294 REM 0,998 479,998
1295 REM" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]
1296 [143]" (null) (null)
1297 REM" [221] [221]
1298 [143] / /
1299 [143]" (null) (null)
1300 REM" [221]0,0 (HOME) 479,0[221]
1301 [143]" -TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN<
1302 REM" [221] [221]
1303 [143]" (null) (null)
1304 REM / /
1305 REM" [221] [221]
1306 [143]" (null)0,-998 479,-998(null)
1307 REM" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]
1308 :
1309 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1310 REM" [221] PLOTTING WITH ABSOLUTE [221]
1311 [143]" (null) COORDINATE REFERENCES (null)
1312 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1313 :
1314 [143] ABSOLUTE PLOT COMMANDS ARE
1315 [143] REFERENCED RELATIVE TO THE
1316 [143] HOME POSITION (X=0, Y=0).
1317 [143] HOME POSITION IS ESTABLISHED
1318 [143] UPON POWER ON OR BY PRINTING
1319 [143] A CARRIAGE RETURN THROUGH
1320 [143] PORT 0, FILE NUMER #4.
1321 :
1322 [143] MOVE THE PEN TO AREA BOTTOM
1323 :
1324 : [152]1,"M",0,[171]998
1325 :
1326 [143] ESTABLISH NEW HOME POSITION
1327 :
1328 : [152]4
1329 :
1330 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1331 REM" [221] DRAW BOUNDS OF PLOT AREA [221]
1332 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1333 :
1334 : PRINT#1,"D", 0,-998
1335 : PRINT#1,"D",479,-998
1336 : PRINT#1,"D",479, 998
1337 : PRINT#1,"D", 0, 998
1338 : PRINT#1,"D", 0, 0
1339 : PRINT#1,"D",479, 0
1340 :
1341 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1342 [143]"CLOSE(null) PLOTTING AND PRINTING (null)
1343 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1344 :
1345 [143] CHARACTER SET DIMENSIONS
1346 :
1347 [143] WHEN COMBINING PLOTTING
1348 [143] WITH PRINTING AS IN THE
1349 [143] EXAMPLE BELOW, THE SIZE OF
1350 [143] THE PRINTED CHARACTERS MUST
1351 [143] BE KNOWN IN TERMS OF THE
1352 [143] PLOTTING AREA UNITS. A TABLE
1353 [143] OF CHARACTER SIZE CODES AND
1354 [143] THEIR CORRESPONDING PLOTTING
1355 [143] AREA DIMENSIONS FOLLOWS:
1356 :
1357 [143] SIZE CHARACTER
1358 [143] CODE DIMENSION
1359 [143]" TANTANTANTANTANTAN TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN
1360 :
1361 REM "0" 10 HIGH BY 6 WIDE
1362 REM "1" 20 HIGH BY 12 WIDE
1363 REM "2" 40 HIGH BY 24 WIDE
1364 REM "3" 80 HIGH BY 48 WIDE
1365 :
1366 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1367 [143]" (null) LABEL POINTS OF PLOT AREA(null)
1368 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1369 :
1370 [143] MOVE TO TOP OF PLOT AREA
1371 :
1372 : [152]1,"M", 0, 998
1373 :
1374 [143] PRINT TOP COORDINATES
1375 :
1376 : [152]4
1377 : [152]4," 0,998";
1378 : [152]4,[163]27)"479,998"
1379 :
1380 [143] PRINTING WITH CARRIAGE RETURN
1381 [143] CAUSED A NEW HOME TO BE
1382 [143] DEFINED, SO MOVE TO MIDDLE
1383 [143] OF PLOT AREA WHILE BACKING UP
1384 [143] THE HEIGHT OF ONE PRINT LINE.
1385 :
1386 : [152]1,"M", 0,[171]998[170]20
1387 :
1388 [143] PRINT MIDDLE COORDINATES
1389 :
1390 : [152]4," 0,0 (HOME)";
1391 : [152]4,[163]24)"479,0"
1392 :
1393 [143] MOVE TO BOTTOM OF PLOT AREA
1394 [143] WHILE BACKING UP THE HEIGHT OF
1395 [143] ONE PRINT LINE, AS BEFORE.
1396 :
1397 : [152]1,"M", 0,[171]998[170]20
1398 :
1399 [143] PRINT THE BOTTOM COORDINATES
1400 :
1401 : [152]4," 0,-998";
1402 : [152]4,[163]25)"479,-998"
1403 : [152]4
1404 :
1405 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1406 REM" [221] PLOTTING FUNCTIONS [221]
1407 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1408 :
1409 REM THE FOLLOWING TWO EXAMPLES
1410 REM DEMONSTRATE PLOTTING OF
1411 REM FUNCTIONS. THE FIRST EXAMPLE
1412 REM PLOTS A SINE CURVE USING
1413 REM THE ABSOLUTE COORDINATE
1414 REM REFERENCE RELATIVE TO HOME.
1415 :
1416 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1417 [143]"CLOSE(null) PLOTTING A SINE CURVE (null)
1418 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1419 :
1420 [143] EJECT ENOUGH PAPER
1421 :
1422 : [152]1,"M", 0,[171]200
1423 :
1424 [143] ESTABLISH NEW HOME POSITION
1425 :
1426 : [152]4
1427 :
1428 [143] DRAW BOX 400 HIGH BY 479 WIDE
1429 :
1430 : [152]1,"D", 0, 200
1431 : [152]1,"D",479, 200
1432 : [152]1,"D",479,[171]200
1433 : [152]1,"D", 0,[171]200
1434 : [152]1,"D", 0, 0
1435 : [152]1,"D",479, 0
1436 :
1437 [143] RETURN TO HOME
1438 :
1439 : [152]1,"H"
1440 :
1441 [143] DRAW A SINE WAVE IN THE BOX.
1442 :
1443 [143] THE VARIABLE I WILL TAKE
1444 [143] VALUES FROM 0 TO 360 DEGREES
1445 [143] (2*[255] RADIANS). THE STEP VALUE
1446 [143] WILL PRODUCE 200 SAMPLES
1447 [143] ALONG THE X AXIS VARYING FROM
1448 [143] 0 TO 479. THE SINE WILL VARY
1449 [143] BETWEEN +1 AND -1. THE VALUE
1450 [143] OF Y, THEREFORE VARIES BETWEEN
1451 [143] +200 AND -200.
1452 :
1453 : [129] I[178]0 [164] 2[172][255] [169] [255][173]100
1454 : X[178]I[172]479[173](2[172][255])
1455 : Y[178][191](I)[172]200
1456 : [152]1,"D",X,Y
1457 : [130] I
1458 :
1459 [143] EJECT THE DRAWING
1460 :
1461 : [152]1,"M", 0,[171]300
1462 :
1463 [143] ESTABLISH NEW HOME POSITION
1464 :
1465 : [152]4
1466 :
1467 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1468 REM" [221] PLOTTING A CIRCLE [221]
1469 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1470 :
1471 REM EJECT ENOUGH PAPER
1472 :
1473 : PRINT#1,"M", 0,-239-20
1474 :
1475 REM ESTABLISH NEW HOME POSITION
1476 :
1477 : PRINT#4
1478 :
1479 REM DRAW A SQUARE BOX 479 BY 479
1480 :
1481 : PRINT#1,"D", 0, 239
1482 : PRINT#1,"D",479, 239
1483 : PRINT#1,"D",479,-239
1484 : PRINT#1,"D", 0,-239
1485 : PRINT#1,"D", 0, 0
1486 : PRINT#1,"D",479, 0
1487 :
1488 REM MOVE TO CENTER OF THE CIRCLE
1489 :
1490 : PRINT#1,"M",239, 0
1491 :
1492 REM ESTABLISH A RELATIVE ORIGIN
1493 :
1494 : PRINT#1,"I"
1495 :
1496 REM DRAW A CIRCLE IN THE BOX USING
1497 REM THE "J" COMMAND, REFERENCING
1498 REM THE RELATIVE ORIGIN. BEFORE
1499 REM PLOTTING THE FIRST POINT (WHEN
1500 REM I=0) USE THE "R" COMMAND TO
1501 REM MOVE WITH THE PEN UP TO THE
1502 REM FIRST POINT ON THE CIRCLE, SO
1503 REM WE DON'T DRAW FROM THE CENTER
1504 REM TO THE FIRST POINT. THE SINE
1505 REM AND COSINE WILL VARY BETWEEN
1506 REM +1 AND -1 YIELDING VALUES FOR
1507 REM X AND Y BETWEEN +239 AND -239.
1508 :
1509 : FOR I=0 TO 2*(null) STEP (null)/100
1510 : X=SIN(I)*239
1511 : Y=COS(I)*239
1512 : IF I=0 THEN PRINT#1,"R",X,Y
1513 : PRINT#1,"J",X,Y
1514 : NEXT I
1515 :
1516 REM EJECT THE DRAWING
1517 :
1518 : PRINT#1,"M", 0,-239-80
1519 :
1520 REM ESTABLISH NEW HOME POSITION
1521 :
1522 : PRINT#4
1523 :
1524 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1525 [143]" (null) PLOT POSITIONING (null)
1526 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1527 :
1528 [143] THE FOLLOWING EXAMPLES
1529 [143] DEMONSTRATE POSITIONING
1530 [143] THE PLOT ON THE PLOTTER BED.
1531 :
1532 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1533 REM"[160][221] PLOTTING A GIANT LETTER [221]
1534 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1535 :
1536 REM (0,0) (240,0)
1537 REM" [206] [205]
1538 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1539 REM" [221] (80,80) [221]
1540 [143]" (null) (null) (null)
1541 REM" [221] [209][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][209]
1542 [143]" (null) (null) (80,160) (null)
1543 REM" [221] [221][206] (240,80)
1544 [143]" (null) (null)TANTANTANTANTANTANTANTAN(null)
1545 REM" [221] [221][205]
1546 [143]" (null) (null) (160,160)
1547 REM" [221] [209][192][192][192][192][192][192][192][192][209]
1548 [143]" (null) (null)(null) (null)
1549 REM" [221] [221] (80,240) (160,240)
1550 [143]" (null) (null)
1551 REM" [221] [221] (80,400)
1552 [143]" (null) (null)(null)
1553 REM" [209][192][192][192][209]
1554 [143]" (null)
1555 REM (0,400)
1556 :
1557 REM GIANT LETTER DATA POINTS
1558 :
1559 REM X , Y
1560 REM" [192][192][192] [192][192][192]
1561 : [131] 0, 0
1562 : [131] 240, 0
1563 : [131] 240, 80
1564 : [131] 80, 80
1565 : [131] 80,160
1566 : [131] 160,160
1567 : [131] 160,240
1568 : [131] 80,240
1569 : [131] 80,400
1570 : [131] 0,400
1571 : [131] 0, 0
1572 :
1573 [143] DIMENSION DATA ARRAYS
1574 :
1575 : [134] X(11) :[143] X-AXIS VALUES
1576 : [134] Y(11) :[143] Y-AXIS VALUES
1577 :
1578 [143] LOAD DATA INTO ARRAYS
1579 :
1580 : [129] I[178]1 [164] 11
1581 : [135] X,Y
1582 : X(I)[178]X
1583 : Y(I)[178]Y
1584 : [130]
1585 :
1586 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1587 REM"[160][221] PLOT THE GIANT LETTER [221]
1588 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1589 :
1590 REM DRAW A SQUARE BOX 479 BY 479
1591 :
1592 : PRINT#4
1593 : PRINT#4,"INITIAL POSITION:"
1594 :
1595 : PRINT#1,"D",479, 0
1596 : PRINT#1,"D",479,-479
1597 : PRINT#1,"D", 0,-479
1598 : PRINT#1,"D", 0, 0
1599 :
1600 REM MOVE TO THE INITIAL POINT
1601 :
1602 : PRINT#1,"M",X(1),-Y(1)
1603 :
1604 REM PLOT THE POINTS FROM THE ARRAY
1605 :
1606 : FOR I=1 TO 11
1607 : PRINT#1,"D",X(I),-Y(I)
1608 : NEXT
1609 :
1610 REM EJECT THE DRAWING
1611 :
1612 : PRINT#1,"M", 0,-479
1613 :
1614 REM ESTABLISH NEW HOME POSITION
1615 :
1616 : PRINT#4
1617 :
1618 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1619 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
1620 REM" [221] ON THE RIGHT SIDE OF [221]
1621 [143]" (null) THE PLOTTER BED. (null)
1622 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1623 :
1624 [143] DRAW A SQUARE BOX 479 BY 479
1625 :
1626 : [152]4
1627 : [152]4,"X-AXIS MOVED RIGHT:"
1628 :
1629 : [152]1,"D",479, 0
1630 : [152]1,"D",479,[171]479
1631 : [152]1,"D", 0,[171]479
1632 : [152]1,"D", 0, 0
1633 :
1634 [143] ADD 240 TO THE X-AXIS AND MOVE
1635 [143] TO THE INITIAL POINT.
1636 :
1637 : [152]1,"M",X(1)[170]240,[171]Y(1)
1638 :
1639 [143] PLOT THE POINTS FROM THE ARRAY
1640 [143] ADDING 240 TO THE X-AXIS VALUE
1641 :
1642 : [129] I[178]1 [164] 11
1643 : [152]1,"D",X(I)[170]240,[171]Y(I)
1644 : [130]
1645 :
1646 [143] EJECT THE DRAWING
1647 :
1648 : [152]1,"M", 0,[171]479
1649 :
1650 [143] ESTABLISH NEW HOME POSITION
1651 :
1652 : [152]4
1653 :
1654 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1655 REM"[160][221] PLOT THE GIANT LETTER [221]
1656 [143]" (null) ON THE BOTTOM OF THE (null)
1657 REM" [221] PLOTTER BED. [221]
1658 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1659 :
1660 REM DRAW A SQUARE BOX 479 BY 479
1661 :
1662 : PRINT#4
1663 : PRINT#4,"Y-AXIS MOVED DOWN:"
1664 :
1665 : PRINT#1,"D",479, 0
1666 : PRINT#1,"D",479,-479
1667 : PRINT#1,"D", 0,-479
1668 : PRINT#1,"D", 0, 0
1669 :
1670 REM ADD 80 TO THE Y-AXIS AND
1671 REM MOVE TO THE INITIAL POINT.
1672 :
1673 : PRINT#1,"M",X(1),-(Y(1)+80)
1674 :
1675 REM PLOT THE POINTS FROM THE ARRAY
1676 REM ADDING 80 TO THE Y-AXIS.
1677 :
1678 : FOR I=1 TO 11
1679 : PRINT#1,"D",X(I),-(Y(I)+80)
1680 : NEXT
1681 :
1682 REM EJECT THE DRAWING
1683 :
1684 : PRINT#1,"M", 0,-479
1685 :
1686 REM ESTABLISH NEW HOME POSITION
1687 :
1688 : PRINT#4
1689 :
1690 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1691 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
1692 REM" [221] IN THE LOWER RIGHT HAND [221]
1693 [143]" (null) CORNER OF THE PLOT BED. (null)
1694 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1695 :
1696 [143] DRAW A SQUARE BOX 479 BY 479
1697 :
1698 : [152]4
1699 : [152]4,"X-AXIS MOVED RIGHT,"
1700 : [152]4,"Y-AXIS MOVED DOWN:"
1701 :
1702 : [152]1,"D",479, 0
1703 : [152]1,"D",479,[171]479
1704 : [152]1,"D", 0,[171]479
1705 : [152]1,"D", 0, 0
1706 :
1707 [143] ADD 240 TO THE X-AXIS AND
1708 [143] ADD 80 TO THE Y-AXIS THEN
1709 [143] MOVE TO THE INITIAL POINT.
1710 :
1711 : [152]1,"M",X(1)[170]240,[171](Y(1)[170]80)
1712 :
1713 [143] PLOT THE POINTS FROM THE ARRAY
1714 [143] ADDING 240 TO THE X-AXIS AND
1715 [143] ADDING 80 TO THE Y-AXIS.
1716 :
1717 : [129] I[178]1 [164] 11
1718 : [152]1,"D",X(I)[170]240,[171](Y(I)[170]80)
1719 : [130]
1720 :
1721 [143] EJECT THE DRAWING
1722 :
1723 : [152]1,"M", 0,[171]479
1724 :
1725 [143] ESTABLISH NEW HOME POSITION
1726 :
1727 : [152]4
1728 :
1729 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1730 REM" [221] PLOT REFLECTIONS [221]
1731 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1732 :
1733 REM THE FOLLOWING EXAMPLES
1734 REM DEMONSTRATE PLOTTING THE
1735 REM REFLECTIONS OF A FIGURE,
1736 REM THAT IS, FLIPPING THE FIGURE
1737 REM SIDEWAYS AND/OR ENDWAYS.
1738 :
1739 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1740 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
1741 REM" [221] FLIPPED SIDE TO SIDE. [221]
1742 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1743 :
1744 REM DRAW A SQUARE BOX 479 BY 479
1745 :
1746 : PRINT#4
1747 : PRINT#4,"FLIPPED SIDE TO SIDE:"
1748 :
1749 : PRINT#1,"D",479, 0
1750 : PRINT#1,"D",479,-479
1751 : PRINT#1,"D", 0,-479
1752 : PRINT#1,"D", 0, 0
1753 :
1754 REM SUBTRACT THE X-AXIS VALUE FROM
1755 REM THE PLOTTER BED WIDTH AND MOVE
1756 REM TO THE INITIAL POSITION.
1757 :
1758 : PRINT#1,"M",479-X(1),-Y(1)
1759 :
1760 REM PLOT THE POINTS FROM THE ARRAY
1761 REM SUBTRACTING THE X-AXIS VALUE
1762 REM FROM THE PLOTTER BED WIDTH.
1763 :
1764 : FOR I=1 TO 11
1765 : PRINT#1,"D",479-X(I),-Y(I)
1766 : NEXT
1767 :
1768 REM EJECT THE DRAWING
1769 :
1770 : PRINT#1,"M", 0,-479
1771 :
1772 REM ESTABLISH NEW HOME POSITION
1773 :
1774 : PRINT#4
1775 :
1776 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1777 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
1778 REM" [221] FLIPPED TOP TO BOTTOM. [221]
1779 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1780 :
1781 REM DRAW A SQUARE BOX 479 BY 479
1782 :
1783 : PRINT#4
1784 : PRINT#4,"FLIPPED TOP TO BOTTOM:"
1785 :
1786 : PRINT#1,"D",479, 0
1787 : PRINT#1,"D",479,-479
1788 : PRINT#1,"D", 0,-479
1789 : PRINT#1,"D", 0, 0
1790 :
1791 REM SUBTRACT THE Y-AXIS VALUE FROM
1792 REM THE PLOTTER BED HEIGHT, IN
1793 REM THIS CASE THE BOX SIZE,
1794 REM AND MOVE TO THE INITIAL POINT.
1795 :
1796 : PRINT#1,"M",X(1),-(479-Y(1))
1797 :
1798 REM PLOT THE POINTS FROM THE ARRAY
1799 REM SUBTRACTING THE Y-AXIS VALUES
1800 REM FROM THE PLOTTER BED HEIGHT.
1801 :
1802 : FOR I=1 TO 11
1803 : PRINT#1,"D",X(I),-(479-Y(I))
1804 : NEXT
1805 :
1806 REM EJECT THE DRAWING
1807 :
1808 : PRINT#1,"M", 0,-479
1809 :
1810 REM ESTABLISH NEW HOME POSITION
1811 :
1812 : PRINT#4
1813 :
1814 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1815 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
1816 REM" [221] FLIPPED BOTH SIDE TO [221]
1817 [143]" (null) SIDE AND TOP TO BOTTOM. (null)
1818 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1819 :
1820 [143] DRAW A SQUARE BOX 479 BY 479
1821 :
1822 : [152]4
1823 : [152]4,"FLIPPED SIDE TO SIDE,"
1824 : [152]4,"AND TOP TO BOTTOM:"
1825 :
1826 : [152]1,"D",479, 0
1827 : [152]1,"D",479,[171]479
1828 : [152]1,"D", 0,[171]479
1829 : [152]1,"D", 0, 0
1830 :
1831 [143] SUBTRACT THE X-AXIS AND Y-AXIS
1832 [143] POINT VALUES FROM THE PLOTTER
1833 [143] BED SIZE AND MOVE TO THE
1834 [143] INITIAL POINT.
1835 :
1836 : [152]1,"M",479[171]X(1),[171](479[171]Y(1))
1837 :
1838 [143] PLOT THE POINTS FROM THE ARRAY
1839 [143] SUBTRACTING THE X-AXIS AND
1840 [143] Y-AXIS POINT VALUES FROM THE
1841 [143] PLOTTER BED SIZE.
1842 :
1843 : [129] I[178]1 [164] 11
1844 : [152]1,"D",479[171]X(I),[171](479[171]Y(I))
1845 : [130]
1846 :
1847 [143] EJECT THE DRAWING
1848 :
1849 : [152]1,"M", 0,[171]479
1850 :
1851 [143] ESTABLISH NEW HOME POSITION
1852 :
1853 : [152]4
1854 :
1855 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1856 REM" [221] PLOT ORIENTATION [221]
1857 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1858 :
1859 REM THE FOLLOWING EXAMPLE
1860 REM DEMONSTRATES PLOTTING THE
1861 REM FIGURE AT AN ORIENTATION
1862 REM THAT IS VERTICAL RATHER
1863 REM THAN HORIZONTAL.
1864 :
1865 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1866 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
1867 REM" [221] ORIENTED VERTICALLY. [221]
1868 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1869 :
1870 REM DRAW A SQUARE BOX 479 BY 479
1871 :
1872 : PRINT#4
1873 : PRINT#4,"VERTICAL ORIENTATION:"
1874 :
1875 : PRINT#1,"D",479, 0
1876 : PRINT#1,"D",479,-479
1877 : PRINT#1,"D", 0,-479
1878 : PRINT#1,"D", 0, 0
1879 :
1880 REM USE THE X-AXIS VALUE FOR THE
1881 REM Y-AXIS AND THE Y-AXIS VALUE
1882 REM FOR THE X-AXIS AND MOVE TO
1883 REM THE INITIAL POSITION.
1884 :
1885 : PRINT#1,"M",Y(1),-X(1)
1886 :
1887 REM PLOT THE POINTS FROM THE ARRAY
1888 REM USING THE X-AXIS VALUES FOR
1889 REM THE Y-AXIS AND THE Y-AXIS
1890 REM VALUES FOR THE X-AXIS.
1891 REM NOTE:
1892 REM THIS WILL INTRODUCE A
1893 REM REFLECTION WHICH CAN BE
1894 REM ELIMINATED BY INVERTING THE
1895 REM X- OR Y-AXIS.
1896 :
1897 : FOR I=1 TO 11
1898 : PRINT#1,"D",Y(I),-X(I)
1899 : NEXT
1900 :
1901 REM EJECT THE DRAWING
1902 :
1903 : PRINT#1,"M", 0,-479
1904 :
1905 REM ESTABLISH NEW HOME POSITION
1906 :
1907 : PRINT#4
1908 :
1909 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1910 [143]" (null) PLOT SCALING (null)
1911 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1912 :
1913 [143] THE FOLLOWING EXAMPLES
1914 [143] DEMONSTRATE PLOTTING THE
1915 [143] SAME FIGURE IN DIFFERENT
1916 [143] SIZE SCALINGS.
1917 :
1918 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1919 REM"[160][221] PLOT THE GIANT LETTER [221]
1920 [143]" (null) SCALED DOWN IN SIZE (null)
1921 REM" [221] ALONG THE X-AXIS ONLY. [221]
1922 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
1923 :
1924 REM DRAW A SQUARE BOX 479 BY 479
1925 :
1926 : PRINT#4
1927 : PRINT#4,"REDUCED X-AXIS:"
1928 :
1929 : PRINT#1,"D",479, 0
1930 : PRINT#1,"D",479,-479
1931 : PRINT#1,"D", 0,-479
1932 : PRINT#1,"D", 0, 0
1933 :
1934 REM DIVIDE THE X-AXIS VALUE BY 2
1935 REM AND MOVE TO THE INITIAL
1936 REM POSITION.
1937 :
1938 : PRINT#1,"M",X(1)/2,-Y(1)
1939 :
1940 REM PLOT THE POINTS FROM THE ARRAY
1941 REM DIVIDING THE X-AXIS VALUES
1942 REM BY 2.
1943 :
1944 : FOR I=1 TO 11
1945 : PRINT#1,"D",X(I)/2,-Y(I)
1946 : NEXT
1947 :
1948 REM EJECT THE DRAWING
1949 :
1950 : PRINT#1,"M", 0,-479
1951 :
1952 REM ESTABLISH NEW HOME POSITION
1953 :
1954 : PRINT#4
1955 :
1956 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
1957 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
1958 REM" [221] SCALED DOWN IN SIZE [221]
1959 [143]" (null) ALONG THE Y-AXIS ONLY. (null)
1960 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
1961 :
1962 [143] DRAW A SQUARE BOX 479 BY 479
1963 :
1964 : [152]4
1965 : [152]4,"REDUCED Y-AXIS:"
1966 :
1967 : [152]1,"D",479, 0
1968 : [152]1,"D",479,[171]479
1969 : [152]1,"D", 0,[171]479
1970 : [152]1,"D", 0, 0
1971 :
1972 [143] DIVIDE THE Y-AXIS VALUE BY 2
1973 [143] AND MOVE TO THE INITIAL
1974 [143] POSITION.
1975 :
1976 : [152]1,"M",X(1),[171]Y(1)[173]2
1977 :
1978 [143] PLOT THE POINTS FROM THE ARRAY
1979 [143] DIVIDING THE Y-AXIS VALUES
1980 [143] BY 2.
1981 :
1982 : [129] I[178]1 [164] 11
1983 : [152]1,"D",X(I),[171]Y(I)[173]2
1984 : [130]
1985 :
1986 [143] EJECT THE DRAWING
1987 :
1988 : [152]1,"M", 0,[171]479
1989 :
1990 [143] ESTABLISH NEW HOME POSITION
1991 :
1992 : [152]4
1993 :
1994 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
1995 REM"[160][221] PLOT THE GIANT LETTER [221]
1996 [143]" (null) SCALED DOWN IN SIZE (null)
1997 REM" [221] ALONG THE X-AXIS AND [221]
1998 [143]" (null) ALONG THE Y-AXIS. (null)
1999 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
2000 :
2001 [143] DRAW A SQUARE BOX 479 BY 479
2002 :
2003 : [152]4
2004 :
2005 : [152]4
2006 : [152]4,"REDUCED X-AXIS AND"
2007 : [152]4,"REDUCED Y-AXIS:"
2008 :
2009 : [152]1,"D",479, 0
2010 : [152]1,"D",479,[171]479
2011 : [152]1,"D", 0,[171]479
2012 : [152]1,"D", 0, 0
2013 :
2014 [143] DIVIDE THE X-AXIS AND THE
2015 [143] Y-AXIS VALUES BY 2 AND MOVE
2016 [143] TO THE INITIAL POSITION.
2017 :
2018 : [152]1,"M",X(1)[173]2,[171]Y(1)[173]2
2019 :
2020 [143] PLOT THE POINTS FROM THE ARRAY
2021 [143] DIVIDING THE X-AXIS AND THE
2022 [143] Y-AXIS VALUES BY 2.
2023 :
2024 : [129] I[178]1 [164] 11
2025 : [152]1,"D",X(I)[173]2,[171]Y(I)[173]2
2026 : [130]
2027 :
2028 [143] EJECT THE DRAWING
2029 :
2030 : [152]1,"M", 0,[171]479
2031 :
2032 [143] ESTABLISH NEW HOME POSITION
2033 :
2034 : [152]4
2035 :
2036 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
2037 REM" [221] PLOT ROTATION [221]
2038 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
2039 :
2040 REM THE FOLLOWING EXAMPLES
2041 REM DEMONSTRATE PLOTTING THE
2042 REM SAME FIGURE ROTATED THROUGH
2043 REM ANY ANGLE.
2044 :
2045 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
2046 [143]"CLOSE(null) PLOT THE GIANT LETTER (null)
2047 REM" [221] ROTATED THROUGH AN [221]
2048 [143]" (null) ANGLE OF 45 DEGREES. (null)
2049 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
2050 :
2051 [143] DRAW A SQUARE BOX 479 BY 479
2052 :
2053 : [152]4
2054 : [152]4,"45 DEGREE ROTATION,"
2055 : [152]4,"WITH X-AXIS OFFSET:"
2056 :
2057 : [152]1,"D",479, 0
2058 : [152]1,"D",479,[171]479
2059 : [152]1,"D", 0,[171]479
2060 : [152]1,"D", 0, 0
2061 :
2062 [143] DEFINE THE ROTATION ANGLE
2063 [143] FUNCTIONS:
2064 :
2065 : RA[178]45 :[143] ANGLE
2066 : CF[178][255][173]180 :[143] RADIAN FACTOR
2067 : RA[178]RA[172]CF :[143] CONVERT ANGLE
2068 : SR[178][191](RA) :[143] ANGLE SINE
2069 : CR[178][190](RA) :[143] ANGLE COSINE
2070 :
2071 [143] ROTATE THE POINTS USING THE
2072 [143] FOLLOWING FORMULA:
2073 [143] XP=CR*X-SR*Y
2074 [143] YP=SR*X+CR*Y
2075 :
2076 [143] MOVE TO THE INITIAL POINT
2077 :
2078 : XP[178]CR[172]X(1)[171]SR[172]Y(1)
2079 : YP[178]SR[172]X(1)[170]CR[172]Y(1)
2080 : [152]1,"M",XP,[171]YP
2081 :
2082 [143] PLOT THE POINTS FROM THE ARRAY
2083 [143] ROTATING THE X- AND Y-AXIS
2084 [143] POINTS BY THE ROTATION ANGLE
2085 [143] NOTE:
2086 [143] ROTATION AROUND THE ORIGIN
2087 [143] WILL CAUSE MOST OF THE LETTER
2088 [143] TO MOVE OUT OF THE PLOT
2089 [143] WINDOW. THEREFORE, THE LETTER
2090 [143] WILL BE PLOTTED WITH OFFSET.
2091 [143] ADDING 240 TO THE X-AXIS
2092 [143] WILL KEEP THE LETTER WITHIN
2093 [143] VIEW.
2094 :
2095 : [129] I[178]1 [164] 11
2096 : XP[178]CR[172]X(I)[171]SR[172]Y(I)
2097 : YP[178]SR[172]X(I)[170]CR[172]Y(I)
2098 : [152]1,"D",XP[170]240,[171]YP
2099 : [130]
2100 :
2101 [143] EJECT THE DRAWING
2102 :
2103 : [152]1,"M", 0,[171]479
2104 :
2105 [143] ESTABLISH NEW HOME POSITION
2106 :
2107 : [152]4
2108 :
2109 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
2110 REM"[160][221] PLOT THE GIANT LETTER [221]
2111 [143]" (null) ROTATED AROUND ANGLES (null)
2112 REM" [221] WHICH ARE MULTIPLES OF [221]
2113 [143]" (null) 45 DEGREES, WITH (null)
2114 REM" [221] SCALING AND OFFSETS. [221]
2115 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
2116 :
2117 REM DRAW A SQUARE BOX 479 BY 479
2118 :
2119 : PRINT#4
2120 : PRINT#4,"ROTATION, SCALING AND"
2121 : PRINT#4,"X AND Y-AXIS OFFSETS:"
2122 :
2123 : PRINT#1,"D",479, 0
2124 : PRINT#1,"D",479,-479
2125 : PRINT#1,"D", 0,-479
2126 : PRINT#1,"D", 0, 0
2127 :
2128 REM DEFINE THE ROTATION ANGLE
2129 REM FUNCTIONS AND STORE THEM
2130 REM INTO AN ARRAY.
2131 :
2132 REM DEFINE ARRAYS TO HOLD FUNCTIONS
2133 :
2134 : DIM SR(8) :REM SINE ARRAY
2135 : DIM CR(8) :REM COSINE ARRAY
2136 :
2137 REM LOAD FUNCTIONS INTO ARRAYS
2138 :
2139 : CF=(null)/180 :REM RADIAN FACTOR
2140 : FOR I=1 TO 8
2141 : RA=I*45 :REM NEXT ANGLE
2142 : RA=RA*CF :REM CONVERT ANGLE
2143 : SR(I)=SIN(RA) :REM SINE
2144 : CR(I)=COS(RA) :REM COSINE
2145 : NEXT
2146 :
2147 REM DEFINE THE SCALING AND OFFSETS
2148 :
2149 : SF=.5 :REM SCALING FACTOR
2150 : XO=240 :REM X-AXIS OFFSET
2151 : YO=240 :REM Y-AXIS OFFSET
2152 :
2153 REM LOOP EIGHT TIMES, DRAWING
2154 REM A ROTATED LETTER EACH TIME.
2155 :
2156 : FOR I=1 TO 8
2157 : FOR J=1 TO 11
2158 : REM ROTATE X AND Y
2159 : XP=CR(I)*X(J)-SR(I)*Y(J)
2160 : YP=SR(I)*X(J)+CR(I)*Y(J)
2161 : REM SCALE X AND Y
2162 : XP=XP*SF
2163 : YP=YP*SF
2164 : REM OFFSET X AND Y
2165 : XP=XP+XO
2166 : YP=YP+YO
2167 : REM MOVE TO FIRST POINT
2168 : IF J>1 THEN 2171
2169 : PRINT#1,"M",XP,-YP
2170 : REM DRAW LINE OF A LETTER
2171 : PRINT#1,"D",XP,-YP
2172 : NEXT :REM J
2173 : NEXT :REM I
2174 :
2175 REM EJECT THE DRAWING
2176 :
2177 : PRINT#1,"M", 0,-479
2178 :
2179 REM ESTABLISH NEW HOME POSITION
2180 :
2181 : PRINT#4
2182 :
2183 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
2184 [143]" (null) COMBINED FUNCTIONS (null)
2185 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
2186 :
2187 [143] THE FOLLOWING EXAMPLES
2188 [143] DEMONSTRATE PLOTTING THE
2189 [143] SAME FIGURE ROTATED THROUGH
2190 [143] POINTS ON THE CIRCUMFERENCE
2191 [143] OF A CIRCLE.
2192 :
2193 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
2194 REM"[160][221] PLOT THE GIANT LETTER [221]
2195 [143]" (null) ROTATED THROUGH ANGLES (null)
2196 REM" [221] OF 45 DEGREES WHILE [221]
2197 [143]" (null) THE POINT OF ORIGIN (null)
2198 REM" [221] MOVES AROUND THE CIR- [221]
2199 [143]" (null) CUMFERENCE OF A CIRCLE. (null)
2200 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
2201 :
2202 [143] DRAW A SQUARE BOX 479 BY 479
2203 :
2204 : [152]4
2205 : [152]4,"ROTATION, SCALING,"
2206 : [152]4,"OFFSETS AND RELATIVE"
2207 : [152]4,"ORIGIN REFERENCE:"
2208 :
2209 : [152]1,"D",479, 0
2210 : [152]1,"D",479,[171]479
2211 : [152]1,"D", 0,[171]479
2212 : [152]1,"D", 0, 0
2213 :
2214 [143] DEFINE THE SCALING FACTOR AND
2215 [143] AND CIRCLE PARAMETERS.
2216 :
2217 : SF[178].25 :[143] SCALING FACTOR
2218 : CR[178]120 :[143] RADIUS OF CIRCLE
2219 : XC[178]239 :[143] X-AXIS OF CENTER
2220 : YC[178]239 :[143] Y-AXIS OF CENTER
2221 :
2222 [143] LOOP EIGHT TIMES, DRAWING
2223 [143] A ROTATED LETTER EACH TIME.
2224 [143] ROTATE THE POINTS USING THE
2225 [143] FOLLOWING FORMULA:
2226 [143] XP=CR*X-SR*Y
2227 [143] YP=SR*X+CR*Y
2228 :
2229 : [129] I[178]1 [164] 8
2230 : [143] COMPUTE POINT ON CIRCLE
2231 : XP[178]CR(I)[172]CR[170]XC
2232 : YP[178]SR(I)[172]CR[170]YC
2233 : [143] MOVE TO CIRCLE POINT
2234 : [143] AND ESTABLISH A RELATIVE
2235 : [143] ORIGIN OF REFERENCE.
2236 : [152]1,"M",XP,[171]YP
2237 : [152]1,"I"
2238 : [129] J[178]1 [164] 11
2239 : [143] ROTATE X AND Y
2240 : XP[178]CR(I)[172]X(J)[171]SR(I)[172]Y(J)
2241 : YP[178]SR(I)[172]X(J)[170]CR(I)[172]Y(J)
2242 : [143] SCALE X AND Y
2243 : XP[178]XP[172]SF
2244 : YP[178]YP[172]SF
2245 : [143] DRAW LINE OF A LETTER
2246 : [143] USING THE "J" COMMAND,
2247 : [143] REFERENCING THE
2248 : [143] RELATIVE ORIGIN (THE
2249 : [143] POINT ON THE CIRCLE).
2250 : [152]1,"J",XP,[171]YP
2251 : [130] :[143] J
2252 : [130] :[143] I
2253 :
2254 [143] EJECT THE DRAWING
2255 :
2256 : [152]1,"M", 0,[171]479
2257 :
2258 [143] ESTABLISH NEW HOME POSITION
2259 :
2260 : [152]4
2261 :
2262 [143]" (null)TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANRIGHT$
2263 REM" [221] RESETTING THE PLOTTER [221]
2264 [143]" MID$TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTAN(null)
2265 :
2266 REM THE PLOTTER CAN BE RESET AT
2267 REM ANY TIME BY PRINTING A BLANK
2268 REM LINE THROUGH PORT 7 USING
2269 REM FILE NUMER #7. THE POWER ON
2270 REM CYCLE WILL THEN TAKE PLACE.
2271 REM ALL PARAMETERS WILL BE RESET
2272 REM TO THEIR DEFAULT VALUES AND
2273 REM THE POWER ON TEST PATTERN
2274 REM WILL BE DRAWN.
2275 :
2276 : PRINT#4
2277 : PRINT#4,"RESETTING PLOTTER..."
2278 : PRINT#7
2279 :
2280 REM" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]
2281 [143]"CLOSE(null) CLOSING PLOTTER FILES (null)
2282 REM" [202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]
2283 :
2284 : [129] I[178]1 [164] 7
2285 : [160] I
2286 : [130] I
2287 : [160] 44
2288 :
2289 : [128]