Home » CEEFAX disks » telesoftware5.adl » Rotate

Rotate

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware5.adl
Filename: Rotate
Read OK:
File size: 0DF1 bytes
Load address: 0800
Exec address: 802B
File contents
   10REM
   20REM
   30REM
   40MODE7
   50PRINT"Line or solid ? (L/S)";
   60REPEAT QW$=CHR$(GETAND&DF)
   70UNTILINSTR("LS",QW$)>0:MODE1
   80IF QW$="S" VDU19,7,4;0;
   90VDU23;8202;0;0;0;
  100numverts%=19
  110numfaces%=17
  120DIM col%(numfaces%)
  130DIM pnt(2, 19)
  140DIM face%(numfaces%,3)
  150DIM scr_pts%(1,numverts%)
  160DIM ck%(numfaces%)
  170DIM pnts%(numfaces%)
  180cpos=COS(.2):spos=SIN(.2)
  190cneg=COS(-0.2):sneg=SIN(-0.2)
  200D%=2000
  210E%=1
  220Distance%=500
  230PROCRead_data
  240REPEAT
  250TIME=0
  260IF INKEY-73 PROCRotate_X(cpos,spos):E%=1
  270IF INKEY-105 PROCRotate_X(cneg,sneg):E%=1
  280IF INKEY-98 PROCRotate_Y(cneg,sneg):E%=1
  290IF INKEY-67 PROCRotate_Y(cpos,spos):E%=1
  300IF INKEY-17 PROCRotate_Z(cpos,spos):E%=1
  310IF INKEY-34 PROCRotate_Z(cneg,sneg):E%=1
  320IF INKEY-99 PROCTranslate(-50):E%=1
  330IF INKEY-74 PROCTranslate(50):E%=1
  340IF E%=1 PROCChange:PROCCheck_face:PROCWhich_face:PRINTTAB(0,0);TIME/100
  350E%=0:*FX15,1
  360UNTILFALSE
  370DATA -30, 0, -100
  380DATA 30, 0, -100
  390DATA 60, 0, 65
  400DATA -60, 0, 65
  410DATA -25, 8, 100
  420DATA 25, 8, 100
  430DATA 0, 25, 50
  440DATA -25, -8, 100
  450DATA 25, -8, 100
  460DATA 0, -25, 50
  470DATA -20, -8, -55
  480DATA -18, -10, -40
  490DATA 18, -10, -40
  500DATA 20, -8, -55
  510DATA -35, 10, 40
  520DATA -30, 6, -30
  530DATA -25, 14, 25
  540DATA 25, 14, 25
  550DATA 30, 6, -30
  560DATA 35, 10, 40
  570DATA 3, 6, 1, 2
  580DATA 3, 0, 1, 6
  590DATA 3, 3, 0, 6
  600DATA 3, 3, 6, 4
  610DATA 3, 4, 6, 5
  620DATA 3, 5, 6, 2
  630DATA 3, 9, 0, 3
  640DATA 3, 1, 0, 9
  650DATA 3, 2, 1, 9
  660DATA 3, 2, 9, 8
  670DATA 3, 8, 9, 7
  680DATA 3, 7, 9, 3
  690DATA 3, 5, 2, 8
  700DATA 4, 5, 8, 7, 4
  710DATA 3, 4, 7, 3
  720DATA 4, 10, 11, 12, 13
  730DATA 3, 14, 15, 16
  740DATA 3, 17, 18, 19
  750DATA -1, -1, -1, -1, -1, -1, -1, -1, -1
  760DATA -1, -1, -1, -1, 1, -1, 2, 2, 2
  770DEFPROCRead_data
  780FORVertex% = 0 TO 19
  790READ pnt(0, Vertex%), pnt(1, Vertex%), pnt(2, Vertex%)
  800NEXT
  810FORFace% = 0 TO numfaces%
  820READ pnts%(Face%)
  830FORPnt_num% = 0 TO pnts%(Face%)-1
  840READ face%(Face%, Pnt_num%)
  850NEXT:NEXT
  860FORFace% = 0 TO numfaces%
  870READ col%(Face%):NEXT
  880ENDPROC
  890DEFPROCRotate_X(C, S)
  900FORVertex% = 0 TO numverts%
  910Z=pnt(2,Vertex%):Y=pnt(1,Vertex%)
  920pnt(1,Vertex%)=Y*C-Z*S
  930pnt(2,Vertex%)=Y*S+Z*C
  940NEXT:ENDPROC
  950DEFPROCRotate_Y(C, S)
  960FORVertex% = 0 TO numverts%
  970Z=pnt(2,Vertex%):X=pnt(0,Vertex%)
  980pnt(0,Vertex%)=X*C-Z*S
  990pnt(2,Vertex%)=X*S+Z*C
 1000NEXT:ENDPROC
 1010DEFPROCRotate_Z(C, S)
 1020FORVertex% = 0 TO numverts%
 1030Y=pnt(1,Vertex%):X=pnt(0,Vertex%)
 1040pnt(0,Vertex%)=X*C-Y*S
 1050pnt(1,Vertex%)=X*S+Y*C
 1060NEXT:ENDPROC
 1070DEFPROCTranslate(T%)
 1080FORVertex% = 0 TO numverts%
 1090pnt(2,Vertex%)=pnt(2,Vertex%)+T%
 1100NEXT:ENDPROC
 1110DEFPROCChange
 1120FORVertex% = 0 TO numverts%
 1130A%=pnt(0,Vertex%)
 1140B%=pnt(1,Vertex%)
 1150C%=pnt(2,Vertex%)-Distance%
 1160scr_pts%(0, Vertex%)=D%*A%/C%
 1170scr_pts%(1, Vertex%)=D%*B%/C%
 1180NEXT:ENDPROC
 1190DEFPROCCheck_face
 1200FORF%=0 TO numfaces%
 1210VX0%=face%(F%, 0)
 1220VX1%=face%(F%, 1)
 1230VX2%=face%(F%, 2)
 1240AX%=scr_pts%(0, VX0%)-scr_pts%(0, VX1%)
 1250AY%=scr_pts%(1, VX0%)-scr_pts%(1, VX1%)
 1260BX%=scr_pts%(0, VX2%)-scr_pts%(0, VX1%)
 1270BY%=scr_pts%(1, VX2%)-scr_pts%(1, VX1%)
 1280NZ%=AX%*BY%-AY%*BX%
 1290IF NZ%>=0 ck%(F%)=1 ELSE ck%(F%)=0
 1300NEXT:ENDPROC
 1310DEFPROCWhich_face:CLS
 1320FORFace% = 0 TO numfaces%
 1330IF ck%(Face%) PROCDraw_face
 1340NEXT:ENDPROC
 1350DEFPROCDraw_face
 1360IFQW$="S" PROCSolid_face:GCOL0,0 ELSE GCOL0,7
 1370K%=scr_pts%(0, face%(Face%, 0))+640
 1380M%=scr_pts%(1, face%(Face%, 0))+512
 1390MOVE K%, M%
 1400FORS%=1 TO pnts%(Face%)-1
 1410DRAW scr_pts%(0, face%(Face%, S%))+640,scr_pts%(1, face%(Face%, S%))+512
 1420NEXT:DRAW K%,M%:ENDPROC
 1430DEFPROCSolid_face
 1440IF col%(Face%)>-1 GCOL 0, col%(Face%) ELSE GCOL 0,7
 1450MOVE scr_pts%(0, face%(Face%, 0))+640,scr_pts%(1, face%(Face%, 0))+512
 1460DRAW scr_pts%(0, face%(Face%, 1))+640,scr_pts%(1, face%(Face%, 1))+512
 1470PLOT 85,scr_pts%(0, face%(Face%, 2))+640,scr_pts%(1, face%(Face%, 2))+512
 1480IF pnts%(Face%) = 3 ENDPROC
 1490DRAW scr_pts%(0, face%(Face%, 0))+640,scr_pts%(1, face%(Face%, 0))+512
 1500PLOT 85,scr_pts%(0, face%(Face%, 3))+640,scr_pts%(1, face%(Face%, 3))+512
 1510ENDPROC

�
�
�
(�7
2�"Line or solid ? (L/S)";
<� QW$=�(��&DF)
F��"LS",QW$)>0:�1
P� QW$="S" �19,7,4;0;
Z�23;8202;0;0;0;
dnumverts%=19
nnumfaces%=17
x� col%(numfaces%)
�� pnt(2, 19)
�� face%(numfaces%,3)
�� scr_pts%(1,numverts%)
�� ck%(numfaces%)
�� pnts%(numfaces%)
�cpos=�(.2):spos=�(.2)
�cneg=�(-0.2):sneg=�(-0.2)
�D%=2000
�E%=1
�Distance%=500
��Read_data
��
��=0
$� �-73 �Rotate_X(cpos,spos):E%=1
%� �-105 �Rotate_X(cneg,sneg):E%=1
$� �-98 �Rotate_Y(cneg,sneg):E%=1
"$� �-67 �Rotate_Y(cpos,spos):E%=1
,$� �-17 �Rotate_Z(cpos,spos):E%=1
6$� �-34 �Rotate_Z(cneg,sneg):E%=1
@� �-99 �Translate(-50):E%=1
J� �-74 �Translate(50):E%=1
T7� E%=1 �Change:�Check_face:�Which_face:�0,0);�/100
^E%=0:*FX15,1
h��
r� -30, 0, -100
|� 30, 0, -100
�� 60, 0, 65
�� -60, 0, 65
�� -25, 8, 100
�� 25, 8, 100
�� 0, 25, 50
�� -25, -8, 100
�� 25, -8, 100
�� 0, -25, 50
�� -20, -8, -55
�� -18, -10, -40
�� 18, -10, -40
�� 20, -8, -55
�� -35, 10, 40
� -30, 6, -30
� -25, 14, 25
� 25, 14, 25
&� 30, 6, -30
0� 35, 10, 40
:� 3, 6, 1, 2
D� 3, 0, 1, 6
N� 3, 3, 0, 6
X� 3, 3, 6, 4
b� 3, 4, 6, 5
l� 3, 5, 6, 2
v� 3, 9, 0, 3
�� 3, 1, 0, 9
�� 3, 2, 1, 9
�� 3, 2, 9, 8
�� 3, 8, 9, 7
�� 3, 7, 9, 3
�� 3, 5, 2, 8
�� 4, 5, 8, 7, 4
�� 3, 4, 7, 3
�� 4, 10, 11, 12, 13
�� 3, 14, 15, 16
�� 3, 17, 18, 19
�(� -1, -1, -1, -1, -1, -1, -1, -1, -1
�$� -1, -1, -1, -1, 1, -1, 2, 2, 2
��Read_data
�Vertex% = 0 � 19
7� pnt(0, Vertex%), pnt(1, Vertex%), pnt(2, Vertex%)
 �
*�Face% = 0 � numfaces%
4� pnts%(Face%)
>"�Pnt_num% = 0 � pnts%(Face%)-1
H� face%(Face%, Pnt_num%)
R�:�
\�Face% = 0 � numfaces%
f� col%(Face%):�
p�
z��Rotate_X(C, S)
��Vertex% = 0 � numverts%
�%Z=pnt(2,Vertex%):Y=pnt(1,Vertex%)
�pnt(1,Vertex%)=Y*C-Z*S
�pnt(2,Vertex%)=Y*S+Z*C
��:�
���Rotate_Y(C, S)
��Vertex% = 0 � numverts%
�%Z=pnt(2,Vertex%):X=pnt(0,Vertex%)
�pnt(0,Vertex%)=X*C-Z*S
�pnt(2,Vertex%)=X*S+Z*C
��:�
���Rotate_Z(C, S)
��Vertex% = 0 � numverts%
%Y=pnt(1,Vertex%):X=pnt(0,Vertex%)
pnt(0,Vertex%)=X*C-Y*S
pnt(1,Vertex%)=X*S+Y*C
$�:�
.��Translate(T%)
8�Vertex% = 0 � numverts%
B$pnt(2,Vertex%)=pnt(2,Vertex%)+T%
L�:�
V��Change
`�Vertex% = 0 � numverts%
jA%=pnt(0,Vertex%)
tB%=pnt(1,Vertex%)
~C%=pnt(2,Vertex%)-Distance%
�!scr_pts%(0, Vertex%)=D%*A%/C%
�!scr_pts%(1, Vertex%)=D%*B%/C%
��:�
���Check_face
��F%=0 � numfaces%
�VX0%=face%(F%, 0)
�VX1%=face%(F%, 1)
�VX2%=face%(F%, 2)
�+AX%=scr_pts%(0, VX0%)-scr_pts%(0, VX1%)
�+AY%=scr_pts%(1, VX0%)-scr_pts%(1, VX1%)
�+BX%=scr_pts%(0, VX2%)-scr_pts%(0, VX1%)
�+BY%=scr_pts%(1, VX2%)-scr_pts%(1, VX1%)
NZ%=AX%*BY%-AY%*BX%

"� NZ%>=0 ck%(F%)=1 � ck%(F%)=0
�:�
��Which_face:�
(�Face% = 0 � numfaces%
2� ck%(Face%) �Draw_face
<�:�
F��Draw_face
P$�QW$="S" �Solid_face:�0,0 � �0,7
Z'K%=scr_pts%(0, face%(Face%, 0))+640
d'M%=scr_pts%(1, face%(Face%, 0))+512
n� K%, M%
x�S%=1 � pnts%(Face%)-1
�I� scr_pts%(0, face%(Face%, S%))+640,scr_pts%(1, face%(Face%, S%))+512
��:� K%,M%:�
���Solid_face
�-� col%(Face%)>-1 � 0, col%(Face%) � � 0,7
�G� scr_pts%(0, face%(Face%, 0))+640,scr_pts%(1, face%(Face%, 0))+512
�G� scr_pts%(0, face%(Face%, 1))+640,scr_pts%(1, face%(Face%, 1))+512
�J� 85,scr_pts%(0, face%(Face%, 2))+640,scr_pts%(1, face%(Face%, 2))+512
�� pnts%(Face%) = 3 �
�G� scr_pts%(0, face%(Face%, 0))+640,scr_pts%(1, face%(Face%, 0))+512
�J� 85,scr_pts%(0, face%(Face%, 3))+640,scr_pts%(1, face%(Face%, 3))+512
��
�
00000000  0d 00 0a 05 f4 0d 00 14  05 f4 0d 00 1e 05 f4 0d  |................|
00000010  00 28 06 eb 37 0d 00 32  1d f1 22 4c 69 6e 65 20  |.(..7..2.."Line |
00000020  6f 72 20 73 6f 6c 69 64  20 3f 20 28 4c 2f 53 29  |or solid ? (L/S)|
00000030  22 3b 0d 00 3c 12 f5 20  51 57 24 3d bd 28 a5 80  |";..<.. QW$=.(..|
00000040  26 44 46 29 0d 00 46 14  fd a7 22 4c 53 22 2c 51  |&DF)..F..."LS",Q|
00000050  57 24 29 3e 30 3a eb 31  0d 00 50 18 e7 20 51 57  |W$)>0:.1..P.. QW|
00000060  24 3d 22 53 22 20 ef 31  39 2c 37 2c 34 3b 30 3b  |$="S" .19,7,4;0;|
00000070  0d 00 5a 13 ef 32 33 3b  38 32 30 32 3b 30 3b 30  |..Z..23;8202;0;0|
00000080  3b 30 3b 0d 00 64 10 6e  75 6d 76 65 72 74 73 25  |;0;..d.numverts%|
00000090  3d 31 39 0d 00 6e 10 6e  75 6d 66 61 63 65 73 25  |=19..n.numfaces%|
000000a0  3d 31 37 0d 00 78 15 de  20 63 6f 6c 25 28 6e 75  |=17..x.. col%(nu|
000000b0  6d 66 61 63 65 73 25 29  0d 00 82 10 de 20 70 6e  |mfaces%)..... pn|
000000c0  74 28 32 2c 20 31 39 29  0d 00 8c 18 de 20 66 61  |t(2, 19)..... fa|
000000d0  63 65 25 28 6e 75 6d 66  61 63 65 73 25 2c 33 29  |ce%(numfaces%,3)|
000000e0  0d 00 96 1b de 20 73 63  72 5f 70 74 73 25 28 31  |..... scr_pts%(1|
000000f0  2c 6e 75 6d 76 65 72 74  73 25 29 0d 00 a0 14 de  |,numverts%).....|
00000100  20 63 6b 25 28 6e 75 6d  66 61 63 65 73 25 29 0d  | ck%(numfaces%).|
00000110  00 aa 16 de 20 70 6e 74  73 25 28 6e 75 6d 66 61  |.... pnts%(numfa|
00000120  63 65 73 25 29 0d 00 b4  19 63 70 6f 73 3d 9b 28  |ces%)....cpos=.(|
00000130  2e 32 29 3a 73 70 6f 73  3d b5 28 2e 32 29 0d 00  |.2):spos=.(.2)..|
00000140  be 1d 63 6e 65 67 3d 9b  28 2d 30 2e 32 29 3a 73  |..cneg=.(-0.2):s|
00000150  6e 65 67 3d b5 28 2d 30  2e 32 29 0d 00 c8 0b 44  |neg=.(-0.2)....D|
00000160  25 3d 32 30 30 30 0d 00  d2 08 45 25 3d 31 0d 00  |%=2000....E%=1..|
00000170  dc 11 44 69 73 74 61 6e  63 65 25 3d 35 30 30 0d  |..Distance%=500.|
00000180  00 e6 0e f2 52 65 61 64  5f 64 61 74 61 0d 00 f0  |....Read_data...|
00000190  05 f5 0d 00 fa 07 d1 3d  30 0d 01 04 24 e7 20 a6  |.......=0...$. .|
000001a0  2d 37 33 20 f2 52 6f 74  61 74 65 5f 58 28 63 70  |-73 .Rotate_X(cp|
000001b0  6f 73 2c 73 70 6f 73 29  3a 45 25 3d 31 0d 01 0e  |os,spos):E%=1...|
000001c0  25 e7 20 a6 2d 31 30 35  20 f2 52 6f 74 61 74 65  |%. .-105 .Rotate|
000001d0  5f 58 28 63 6e 65 67 2c  73 6e 65 67 29 3a 45 25  |_X(cneg,sneg):E%|
000001e0  3d 31 0d 01 18 24 e7 20  a6 2d 39 38 20 f2 52 6f  |=1...$. .-98 .Ro|
000001f0  74 61 74 65 5f 59 28 63  6e 65 67 2c 73 6e 65 67  |tate_Y(cneg,sneg|
00000200  29 3a 45 25 3d 31 0d 01  22 24 e7 20 a6 2d 36 37  |):E%=1.."$. .-67|
00000210  20 f2 52 6f 74 61 74 65  5f 59 28 63 70 6f 73 2c  | .Rotate_Y(cpos,|
00000220  73 70 6f 73 29 3a 45 25  3d 31 0d 01 2c 24 e7 20  |spos):E%=1..,$. |
00000230  a6 2d 31 37 20 f2 52 6f  74 61 74 65 5f 5a 28 63  |.-17 .Rotate_Z(c|
00000240  70 6f 73 2c 73 70 6f 73  29 3a 45 25 3d 31 0d 01  |pos,spos):E%=1..|
00000250  36 24 e7 20 a6 2d 33 34  20 f2 52 6f 74 61 74 65  |6$. .-34 .Rotate|
00000260  5f 5a 28 63 6e 65 67 2c  73 6e 65 67 29 3a 45 25  |_Z(cneg,sneg):E%|
00000270  3d 31 0d 01 40 1f e7 20  a6 2d 39 39 20 f2 54 72  |=1..@.. .-99 .Tr|
00000280  61 6e 73 6c 61 74 65 28  2d 35 30 29 3a 45 25 3d  |anslate(-50):E%=|
00000290  31 0d 01 4a 1e e7 20 a6  2d 37 34 20 f2 54 72 61  |1..J.. .-74 .Tra|
000002a0  6e 73 6c 61 74 65 28 35  30 29 3a 45 25 3d 31 0d  |nslate(50):E%=1.|
000002b0  01 54 37 e7 20 45 25 3d  31 20 f2 43 68 61 6e 67  |.T7. E%=1 .Chang|
000002c0  65 3a f2 43 68 65 63 6b  5f 66 61 63 65 3a f2 57  |e:.Check_face:.W|
000002d0  68 69 63 68 5f 66 61 63  65 3a f1 8a 30 2c 30 29  |hich_face:..0,0)|
000002e0  3b 91 2f 31 30 30 0d 01  5e 10 45 25 3d 30 3a 2a  |;./100..^.E%=0:*|
000002f0  46 58 31 35 2c 31 0d 01  68 06 fd a3 0d 01 72 12  |FX15,1..h.....r.|
00000300  dc 20 2d 33 30 2c 20 30  2c 20 2d 31 30 30 0d 01  |. -30, 0, -100..|
00000310  7c 11 dc 20 33 30 2c 20  30 2c 20 2d 31 30 30 0d  ||.. 30, 0, -100.|
00000320  01 86 0f dc 20 36 30 2c  20 30 2c 20 36 35 0d 01  |.... 60, 0, 65..|
00000330  90 10 dc 20 2d 36 30 2c  20 30 2c 20 36 35 0d 01  |... -60, 0, 65..|
00000340  9a 11 dc 20 2d 32 35 2c  20 38 2c 20 31 30 30 0d  |... -25, 8, 100.|
00000350  01 a4 10 dc 20 32 35 2c  20 38 2c 20 31 30 30 0d  |.... 25, 8, 100.|
00000360  01 ae 0f dc 20 30 2c 20  32 35 2c 20 35 30 0d 01  |.... 0, 25, 50..|
00000370  b8 12 dc 20 2d 32 35 2c  20 2d 38 2c 20 31 30 30  |... -25, -8, 100|
00000380  0d 01 c2 11 dc 20 32 35  2c 20 2d 38 2c 20 31 30  |..... 25, -8, 10|
00000390  30 0d 01 cc 10 dc 20 30  2c 20 2d 32 35 2c 20 35  |0..... 0, -25, 5|
000003a0  30 0d 01 d6 12 dc 20 2d  32 30 2c 20 2d 38 2c 20  |0..... -20, -8, |
000003b0  2d 35 35 0d 01 e0 13 dc  20 2d 31 38 2c 20 2d 31  |-55..... -18, -1|
000003c0  30 2c 20 2d 34 30 0d 01  ea 12 dc 20 31 38 2c 20  |0, -40..... 18, |
000003d0  2d 31 30 2c 20 2d 34 30  0d 01 f4 11 dc 20 32 30  |-10, -40..... 20|
000003e0  2c 20 2d 38 2c 20 2d 35  35 0d 01 fe 11 dc 20 2d  |, -8, -55..... -|
000003f0  33 35 2c 20 31 30 2c 20  34 30 0d 02 08 11 dc 20  |35, 10, 40..... |
00000400  2d 33 30 2c 20 36 2c 20  2d 33 30 0d 02 12 11 dc  |-30, 6, -30.....|
00000410  20 2d 32 35 2c 20 31 34  2c 20 32 35 0d 02 1c 10  | -25, 14, 25....|
00000420  dc 20 32 35 2c 20 31 34  2c 20 32 35 0d 02 26 10  |. 25, 14, 25..&.|
00000430  dc 20 33 30 2c 20 36 2c  20 2d 33 30 0d 02 30 10  |. 30, 6, -30..0.|
00000440  dc 20 33 35 2c 20 31 30  2c 20 34 30 0d 02 3a 10  |. 35, 10, 40..:.|
00000450  dc 20 33 2c 20 36 2c 20  31 2c 20 32 0d 02 44 10  |. 3, 6, 1, 2..D.|
00000460  dc 20 33 2c 20 30 2c 20  31 2c 20 36 0d 02 4e 10  |. 3, 0, 1, 6..N.|
00000470  dc 20 33 2c 20 33 2c 20  30 2c 20 36 0d 02 58 10  |. 3, 3, 0, 6..X.|
00000480  dc 20 33 2c 20 33 2c 20  36 2c 20 34 0d 02 62 10  |. 3, 3, 6, 4..b.|
00000490  dc 20 33 2c 20 34 2c 20  36 2c 20 35 0d 02 6c 10  |. 3, 4, 6, 5..l.|
000004a0  dc 20 33 2c 20 35 2c 20  36 2c 20 32 0d 02 76 10  |. 3, 5, 6, 2..v.|
000004b0  dc 20 33 2c 20 39 2c 20  30 2c 20 33 0d 02 80 10  |. 3, 9, 0, 3....|
000004c0  dc 20 33 2c 20 31 2c 20  30 2c 20 39 0d 02 8a 10  |. 3, 1, 0, 9....|
000004d0  dc 20 33 2c 20 32 2c 20  31 2c 20 39 0d 02 94 10  |. 3, 2, 1, 9....|
000004e0  dc 20 33 2c 20 32 2c 20  39 2c 20 38 0d 02 9e 10  |. 3, 2, 9, 8....|
000004f0  dc 20 33 2c 20 38 2c 20  39 2c 20 37 0d 02 a8 10  |. 3, 8, 9, 7....|
00000500  dc 20 33 2c 20 37 2c 20  39 2c 20 33 0d 02 b2 10  |. 3, 7, 9, 3....|
00000510  dc 20 33 2c 20 35 2c 20  32 2c 20 38 0d 02 bc 13  |. 3, 5, 2, 8....|
00000520  dc 20 34 2c 20 35 2c 20  38 2c 20 37 2c 20 34 0d  |. 4, 5, 8, 7, 4.|
00000530  02 c6 10 dc 20 33 2c 20  34 2c 20 37 2c 20 33 0d  |.... 3, 4, 7, 3.|
00000540  02 d0 17 dc 20 34 2c 20  31 30 2c 20 31 31 2c 20  |.... 4, 10, 11, |
00000550  31 32 2c 20 31 33 0d 02  da 13 dc 20 33 2c 20 31  |12, 13..... 3, 1|
00000560  34 2c 20 31 35 2c 20 31  36 0d 02 e4 13 dc 20 33  |4, 15, 16..... 3|
00000570  2c 20 31 37 2c 20 31 38  2c 20 31 39 0d 02 ee 28  |, 17, 18, 19...(|
00000580  dc 20 2d 31 2c 20 2d 31  2c 20 2d 31 2c 20 2d 31  |. -1, -1, -1, -1|
00000590  2c 20 2d 31 2c 20 2d 31  2c 20 2d 31 2c 20 2d 31  |, -1, -1, -1, -1|
000005a0  2c 20 2d 31 0d 02 f8 24  dc 20 2d 31 2c 20 2d 31  |, -1...$. -1, -1|
000005b0  2c 20 2d 31 2c 20 2d 31  2c 20 31 2c 20 2d 31 2c  |, -1, -1, 1, -1,|
000005c0  20 32 2c 20 32 2c 20 32  0d 03 02 0f dd f2 52 65  | 2, 2, 2......Re|
000005d0  61 64 5f 64 61 74 61 0d  03 0c 15 e3 56 65 72 74  |ad_data.....Vert|
000005e0  65 78 25 20 3d 20 30 20  b8 20 31 39 0d 03 16 37  |ex% = 0 . 19...7|
000005f0  f3 20 70 6e 74 28 30 2c  20 56 65 72 74 65 78 25  |. pnt(0, Vertex%|
00000600  29 2c 20 70 6e 74 28 31  2c 20 56 65 72 74 65 78  |), pnt(1, Vertex|
00000610  25 29 2c 20 70 6e 74 28  32 2c 20 56 65 72 74 65  |%), pnt(2, Verte|
00000620  78 25 29 0d 03 20 05 ed  0d 03 2a 1a e3 46 61 63  |x%).. ....*..Fac|
00000630  65 25 20 3d 20 30 20 b8  20 6e 75 6d 66 61 63 65  |e% = 0 . numface|
00000640  73 25 0d 03 34 12 f3 20  70 6e 74 73 25 28 46 61  |s%..4.. pnts%(Fa|
00000650  63 65 25 29 0d 03 3e 22  e3 50 6e 74 5f 6e 75 6d  |ce%)..>".Pnt_num|
00000660  25 20 3d 20 30 20 b8 20  70 6e 74 73 25 28 46 61  |% = 0 . pnts%(Fa|
00000670  63 65 25 29 2d 31 0d 03  48 1c f3 20 66 61 63 65  |ce%)-1..H.. face|
00000680  25 28 46 61 63 65 25 2c  20 50 6e 74 5f 6e 75 6d  |%(Face%, Pnt_num|
00000690  25 29 0d 03 52 07 ed 3a  ed 0d 03 5c 1a e3 46 61  |%)..R..:...\..Fa|
000006a0  63 65 25 20 3d 20 30 20  b8 20 6e 75 6d 66 61 63  |ce% = 0 . numfac|
000006b0  65 73 25 0d 03 66 13 f3  20 63 6f 6c 25 28 46 61  |es%..f.. col%(Fa|
000006c0  63 65 25 29 3a ed 0d 03  70 05 e1 0d 03 7a 14 dd  |ce%):...p....z..|
000006d0  f2 52 6f 74 61 74 65 5f  58 28 43 2c 20 53 29 0d  |.Rotate_X(C, S).|
000006e0  03 84 1c e3 56 65 72 74  65 78 25 20 3d 20 30 20  |....Vertex% = 0 |
000006f0  b8 20 6e 75 6d 76 65 72  74 73 25 0d 03 8e 25 5a  |. numverts%...%Z|
00000700  3d 70 6e 74 28 32 2c 56  65 72 74 65 78 25 29 3a  |=pnt(2,Vertex%):|
00000710  59 3d 70 6e 74 28 31 2c  56 65 72 74 65 78 25 29  |Y=pnt(1,Vertex%)|
00000720  0d 03 98 1a 70 6e 74 28  31 2c 56 65 72 74 65 78  |....pnt(1,Vertex|
00000730  25 29 3d 59 2a 43 2d 5a  2a 53 0d 03 a2 1a 70 6e  |%)=Y*C-Z*S....pn|
00000740  74 28 32 2c 56 65 72 74  65 78 25 29 3d 59 2a 53  |t(2,Vertex%)=Y*S|
00000750  2b 5a 2a 43 0d 03 ac 07  ed 3a e1 0d 03 b6 14 dd  |+Z*C.....:......|
00000760  f2 52 6f 74 61 74 65 5f  59 28 43 2c 20 53 29 0d  |.Rotate_Y(C, S).|
00000770  03 c0 1c e3 56 65 72 74  65 78 25 20 3d 20 30 20  |....Vertex% = 0 |
00000780  b8 20 6e 75 6d 76 65 72  74 73 25 0d 03 ca 25 5a  |. numverts%...%Z|
00000790  3d 70 6e 74 28 32 2c 56  65 72 74 65 78 25 29 3a  |=pnt(2,Vertex%):|
000007a0  58 3d 70 6e 74 28 30 2c  56 65 72 74 65 78 25 29  |X=pnt(0,Vertex%)|
000007b0  0d 03 d4 1a 70 6e 74 28  30 2c 56 65 72 74 65 78  |....pnt(0,Vertex|
000007c0  25 29 3d 58 2a 43 2d 5a  2a 53 0d 03 de 1a 70 6e  |%)=X*C-Z*S....pn|
000007d0  74 28 32 2c 56 65 72 74  65 78 25 29 3d 58 2a 53  |t(2,Vertex%)=X*S|
000007e0  2b 5a 2a 43 0d 03 e8 07  ed 3a e1 0d 03 f2 14 dd  |+Z*C.....:......|
000007f0  f2 52 6f 74 61 74 65 5f  5a 28 43 2c 20 53 29 0d  |.Rotate_Z(C, S).|
00000800  03 fc 1c e3 56 65 72 74  65 78 25 20 3d 20 30 20  |....Vertex% = 0 |
00000810  b8 20 6e 75 6d 76 65 72  74 73 25 0d 04 06 25 59  |. numverts%...%Y|
00000820  3d 70 6e 74 28 31 2c 56  65 72 74 65 78 25 29 3a  |=pnt(1,Vertex%):|
00000830  58 3d 70 6e 74 28 30 2c  56 65 72 74 65 78 25 29  |X=pnt(0,Vertex%)|
00000840  0d 04 10 1a 70 6e 74 28  30 2c 56 65 72 74 65 78  |....pnt(0,Vertex|
00000850  25 29 3d 58 2a 43 2d 59  2a 53 0d 04 1a 1a 70 6e  |%)=X*C-Y*S....pn|
00000860  74 28 31 2c 56 65 72 74  65 78 25 29 3d 58 2a 53  |t(1,Vertex%)=X*S|
00000870  2b 59 2a 43 0d 04 24 07  ed 3a e1 0d 04 2e 13 dd  |+Y*C..$..:......|
00000880  f2 54 72 61 6e 73 6c 61  74 65 28 54 25 29 0d 04  |.Translate(T%)..|
00000890  38 1c e3 56 65 72 74 65  78 25 20 3d 20 30 20 b8  |8..Vertex% = 0 .|
000008a0  20 6e 75 6d 76 65 72 74  73 25 0d 04 42 24 70 6e  | numverts%..B$pn|
000008b0  74 28 32 2c 56 65 72 74  65 78 25 29 3d 70 6e 74  |t(2,Vertex%)=pnt|
000008c0  28 32 2c 56 65 72 74 65  78 25 29 2b 54 25 0d 04  |(2,Vertex%)+T%..|
000008d0  4c 07 ed 3a e1 0d 04 56  0c dd f2 43 68 61 6e 67  |L..:...V...Chang|
000008e0  65 0d 04 60 1c e3 56 65  72 74 65 78 25 20 3d 20  |e..`..Vertex% = |
000008f0  30 20 b8 20 6e 75 6d 76  65 72 74 73 25 0d 04 6a  |0 . numverts%..j|
00000900  15 41 25 3d 70 6e 74 28  30 2c 56 65 72 74 65 78  |.A%=pnt(0,Vertex|
00000910  25 29 0d 04 74 15 42 25  3d 70 6e 74 28 31 2c 56  |%)..t.B%=pnt(1,V|
00000920  65 72 74 65 78 25 29 0d  04 7e 1f 43 25 3d 70 6e  |ertex%)..~.C%=pn|
00000930  74 28 32 2c 56 65 72 74  65 78 25 29 2d 44 69 73  |t(2,Vertex%)-Dis|
00000940  74 61 6e 63 65 25 0d 04  88 21 73 63 72 5f 70 74  |tance%...!scr_pt|
00000950  73 25 28 30 2c 20 56 65  72 74 65 78 25 29 3d 44  |s%(0, Vertex%)=D|
00000960  25 2a 41 25 2f 43 25 0d  04 92 21 73 63 72 5f 70  |%*A%/C%...!scr_p|
00000970  74 73 25 28 31 2c 20 56  65 72 74 65 78 25 29 3d  |ts%(1, Vertex%)=|
00000980  44 25 2a 42 25 2f 43 25  0d 04 9c 07 ed 3a e1 0d  |D%*B%/C%.....:..|
00000990  04 a6 10 dd f2 43 68 65  63 6b 5f 66 61 63 65 0d  |.....Check_face.|
000009a0  04 b0 15 e3 46 25 3d 30  20 b8 20 6e 75 6d 66 61  |....F%=0 . numfa|
000009b0  63 65 73 25 0d 04 ba 15  56 58 30 25 3d 66 61 63  |ces%....VX0%=fac|
000009c0  65 25 28 46 25 2c 20 30  29 0d 04 c4 15 56 58 31  |e%(F%, 0)....VX1|
000009d0  25 3d 66 61 63 65 25 28  46 25 2c 20 31 29 0d 04  |%=face%(F%, 1)..|
000009e0  ce 15 56 58 32 25 3d 66  61 63 65 25 28 46 25 2c  |..VX2%=face%(F%,|
000009f0  20 32 29 0d 04 d8 2b 41  58 25 3d 73 63 72 5f 70  | 2)...+AX%=scr_p|
00000a00  74 73 25 28 30 2c 20 56  58 30 25 29 2d 73 63 72  |ts%(0, VX0%)-scr|
00000a10  5f 70 74 73 25 28 30 2c  20 56 58 31 25 29 0d 04  |_pts%(0, VX1%)..|
00000a20  e2 2b 41 59 25 3d 73 63  72 5f 70 74 73 25 28 31  |.+AY%=scr_pts%(1|
00000a30  2c 20 56 58 30 25 29 2d  73 63 72 5f 70 74 73 25  |, VX0%)-scr_pts%|
00000a40  28 31 2c 20 56 58 31 25  29 0d 04 ec 2b 42 58 25  |(1, VX1%)...+BX%|
00000a50  3d 73 63 72 5f 70 74 73  25 28 30 2c 20 56 58 32  |=scr_pts%(0, VX2|
00000a60  25 29 2d 73 63 72 5f 70  74 73 25 28 30 2c 20 56  |%)-scr_pts%(0, V|
00000a70  58 31 25 29 0d 04 f6 2b  42 59 25 3d 73 63 72 5f  |X1%)...+BY%=scr_|
00000a80  70 74 73 25 28 31 2c 20  56 58 32 25 29 2d 73 63  |pts%(1, VX2%)-sc|
00000a90  72 5f 70 74 73 25 28 31  2c 20 56 58 31 25 29 0d  |r_pts%(1, VX1%).|
00000aa0  05 00 17 4e 5a 25 3d 41  58 25 2a 42 59 25 2d 41  |...NZ%=AX%*BY%-A|
00000ab0  59 25 2a 42 58 25 0d 05  0a 22 e7 20 4e 5a 25 3e  |Y%*BX%...". NZ%>|
00000ac0  3d 30 20 63 6b 25 28 46  25 29 3d 31 20 8b 20 63  |=0 ck%(F%)=1 . c|
00000ad0  6b 25 28 46 25 29 3d 30  0d 05 14 07 ed 3a e1 0d  |k%(F%)=0.....:..|
00000ae0  05 1e 12 dd f2 57 68 69  63 68 5f 66 61 63 65 3a  |.....Which_face:|
00000af0  db 0d 05 28 1a e3 46 61  63 65 25 20 3d 20 30 20  |...(..Face% = 0 |
00000b00  b8 20 6e 75 6d 66 61 63  65 73 25 0d 05 32 1b e7  |. numfaces%..2..|
00000b10  20 63 6b 25 28 46 61 63  65 25 29 20 f2 44 72 61  | ck%(Face%) .Dra|
00000b20  77 5f 66 61 63 65 0d 05  3c 07 ed 3a e1 0d 05 46  |w_face..<..:...F|
00000b30  0f dd f2 44 72 61 77 5f  66 61 63 65 0d 05 50 24  |...Draw_face..P$|
00000b40  e7 51 57 24 3d 22 53 22  20 f2 53 6f 6c 69 64 5f  |.QW$="S" .Solid_|
00000b50  66 61 63 65 3a e6 30 2c  30 20 8b 20 e6 30 2c 37  |face:.0,0 . .0,7|
00000b60  0d 05 5a 27 4b 25 3d 73  63 72 5f 70 74 73 25 28  |..Z'K%=scr_pts%(|
00000b70  30 2c 20 66 61 63 65 25  28 46 61 63 65 25 2c 20  |0, face%(Face%, |
00000b80  30 29 29 2b 36 34 30 0d  05 64 27 4d 25 3d 73 63  |0))+640..d'M%=sc|
00000b90  72 5f 70 74 73 25 28 31  2c 20 66 61 63 65 25 28  |r_pts%(1, face%(|
00000ba0  46 61 63 65 25 2c 20 30  29 29 2b 35 31 32 0d 05  |Face%, 0))+512..|
00000bb0  6e 0c ec 20 4b 25 2c 20  4d 25 0d 05 78 1a e3 53  |n.. K%, M%..x..S|
00000bc0  25 3d 31 20 b8 20 70 6e  74 73 25 28 46 61 63 65  |%=1 . pnts%(Face|
00000bd0  25 29 2d 31 0d 05 82 49  df 20 73 63 72 5f 70 74  |%)-1...I. scr_pt|
00000be0  73 25 28 30 2c 20 66 61  63 65 25 28 46 61 63 65  |s%(0, face%(Face|
00000bf0  25 2c 20 53 25 29 29 2b  36 34 30 2c 73 63 72 5f  |%, S%))+640,scr_|
00000c00  70 74 73 25 28 31 2c 20  66 61 63 65 25 28 46 61  |pts%(1, face%(Fa|
00000c10  63 65 25 2c 20 53 25 29  29 2b 35 31 32 0d 05 8c  |ce%, S%))+512...|
00000c20  0f ed 3a df 20 4b 25 2c  4d 25 3a e1 0d 05 96 10  |..:. K%,M%:.....|
00000c30  dd f2 53 6f 6c 69 64 5f  66 61 63 65 0d 05 a0 2d  |..Solid_face...-|
00000c40  e7 20 63 6f 6c 25 28 46  61 63 65 25 29 3e 2d 31  |. col%(Face%)>-1|
00000c50  20 e6 20 30 2c 20 63 6f  6c 25 28 46 61 63 65 25  | . 0, col%(Face%|
00000c60  29 20 8b 20 e6 20 30 2c  37 0d 05 aa 47 ec 20 73  |) . . 0,7...G. s|
00000c70  63 72 5f 70 74 73 25 28  30 2c 20 66 61 63 65 25  |cr_pts%(0, face%|
00000c80  28 46 61 63 65 25 2c 20  30 29 29 2b 36 34 30 2c  |(Face%, 0))+640,|
00000c90  73 63 72 5f 70 74 73 25  28 31 2c 20 66 61 63 65  |scr_pts%(1, face|
00000ca0  25 28 46 61 63 65 25 2c  20 30 29 29 2b 35 31 32  |%(Face%, 0))+512|
00000cb0  0d 05 b4 47 df 20 73 63  72 5f 70 74 73 25 28 30  |...G. scr_pts%(0|
00000cc0  2c 20 66 61 63 65 25 28  46 61 63 65 25 2c 20 31  |, face%(Face%, 1|
00000cd0  29 29 2b 36 34 30 2c 73  63 72 5f 70 74 73 25 28  |))+640,scr_pts%(|
00000ce0  31 2c 20 66 61 63 65 25  28 46 61 63 65 25 2c 20  |1, face%(Face%, |
00000cf0  31 29 29 2b 35 31 32 0d  05 be 4a f0 20 38 35 2c  |1))+512...J. 85,|
00000d00  73 63 72 5f 70 74 73 25  28 30 2c 20 66 61 63 65  |scr_pts%(0, face|
00000d10  25 28 46 61 63 65 25 2c  20 32 29 29 2b 36 34 30  |%(Face%, 2))+640|
00000d20  2c 73 63 72 5f 70 74 73  25 28 31 2c 20 66 61 63  |,scr_pts%(1, fac|
00000d30  65 25 28 46 61 63 65 25  2c 20 32 29 29 2b 35 31  |e%(Face%, 2))+51|
00000d40  32 0d 05 c8 18 e7 20 70  6e 74 73 25 28 46 61 63  |2..... pnts%(Fac|
00000d50  65 25 29 20 3d 20 33 20  e1 0d 05 d2 47 df 20 73  |e%) = 3 ....G. s|
00000d60  63 72 5f 70 74 73 25 28  30 2c 20 66 61 63 65 25  |cr_pts%(0, face%|
00000d70  28 46 61 63 65 25 2c 20  30 29 29 2b 36 34 30 2c  |(Face%, 0))+640,|
00000d80  73 63 72 5f 70 74 73 25  28 31 2c 20 66 61 63 65  |scr_pts%(1, face|
00000d90  25 28 46 61 63 65 25 2c  20 30 29 29 2b 35 31 32  |%(Face%, 0))+512|
00000da0  0d 05 dc 4a f0 20 38 35  2c 73 63 72 5f 70 74 73  |...J. 85,scr_pts|
00000db0  25 28 30 2c 20 66 61 63  65 25 28 46 61 63 65 25  |%(0, face%(Face%|
00000dc0  2c 20 33 29 29 2b 36 34  30 2c 73 63 72 5f 70 74  |, 3))+640,scr_pt|
00000dd0  73 25 28 31 2c 20 66 61  63 65 25 28 46 61 63 65  |s%(1, face%(Face|
00000de0  25 2c 20 33 29 29 2b 35  31 32 0d 05 e6 05 e1 0d  |%, 3))+512......|
00000df0  ff                                                |.|
00000df1
Rotate.m0
Rotate.m1
Rotate.m2
Rotate.m4
Rotate.m5