Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199607.adf » Regulars » StarInfo/Geleit/4CUBES
StarInfo/Geleit/4CUBES
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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199607.adf » Regulars |
Filename: | StarInfo/Geleit/4CUBES |
Read OK: | ✔ |
File size: | 0CDF bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM hypercubes program 20REM (c) R Geleit Jan 1995 30REM feel free to use/sell this code in your own programs 40 50REM pitch/roll with mouse 60REM move forwards=menu; backwards=adjust 70 80ONERROR IFINKEY-1 RUN:ELSEMODE0:PRINTREPORT$;" in ";ERL;:MOUSE STEP 4:END 90 100MODE12 110MODE9 120 130OFF 140MOUSE OFF 150MOUSE RECTANGLE &8000,&8000,&FFFF,&FFFF 160MOUSE STEP 1 170PROCpallette 180ORIGIN 640,512 190 200N%=1:REM number of hypercubes 210 220ES%=2000:REM eye to screen in os units 230EO%=2200:REM eye to origin in os units 240 250PROCread 260PROCMakeCubes 270 280T=0 290 300p%=0 310r%=0:REM to calculate deltap;deltar 320 330a%=1 340b%=2 350 360REPEAT 370 380MOUSE x%,y%,m% 390P%=p%-y% 400R%=x%-r% 410p%=y% 420r%=x% 430 440C=COSRADP% 450S=SINRADP% 460C2=C*C 470S2=S*S 480SC=S*C 490 500c=COSRADR% 510s=SINRADR% 520c2=c*c 530s2=s*s 540sc=s*c 550i=c2+s*s2 560j=s2*c-sc 570k=s2+s*c2 580 590T+=(m%AND1)-((m%AND2)>>1)+(T/2)*(m%=0) 600 610FORn%=1TON% 620 630W=W(n%) 640X=X(n%) 650Y=Y(n%) 660Z=Z(n%) 670 680PROCtransform(W,X,Y,Z) 690 700W+=T 710X+=T 720Y+=T 730Z+=T 740 750W(n%)=W 760X(n%)=X 770Y(n%)=Y 780Z(n%)=Z 790 800M=W+X+Y+Z 810WX=W-X 820YZ=Y-Z 830 840FORA%=0TO15 850 860w=w(n%,A%):x=x(n%,A%):y=y(n%,A%):z=z(n%,A%) 870PROCtransform(w,x,y,z) 880w(n%,A%)=w:x(n%,A%)=x:y(n%,A%)=y:z(n%,A%)=z 890 900B=2*ES%/(EO%+w+x+y+z+M) 910X%(A%)=B*(w-x+WX) 920Y%(A%)=B*(y-z+YZ) 930C%(A%)=32-((w+x+y+z)>>3) 940 950NEXT 960 970FORA%=0TO7 980B%=A%+8 990PROCcol(A%,B%) 1000MOVEX%(A%),Y%(A%) 1010DRAWX%(B%),Y%(B%) 1020NEXT 1030FORA%=0TO8 STEP8 1040FORB%=0TO3 1050C%=A%+B% 1060D%=C%+4 1070PROCcol(C%,D%) 1080MOVEX%(C%),Y%(C%) 1090DRAWX%(D%),Y%(D%) 1100NEXT 1110NEXT 1120FORA%=0TO12 STEP4 1130FORB%=0TO3 1140C%=A%+B% 1150D%=A%+((B%+1)AND3) 1160PROCcol(C%,D%) 1170MOVEX%(C%),Y%(C%) 1180DRAWX%(D%),Y%(D%) 1190NEXT 1200NEXT 1210 1220NEXT 1230 1240SYS6,19 1250SYS6,112,a% 1260SYS6,113,b% 1270CLS 1280SWAP a%,b% 1290 1300UNTIL TRUE=FALSE 1310 1320DEFPROCcol(A%,B%) 1330LOCALC% 1340C%=(C%(A%)+C%(B%))>>1 1350C%=C%>>2 1360GCOL0,C% 1370ENDPROC 1380 1390DEFPROCtransform(RETURN W,RETURN X,RETURN Y,RETURN Z) 1400LOCALw,x,y,z 1410 1420w=(W-X+Y-Z)/2 1430x=(-W+X+Y-Z)/2 1440y=(-X-W+Y+Z)/2 1450z=(X+W+Y+Z)/2 1460 1470W=i*w+j*x+sc*y 1480X=sc*w+c2*x-s*y 1490Y=j*w+k*x+c2*y 1500Z=z 1510 1520w=(W-X-Y+Z)/2 1530x=(-W+X-Y+Z)/2 1540y=(X+W+Y+Z)/2 1550z=(-X-W+Y+Z)/2 1560 1570W=C2*w-S2*x+SC*(y-z) 1580X=-S2*w+C2*x+SC*(y-z) 1590Y=-SC*(x+w)+C2*y+S2*z 1600Z=SC*(x+w)+S2*y+C2*z 1610 1620ENDPROC 1630 1640DEFPROCMakeCubes 1650LOCALn%,A%,R,P,w,x,y,z,M 1660DIMW(N%),X(N%),Y(N%),Z(N%) 1670FORn%=1TON% 1680W(n%)=100-RND(200) 1690X(n%)=100-RND(200) 1700Y(n%)=100-RND(200) 1710Z(n%)=100-RND(200) 1720R=(RND(1)*PI*2) 1730P=(RND(1)*PI*2) 1740C=COSP 1750S=SINP 1760C2=C*C 1770S2=S*S 1780SC=S*C 1790c=COSR 1800s=SINR 1810c2=c*c 1820s2=s*s 1830sc=s*c 1840i=c2+s*s2 1850j=s2*c-sc 1860k=s2+s*c2 1870M=RND(1)+1 1880FORA%=0TO15 1890w=w(n%,A%)*M:x=x(n%,A%)*M:y=y(n%,A%)*M:z=z(n%,A%)*M 1900PROCtransform(w,x,y,z):REM initial rotation 1910w(n%,A%)=w:x(n%,A%)=x:y(n%,A%)=y:z(n%,A%)=z 1920NEXT 1930NEXT 1940ENDPROC 1950 1960DEFPROCpallette 1970LOCALC%,T% 1980FORC%=0TO15 1990T%=(C%<<4)+C% 2000COLOURC%,T%,T%,T% 2010NEXT 2020ENDPROC 2030 2040DEFPROCread 2050LOCALT%,n% 2060DIM w(N%,15),x(N%,15),y(N%,15),z(N%,15) 2070DIM X%(15),Y%(15):REM for post perspective transformation 2080DIM C%(15):REM colour 2090FORn%=1TON% 2100RESTORE 2110FOR T%=0TO15 2120READ w(n%,T%),x(n%,T%),y(n%,T%),z(n%,T%) 2130NEXT 2140NEXT 2150ENDPROC 2160 2170DATA -50,-50,-50,-50 2180DATA -50,-50,-50,+50 2190DATA -50,-50,+50,+50 2200DATA -50,-50,+50,-50 2210 2220DATA -50,+50,-50,-50 2230DATA -50,+50,-50,+50 2240DATA -50,+50,+50,+50 2250DATA -50,+50,+50,-50 2260 2270DATA +50,-50,-50,-50 2280DATA +50,-50,-50,+50 2290DATA +50,-50,+50,+50 2300DATA +50,-50,+50,-50 2310 2320DATA +50,+50,-50,-50 2330DATA +50,+50,-50,+50 2340DATA +50,+50,+50,+50 2350DATA +50,+50,+50,-50 2360
� hypercubes program � (c) R Geleit Jan 1995 :� feel free to use/sell this code in your own programs ( 2� pitch/roll with mouse <*� move forwards=menu; backwards=adjust F P(� �-1 �:��0:�$;" in ";�;:ȗ � 4:� Z d�12 n�9 x �� �ȗ � �!ȗ ȓ &8000,&8000,&FFFF,&FFFF � ȗ � 1 � �pallette �ȑ 640,512 � �N%=1:� number of hypercubes � �(ES%=2000:� eye to screen in os units �(EO%=2200:� eye to origin in os units � � �read �MakeCubes T=0 " ,p%=0 6%r%=0:� to calculate deltap;deltar @ Ja%=1 Tb%=2 ^ h� r |ȗ x%,y%,m% �P%=p%-y% �R%=x%-r% � p%=y% � r%=x% � � C=��P% � S=��P% � C2=C*C � S2=S*S � SC=S*C � � c=��R% � s=��R% c2=c*c s2=s*s sc=s*c & i=c2+s*s2 0 j=s2*c-sc : k=s2+s*c2 D N&T+=(m%�1)-((m%�2)>>1)+(T/2)*(m%=0) X b�n%=1�N% l vW=W(n%) �X=X(n%) �Y=Y(n%) �Z=Z(n%) � ��transform(W,X,Y,Z) � �W+=T �X+=T �Y+=T �Z+=T � �W(n%)=W �X(n%)=X Y(n%)=Y Z(n%)=Z M=W+X+Y+Z * WX=W-X 4 YZ=Y-Z > H�A%=0�15 R \/w=w(n%,A%):x=x(n%,A%):y=y(n%,A%):z=z(n%,A%) f�transform(w,x,y,z) p/w(n%,A%)=w:x(n%,A%)=x:y(n%,A%)=y:z(n%,A%)=z z �B=2*ES%/(EO%+w+x+y+z+M) �X%(A%)=B*(w-x+WX) �Y%(A%)=B*(y-z+YZ) �C%(A%)=32-((w+x+y+z)>>3) � �� � ��A%=0�7 �B%=A%+8 ��col(A%,B%) ��X%(A%),Y%(A%) ��X%(B%),Y%(B%) �� �A%=0�8 �8 �B%=0�3 C%=A%+B% $D%=C%+4 .�col(C%,D%) 8�X%(C%),Y%(C%) B�X%(D%),Y%(D%) L� V� `�A%=0�12 �4 j�B%=0�3 tC%=A%+B% ~D%=A%+((B%+1)�3) ��col(C%,D%) ��X%(C%),Y%(C%) ��X%(D%),Y%(D%) �� �� � �� � � ș6,19 �ș6,112,a% �ș6,113,b% �� Ȕ a%,b% � �=� (��col(A%,B%) 2�C% <C%=(C%(A%)+C%(B%))>>1 FC%=C%>>2 P �0,C% Z� d n ��transform(� W,� X,� Y,� Z) x�w,x,y,z � �w=(W-X+Y-Z)/2 �x=(-W+X+Y-Z)/2 �y=(-X-W+Y+Z)/2 �z=(X+W+Y+Z)/2 � �W=i*w+j*x+sc*y �X=sc*w+c2*x-s*y �Y=j*w+k*x+c2*y �Z=z � �w=(W-X-Y+Z)/2 �x=(-W+X-Y+Z)/2 y=(X+W+Y+Z)/2 z=(-X-W+Y+Z)/2 "W=C2*w-S2*x+SC*(y-z) ,X=-S2*w+C2*x+SC*(y-z) 6Y=-SC*(x+w)+C2*y+S2*z @Z=SC*(x+w)+S2*y+C2*z J T� ^ h��MakeCubes r�n%,A%,R,P,w,x,y,z,M |�W(N%),X(N%),Y(N%),Z(N%) ��n%=1�N% �W(n%)=100-�(200) �X(n%)=100-�(200) �Y(n%)=100-�(200) �Z(n%)=100-�(200) �R=(�(1)*�*2) �P=(�(1)*�*2) �C=�P �S=�P � C2=C*C � S2=S*S � SC=S*C �c=�R s=�R c2=c*c s2=s*s & sc=s*c 0 i=c2+s*s2 : j=s2*c-sc D k=s2+s*c2 NM=�(1)+1 X�A%=0�15 b7w=w(n%,A%)*M:x=x(n%,A%)*M:y=y(n%,A%)*M:z=z(n%,A%)*M l*�transform(w,x,y,z):� initial rotation v/w(n%,A%)=w:x(n%,A%)=x:y(n%,A%)=y:z(n%,A%)=z �� �� �� � ���pallette � �C%,T% ��C%=0�15 �T%=(C%<<4)+C% ��C%,T%,T%,T% �� �� � � ��read �T%,n% )� w(N%,15),x(N%,15),y(N%,15),z(N%,15) 9� X%(15),Y%(15):� for post perspective transformation � C%(15):� colour *�n%=1�N% 4� > � T%=0�15 H)� w(n%,T%),x(n%,T%),y(n%,T%),z(n%,T%) R� \� f� p z� -50,-50,-50,-50 �� -50,-50,-50,+50 �� -50,-50,+50,+50 �� -50,-50,+50,-50 � �� -50,+50,-50,-50 �� -50,+50,-50,+50 �� -50,+50,+50,+50 �� -50,+50,+50,-50 � �� +50,-50,-50,-50 �� +50,-50,-50,+50 �� +50,-50,+50,+50 �� +50,-50,+50,-50 � +50,+50,-50,-50 � +50,+50,-50,+50 $� +50,+50,+50,+50 .� +50,+50,+50,-50 8 �
00000000 0d 00 0a 18 f4 20 68 79 70 65 72 63 75 62 65 73 |..... hypercubes| 00000010 20 70 72 6f 67 72 61 6d 0d 00 14 1b f4 20 28 63 | program..... (c| 00000020 29 20 52 20 47 65 6c 65 69 74 20 4a 61 6e 20 31 |) R Geleit Jan 1| 00000030 39 39 35 0d 00 1e 3a f4 20 66 65 65 6c 20 66 72 |995...:. feel fr| 00000040 65 65 20 74 6f 20 75 73 65 2f 73 65 6c 6c 20 74 |ee to use/sell t| 00000050 68 69 73 20 63 6f 64 65 20 69 6e 20 79 6f 75 72 |his code in your| 00000060 20 6f 77 6e 20 70 72 6f 67 72 61 6d 73 0d 00 28 | own programs..(| 00000070 04 0d 00 32 1b f4 20 70 69 74 63 68 2f 72 6f 6c |...2.. pitch/rol| 00000080 6c 20 77 69 74 68 20 6d 6f 75 73 65 0d 00 3c 2a |l with mouse..<*| 00000090 f4 20 6d 6f 76 65 20 66 6f 72 77 61 72 64 73 3d |. move forwards=| 000000a0 6d 65 6e 75 3b 20 62 61 63 6b 77 61 72 64 73 3d |menu; backwards=| 000000b0 61 64 6a 75 73 74 0d 00 46 04 0d 00 50 28 ee 85 |adjust..F...P(..| 000000c0 20 e7 a6 2d 31 20 f9 3a 8b eb 30 3a f1 f6 24 3b | ..-1 .:..0:..$;| 000000d0 22 20 69 6e 20 22 3b 9e 3b 3a c8 97 20 88 20 34 |" in ";.;:.. . 4| 000000e0 3a e0 0d 00 5a 04 0d 00 64 07 eb 31 32 0d 00 6e |:...Z...d..12..n| 000000f0 06 eb 39 0d 00 78 04 0d 00 82 05 87 0d 00 8c 08 |..9..x..........| 00000100 c8 97 20 87 0d 00 96 21 c8 97 20 c8 93 20 26 38 |.. ....!.. .. &8| 00000110 30 30 30 2c 26 38 30 30 30 2c 26 46 46 46 46 2c |000,&8000,&FFFF,| 00000120 26 46 46 46 46 0d 00 a0 0a c8 97 20 88 20 31 0d |&FFFF...... . 1.| 00000130 00 aa 0d f2 70 61 6c 6c 65 74 74 65 0d 00 b4 0e |....pallette....| 00000140 c8 91 20 36 34 30 2c 35 31 32 0d 00 be 04 0d 00 |.. 640,512......| 00000150 c8 1f 4e 25 3d 31 3a f4 20 6e 75 6d 62 65 72 20 |..N%=1:. number | 00000160 6f 66 20 68 79 70 65 72 63 75 62 65 73 0d 00 d2 |of hypercubes...| 00000170 04 0d 00 dc 28 45 53 25 3d 32 30 30 30 3a f4 20 |....(ES%=2000:. | 00000180 65 79 65 20 74 6f 20 73 63 72 65 65 6e 20 69 6e |eye to screen in| 00000190 20 6f 73 20 75 6e 69 74 73 0d 00 e6 28 45 4f 25 | os units...(EO%| 000001a0 3d 32 32 30 30 3a f4 20 65 79 65 20 74 6f 20 6f |=2200:. eye to o| 000001b0 72 69 67 69 6e 20 69 6e 20 6f 73 20 75 6e 69 74 |rigin in os unit| 000001c0 73 0d 00 f0 04 0d 00 fa 09 f2 72 65 61 64 0d 01 |s.........read..| 000001d0 04 0e f2 4d 61 6b 65 43 75 62 65 73 0d 01 0e 04 |...MakeCubes....| 000001e0 0d 01 18 07 54 3d 30 0d 01 22 04 0d 01 2c 08 70 |....T=0.."...,.p| 000001f0 25 3d 30 0d 01 36 25 72 25 3d 30 3a f4 20 74 6f |%=0..6%r%=0:. to| 00000200 20 63 61 6c 63 75 6c 61 74 65 20 64 65 6c 74 61 | calculate delta| 00000210 70 3b 64 65 6c 74 61 72 0d 01 40 04 0d 01 4a 08 |p;deltar..@...J.| 00000220 61 25 3d 31 0d 01 54 08 62 25 3d 32 0d 01 5e 04 |a%=1..T.b%=2..^.| 00000230 0d 01 68 05 f5 0d 01 72 04 0d 01 7c 0f c8 97 20 |..h....r...|... | 00000240 78 25 2c 79 25 2c 6d 25 0d 01 86 0c 50 25 3d 70 |x%,y%,m%....P%=p| 00000250 25 2d 79 25 0d 01 90 0c 52 25 3d 78 25 2d 72 25 |%-y%....R%=x%-r%| 00000260 0d 01 9a 09 70 25 3d 79 25 0d 01 a4 09 72 25 3d |....p%=y%....r%=| 00000270 78 25 0d 01 ae 04 0d 01 b8 0a 43 3d 9b b2 50 25 |x%........C=..P%| 00000280 0d 01 c2 0a 53 3d b5 b2 50 25 0d 01 cc 0a 43 32 |....S=..P%....C2| 00000290 3d 43 2a 43 0d 01 d6 0a 53 32 3d 53 2a 53 0d 01 |=C*C....S2=S*S..| 000002a0 e0 0a 53 43 3d 53 2a 43 0d 01 ea 04 0d 01 f4 0a |..SC=S*C........| 000002b0 63 3d 9b b2 52 25 0d 01 fe 0a 73 3d b5 b2 52 25 |c=..R%....s=..R%| 000002c0 0d 02 08 0a 63 32 3d 63 2a 63 0d 02 12 0a 73 32 |....c2=c*c....s2| 000002d0 3d 73 2a 73 0d 02 1c 0a 73 63 3d 73 2a 63 0d 02 |=s*s....sc=s*c..| 000002e0 26 0d 69 3d 63 32 2b 73 2a 73 32 0d 02 30 0d 6a |&.i=c2+s*s2..0.j| 000002f0 3d 73 32 2a 63 2d 73 63 0d 02 3a 0d 6b 3d 73 32 |=s2*c-sc..:.k=s2| 00000300 2b 73 2a 63 32 0d 02 44 04 0d 02 4e 26 54 2b 3d |+s*c2..D...N&T+=| 00000310 28 6d 25 80 31 29 2d 28 28 6d 25 80 32 29 3e 3e |(m%.1)-((m%.2)>>| 00000320 31 29 2b 28 54 2f 32 29 2a 28 6d 25 3d 30 29 0d |1)+(T/2)*(m%=0).| 00000330 02 58 04 0d 02 62 0c e3 6e 25 3d 31 b8 4e 25 0d |.X...b..n%=1.N%.| 00000340 02 6c 04 0d 02 76 0b 57 3d 57 28 6e 25 29 0d 02 |.l...v.W=W(n%)..| 00000350 80 0b 58 3d 58 28 6e 25 29 0d 02 8a 0b 59 3d 59 |..X=X(n%)....Y=Y| 00000360 28 6e 25 29 0d 02 94 0b 5a 3d 5a 28 6e 25 29 0d |(n%)....Z=Z(n%).| 00000370 02 9e 04 0d 02 a8 17 f2 74 72 61 6e 73 66 6f 72 |........transfor| 00000380 6d 28 57 2c 58 2c 59 2c 5a 29 0d 02 b2 04 0d 02 |m(W,X,Y,Z)......| 00000390 bc 08 57 2b 3d 54 0d 02 c6 08 58 2b 3d 54 0d 02 |..W+=T....X+=T..| 000003a0 d0 08 59 2b 3d 54 0d 02 da 08 5a 2b 3d 54 0d 02 |..Y+=T....Z+=T..| 000003b0 e4 04 0d 02 ee 0b 57 28 6e 25 29 3d 57 0d 02 f8 |......W(n%)=W...| 000003c0 0b 58 28 6e 25 29 3d 58 0d 03 02 0b 59 28 6e 25 |.X(n%)=X....Y(n%| 000003d0 29 3d 59 0d 03 0c 0b 5a 28 6e 25 29 3d 5a 0d 03 |)=Y....Z(n%)=Z..| 000003e0 16 04 0d 03 20 0d 4d 3d 57 2b 58 2b 59 2b 5a 0d |.... .M=W+X+Y+Z.| 000003f0 03 2a 0a 57 58 3d 57 2d 58 0d 03 34 0a 59 5a 3d |.*.WX=W-X..4.YZ=| 00000400 59 2d 5a 0d 03 3e 04 0d 03 48 0c e3 41 25 3d 30 |Y-Z..>...H..A%=0| 00000410 b8 31 35 0d 03 52 04 0d 03 5c 2f 77 3d 77 28 6e |.15..R...\/w=w(n| 00000420 25 2c 41 25 29 3a 78 3d 78 28 6e 25 2c 41 25 29 |%,A%):x=x(n%,A%)| 00000430 3a 79 3d 79 28 6e 25 2c 41 25 29 3a 7a 3d 7a 28 |:y=y(n%,A%):z=z(| 00000440 6e 25 2c 41 25 29 0d 03 66 17 f2 74 72 61 6e 73 |n%,A%)..f..trans| 00000450 66 6f 72 6d 28 77 2c 78 2c 79 2c 7a 29 0d 03 70 |form(w,x,y,z)..p| 00000460 2f 77 28 6e 25 2c 41 25 29 3d 77 3a 78 28 6e 25 |/w(n%,A%)=w:x(n%| 00000470 2c 41 25 29 3d 78 3a 79 28 6e 25 2c 41 25 29 3d |,A%)=x:y(n%,A%)=| 00000480 79 3a 7a 28 6e 25 2c 41 25 29 3d 7a 0d 03 7a 04 |y:z(n%,A%)=z..z.| 00000490 0d 03 84 1b 42 3d 32 2a 45 53 25 2f 28 45 4f 25 |....B=2*ES%/(EO%| 000004a0 2b 77 2b 78 2b 79 2b 7a 2b 4d 29 0d 03 8e 15 58 |+w+x+y+z+M)....X| 000004b0 25 28 41 25 29 3d 42 2a 28 77 2d 78 2b 57 58 29 |%(A%)=B*(w-x+WX)| 000004c0 0d 03 98 15 59 25 28 41 25 29 3d 42 2a 28 79 2d |....Y%(A%)=B*(y-| 000004d0 7a 2b 59 5a 29 0d 03 a2 1c 43 25 28 41 25 29 3d |z+YZ)....C%(A%)=| 000004e0 33 32 2d 28 28 77 2b 78 2b 79 2b 7a 29 3e 3e 33 |32-((w+x+y+z)>>3| 000004f0 29 0d 03 ac 04 0d 03 b6 05 ed 0d 03 c0 04 0d 03 |)...............| 00000500 ca 0b e3 41 25 3d 30 b8 37 0d 03 d4 0b 42 25 3d |...A%=0.7....B%=| 00000510 41 25 2b 38 0d 03 de 0f f2 63 6f 6c 28 41 25 2c |A%+8.....col(A%,| 00000520 42 25 29 0d 03 e8 12 ec 58 25 28 41 25 29 2c 59 |B%).....X%(A%),Y| 00000530 25 28 41 25 29 0d 03 f2 12 df 58 25 28 42 25 29 |%(A%).....X%(B%)| 00000540 2c 59 25 28 42 25 29 0d 03 fc 05 ed 0d 04 06 0e |,Y%(B%).........| 00000550 e3 41 25 3d 30 b8 38 20 88 38 0d 04 10 0b e3 42 |.A%=0.8 .8.....B| 00000560 25 3d 30 b8 33 0d 04 1a 0c 43 25 3d 41 25 2b 42 |%=0.3....C%=A%+B| 00000570 25 0d 04 24 0b 44 25 3d 43 25 2b 34 0d 04 2e 0f |%..$.D%=C%+4....| 00000580 f2 63 6f 6c 28 43 25 2c 44 25 29 0d 04 38 12 ec |.col(C%,D%)..8..| 00000590 58 25 28 43 25 29 2c 59 25 28 43 25 29 0d 04 42 |X%(C%),Y%(C%)..B| 000005a0 12 df 58 25 28 44 25 29 2c 59 25 28 44 25 29 0d |..X%(D%),Y%(D%).| 000005b0 04 4c 05 ed 0d 04 56 05 ed 0d 04 60 0f e3 41 25 |.L....V....`..A%| 000005c0 3d 30 b8 31 32 20 88 34 0d 04 6a 0b e3 42 25 3d |=0.12 .4..j..B%=| 000005d0 30 b8 33 0d 04 74 0c 43 25 3d 41 25 2b 42 25 0d |0.3..t.C%=A%+B%.| 000005e0 04 7e 14 44 25 3d 41 25 2b 28 28 42 25 2b 31 29 |.~.D%=A%+((B%+1)| 000005f0 80 33 29 0d 04 88 0f f2 63 6f 6c 28 43 25 2c 44 |.3).....col(C%,D| 00000600 25 29 0d 04 92 12 ec 58 25 28 43 25 29 2c 59 25 |%).....X%(C%),Y%| 00000610 28 43 25 29 0d 04 9c 12 df 58 25 28 44 25 29 2c |(C%).....X%(D%),| 00000620 59 25 28 44 25 29 0d 04 a6 05 ed 0d 04 b0 05 ed |Y%(D%)..........| 00000630 0d 04 ba 04 0d 04 c4 05 ed 0d 04 ce 04 0d 04 d8 |................| 00000640 0a c8 99 36 2c 31 39 0d 04 e2 0e c8 99 36 2c 31 |...6,19......6,1| 00000650 31 32 2c 61 25 0d 04 ec 0e c8 99 36 2c 31 31 33 |12,a%......6,113| 00000660 2c 62 25 0d 04 f6 05 db 0d 05 00 0c c8 94 20 61 |,b%........... a| 00000670 25 2c 62 25 0d 05 0a 04 0d 05 14 09 fd 20 b9 3d |%,b%......... .=| 00000680 a3 0d 05 1e 04 0d 05 28 10 dd f2 63 6f 6c 28 41 |.......(...col(A| 00000690 25 2c 42 25 29 0d 05 32 07 ea 43 25 0d 05 3c 19 |%,B%)..2..C%..<.| 000006a0 43 25 3d 28 43 25 28 41 25 29 2b 43 25 28 42 25 |C%=(C%(A%)+C%(B%| 000006b0 29 29 3e 3e 31 0d 05 46 0c 43 25 3d 43 25 3e 3e |))>>1..F.C%=C%>>| 000006c0 32 0d 05 50 09 e6 30 2c 43 25 0d 05 5a 05 e1 0d |2..P..0,C%..Z...| 000006d0 05 64 04 0d 05 6e 20 dd f2 74 72 61 6e 73 66 6f |.d...n ..transfo| 000006e0 72 6d 28 f8 20 57 2c f8 20 58 2c f8 20 59 2c f8 |rm(. W,. X,. Y,.| 000006f0 20 5a 29 0d 05 78 0c ea 77 2c 78 2c 79 2c 7a 0d | Z)..x..w,x,y,z.| 00000700 05 82 04 0d 05 8c 11 77 3d 28 57 2d 58 2b 59 2d |.......w=(W-X+Y-| 00000710 5a 29 2f 32 0d 05 96 12 78 3d 28 2d 57 2b 58 2b |Z)/2....x=(-W+X+| 00000720 59 2d 5a 29 2f 32 0d 05 a0 12 79 3d 28 2d 58 2d |Y-Z)/2....y=(-X-| 00000730 57 2b 59 2b 5a 29 2f 32 0d 05 aa 11 7a 3d 28 58 |W+Y+Z)/2....z=(X| 00000740 2b 57 2b 59 2b 5a 29 2f 32 0d 05 b4 04 0d 05 be |+W+Y+Z)/2.......| 00000750 12 57 3d 69 2a 77 2b 6a 2a 78 2b 73 63 2a 79 0d |.W=i*w+j*x+sc*y.| 00000760 05 c8 13 58 3d 73 63 2a 77 2b 63 32 2a 78 2d 73 |...X=sc*w+c2*x-s| 00000770 2a 79 0d 05 d2 12 59 3d 6a 2a 77 2b 6b 2a 78 2b |*y....Y=j*w+k*x+| 00000780 63 32 2a 79 0d 05 dc 07 5a 3d 7a 0d 05 e6 04 0d |c2*y....Z=z.....| 00000790 05 f0 11 77 3d 28 57 2d 58 2d 59 2b 5a 29 2f 32 |...w=(W-X-Y+Z)/2| 000007a0 0d 05 fa 12 78 3d 28 2d 57 2b 58 2d 59 2b 5a 29 |....x=(-W+X-Y+Z)| 000007b0 2f 32 0d 06 04 11 79 3d 28 58 2b 57 2b 59 2b 5a |/2....y=(X+W+Y+Z| 000007c0 29 2f 32 0d 06 0e 12 7a 3d 28 2d 58 2d 57 2b 59 |)/2....z=(-X-W+Y| 000007d0 2b 5a 29 2f 32 0d 06 18 04 0d 06 22 18 57 3d 43 |+Z)/2......".W=C| 000007e0 32 2a 77 2d 53 32 2a 78 2b 53 43 2a 28 79 2d 7a |2*w-S2*x+SC*(y-z| 000007f0 29 0d 06 2c 19 58 3d 2d 53 32 2a 77 2b 43 32 2a |)..,.X=-S2*w+C2*| 00000800 78 2b 53 43 2a 28 79 2d 7a 29 0d 06 36 19 59 3d |x+SC*(y-z)..6.Y=| 00000810 2d 53 43 2a 28 78 2b 77 29 2b 43 32 2a 79 2b 53 |-SC*(x+w)+C2*y+S| 00000820 32 2a 7a 0d 06 40 18 5a 3d 53 43 2a 28 78 2b 77 |2*z..@.Z=SC*(x+w| 00000830 29 2b 53 32 2a 79 2b 43 32 2a 7a 0d 06 4a 04 0d |)+S2*y+C2*z..J..| 00000840 06 54 05 e1 0d 06 5e 04 0d 06 68 0f dd f2 4d 61 |.T....^...h...Ma| 00000850 6b 65 43 75 62 65 73 0d 06 72 18 ea 6e 25 2c 41 |keCubes..r..n%,A| 00000860 25 2c 52 2c 50 2c 77 2c 78 2c 79 2c 7a 2c 4d 0d |%,R,P,w,x,y,z,M.| 00000870 06 7c 1c de 57 28 4e 25 29 2c 58 28 4e 25 29 2c |.|..W(N%),X(N%),| 00000880 59 28 4e 25 29 2c 5a 28 4e 25 29 0d 06 86 0c e3 |Y(N%),Z(N%).....| 00000890 6e 25 3d 31 b8 4e 25 0d 06 90 14 57 28 6e 25 29 |n%=1.N%....W(n%)| 000008a0 3d 31 30 30 2d b3 28 32 30 30 29 0d 06 9a 14 58 |=100-.(200)....X| 000008b0 28 6e 25 29 3d 31 30 30 2d b3 28 32 30 30 29 0d |(n%)=100-.(200).| 000008c0 06 a4 14 59 28 6e 25 29 3d 31 30 30 2d b3 28 32 |...Y(n%)=100-.(2| 000008d0 30 30 29 0d 06 ae 14 5a 28 6e 25 29 3d 31 30 30 |00)....Z(n%)=100| 000008e0 2d b3 28 32 30 30 29 0d 06 b8 10 52 3d 28 b3 28 |-.(200)....R=(.(| 000008f0 31 29 2a af 2a 32 29 0d 06 c2 10 50 3d 28 b3 28 |1)*.*2)....P=(.(| 00000900 31 29 2a af 2a 32 29 0d 06 cc 08 43 3d 9b 50 0d |1)*.*2)....C=.P.| 00000910 06 d6 08 53 3d b5 50 0d 06 e0 0a 43 32 3d 43 2a |...S=.P....C2=C*| 00000920 43 0d 06 ea 0a 53 32 3d 53 2a 53 0d 06 f4 0a 53 |C....S2=S*S....S| 00000930 43 3d 53 2a 43 0d 06 fe 08 63 3d 9b 52 0d 07 08 |C=S*C....c=.R...| 00000940 08 73 3d b5 52 0d 07 12 0a 63 32 3d 63 2a 63 0d |.s=.R....c2=c*c.| 00000950 07 1c 0a 73 32 3d 73 2a 73 0d 07 26 0a 73 63 3d |...s2=s*s..&.sc=| 00000960 73 2a 63 0d 07 30 0d 69 3d 63 32 2b 73 2a 73 32 |s*c..0.i=c2+s*s2| 00000970 0d 07 3a 0d 6a 3d 73 32 2a 63 2d 73 63 0d 07 44 |..:.j=s2*c-sc..D| 00000980 0d 6b 3d 73 32 2b 73 2a 63 32 0d 07 4e 0c 4d 3d |.k=s2+s*c2..N.M=| 00000990 b3 28 31 29 2b 31 0d 07 58 0c e3 41 25 3d 30 b8 |.(1)+1..X..A%=0.| 000009a0 31 35 0d 07 62 37 77 3d 77 28 6e 25 2c 41 25 29 |15..b7w=w(n%,A%)| 000009b0 2a 4d 3a 78 3d 78 28 6e 25 2c 41 25 29 2a 4d 3a |*M:x=x(n%,A%)*M:| 000009c0 79 3d 79 28 6e 25 2c 41 25 29 2a 4d 3a 7a 3d 7a |y=y(n%,A%)*M:z=z| 000009d0 28 6e 25 2c 41 25 29 2a 4d 0d 07 6c 2a f2 74 72 |(n%,A%)*M..l*.tr| 000009e0 61 6e 73 66 6f 72 6d 28 77 2c 78 2c 79 2c 7a 29 |ansform(w,x,y,z)| 000009f0 3a f4 20 69 6e 69 74 69 61 6c 20 72 6f 74 61 74 |:. initial rotat| 00000a00 69 6f 6e 0d 07 76 2f 77 28 6e 25 2c 41 25 29 3d |ion..v/w(n%,A%)=| 00000a10 77 3a 78 28 6e 25 2c 41 25 29 3d 78 3a 79 28 6e |w:x(n%,A%)=x:y(n| 00000a20 25 2c 41 25 29 3d 79 3a 7a 28 6e 25 2c 41 25 29 |%,A%)=y:z(n%,A%)| 00000a30 3d 7a 0d 07 80 05 ed 0d 07 8a 05 ed 0d 07 94 05 |=z..............| 00000a40 e1 0d 07 9e 04 0d 07 a8 0e dd f2 70 61 6c 6c 65 |...........palle| 00000a50 74 74 65 0d 07 b2 0a ea 43 25 2c 54 25 0d 07 bc |tte.....C%,T%...| 00000a60 0c e3 43 25 3d 30 b8 31 35 0d 07 c6 11 54 25 3d |..C%=0.15....T%=| 00000a70 28 43 25 3c 3c 34 29 2b 43 25 0d 07 d0 10 fb 43 |(C%<<4)+C%.....C| 00000a80 25 2c 54 25 2c 54 25 2c 54 25 0d 07 da 05 ed 0d |%,T%,T%,T%......| 00000a90 07 e4 05 e1 0d 07 ee 04 0d 07 f8 0a dd f2 72 65 |..............re| 00000aa0 61 64 0d 08 02 0a ea 54 25 2c 6e 25 0d 08 0c 29 |ad.....T%,n%...)| 00000ab0 de 20 77 28 4e 25 2c 31 35 29 2c 78 28 4e 25 2c |. w(N%,15),x(N%,| 00000ac0 31 35 29 2c 79 28 4e 25 2c 31 35 29 2c 7a 28 4e |15),y(N%,15),z(N| 00000ad0 25 2c 31 35 29 0d 08 16 39 de 20 58 25 28 31 35 |%,15)...9. X%(15| 00000ae0 29 2c 59 25 28 31 35 29 3a f4 20 66 6f 72 20 70 |),Y%(15):. for p| 00000af0 6f 73 74 20 70 65 72 73 70 65 63 74 69 76 65 20 |ost perspective | 00000b00 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 0d 08 |transformation..| 00000b10 20 15 de 20 43 25 28 31 35 29 3a f4 20 63 6f 6c | .. C%(15):. col| 00000b20 6f 75 72 0d 08 2a 0c e3 6e 25 3d 31 b8 4e 25 0d |our..*..n%=1.N%.| 00000b30 08 34 05 f7 0d 08 3e 0d e3 20 54 25 3d 30 b8 31 |.4....>.. T%=0.1| 00000b40 35 0d 08 48 29 f3 20 77 28 6e 25 2c 54 25 29 2c |5..H). w(n%,T%),| 00000b50 78 28 6e 25 2c 54 25 29 2c 79 28 6e 25 2c 54 25 |x(n%,T%),y(n%,T%| 00000b60 29 2c 7a 28 6e 25 2c 54 25 29 0d 08 52 05 ed 0d |),z(n%,T%)..R...| 00000b70 08 5c 05 ed 0d 08 66 05 e1 0d 08 70 04 0d 08 7a |.\....f....p...z| 00000b80 15 dc 20 2d 35 30 2c 2d 35 30 2c 2d 35 30 2c 2d |.. -50,-50,-50,-| 00000b90 35 30 0d 08 84 15 dc 20 2d 35 30 2c 2d 35 30 2c |50..... -50,-50,| 00000ba0 2d 35 30 2c 2b 35 30 0d 08 8e 15 dc 20 2d 35 30 |-50,+50..... -50| 00000bb0 2c 2d 35 30 2c 2b 35 30 2c 2b 35 30 0d 08 98 15 |,-50,+50,+50....| 00000bc0 dc 20 2d 35 30 2c 2d 35 30 2c 2b 35 30 2c 2d 35 |. -50,-50,+50,-5| 00000bd0 30 0d 08 a2 04 0d 08 ac 15 dc 20 2d 35 30 2c 2b |0......... -50,+| 00000be0 35 30 2c 2d 35 30 2c 2d 35 30 0d 08 b6 15 dc 20 |50,-50,-50..... | 00000bf0 2d 35 30 2c 2b 35 30 2c 2d 35 30 2c 2b 35 30 0d |-50,+50,-50,+50.| 00000c00 08 c0 15 dc 20 2d 35 30 2c 2b 35 30 2c 2b 35 30 |.... -50,+50,+50| 00000c10 2c 2b 35 30 0d 08 ca 15 dc 20 2d 35 30 2c 2b 35 |,+50..... -50,+5| 00000c20 30 2c 2b 35 30 2c 2d 35 30 0d 08 d4 04 0d 08 de |0,+50,-50.......| 00000c30 15 dc 20 2b 35 30 2c 2d 35 30 2c 2d 35 30 2c 2d |.. +50,-50,-50,-| 00000c40 35 30 0d 08 e8 15 dc 20 2b 35 30 2c 2d 35 30 2c |50..... +50,-50,| 00000c50 2d 35 30 2c 2b 35 30 0d 08 f2 15 dc 20 2b 35 30 |-50,+50..... +50| 00000c60 2c 2d 35 30 2c 2b 35 30 2c 2b 35 30 0d 08 fc 15 |,-50,+50,+50....| 00000c70 dc 20 2b 35 30 2c 2d 35 30 2c 2b 35 30 2c 2d 35 |. +50,-50,+50,-5| 00000c80 30 0d 09 06 04 0d 09 10 15 dc 20 2b 35 30 2c 2b |0......... +50,+| 00000c90 35 30 2c 2d 35 30 2c 2d 35 30 0d 09 1a 15 dc 20 |50,-50,-50..... | 00000ca0 2b 35 30 2c 2b 35 30 2c 2d 35 30 2c 2b 35 30 0d |+50,+50,-50,+50.| 00000cb0 09 24 15 dc 20 2b 35 30 2c 2b 35 30 2c 2b 35 30 |.$.. +50,+50,+50| 00000cc0 2c 2b 35 30 0d 09 2e 15 dc 20 2b 35 30 2c 2b 35 |,+50..... +50,+5| 00000cd0 30 2c 2b 35 30 2c 2d 35 30 0d 09 38 04 0d ff |0,+50,-50..8...| 00000cdf