Home » CEEFAX disks » telesoftware15.adl » RAY
RAY
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 » telesoftware15.adl |
Filename: | RAY |
Read OK: | ✔ |
File size: | 090E bytes |
Load address: | 0800 |
Exec address: | 802B |
File contents
10REM 20REM 30REM 40REM 50: 60PROCinitialise 70: 80MODE2 90VDU 29,640;512; 100FORS%=1 TO 7:READ C%:VDU 19,S%,C%;0;:NEXT 110FORx%=-640 TO 640 STEP8 120FORy% = -512 TO 512 STEP4 130x_rat = (ex%-x%)/(ez%-wzp%) 140vec1=(ez%*x%-ex%*wzp%)/(ez%-wzp%) 150y_rat = (ey%-y%)/(ez%-wzp%) 160vec2=(ez%*y%-ey%*wzp%)/(ez%-wzp%) 170a=(x_rat*x_rat)+(y_rat*y_rat)+1 180b=2*(x_rat*(vec1-bx%)+y_rat*(vec2-by%)-bz%) 190c=((vec1-bx%)*(vec1-bx%))+((vec2-by%)*(vec2-by%))+(bz%*bz%)-(radius%*radius%) 200root=(b*b)-4*a*c 210IF root>=0 PROCsphere 220IF root>=0 AND y>sy% PROCreflect ELSE PROCsurface 230NEXT 240NEXT 250END 260: 270DEF PROCunitvec(XE,YE,ZE) 280UL=SQR(XE*XE+YE*YE+ZE*ZE) 290XU=XE/UL 300YU=YE/UL 310ZU=ZE/UL 320ENDPROC 330: 340DEF FNdotprod(X1,Y1,Z1,X3,Y3,Z3) 350=X1*X3+Y1*Y3+Z1*Z3 360: 370DEF PROCsphere 380z0=(-b+SQR(root))/(2*a):z1=(-b-SQR(root))/(2*a) 390IF z0>z1 z=z0 ELSE z=z1 400x=x_rat*z+vec1 410y=y_rat*z+vec2 420ENDPROC 430: 440DEF PROCreflect 450PROCunitvec(x-bx%,y-by%,z-bz%) 460XN=XU:YN=YU:ZN=ZU 470XR=2*XN*ZN:YR=2*YN*ZN:ZR=2*ZN*ZN-1 480IF YR < 0 YD=YR:XD=XR:ZD=ZR:ST=-(y-sy%)/YD:X=XD*ST:Z=ZD*ST:i=10+3*((ABSZ MOD 160)<80)+3*((ABSX MOD 160)<80) ELSE i=0 490PROCunitvec(lx%-x, ly%-y, lz%-z) 500LDN=FNdotprod(XN,YN,ZN,XU,YU,ZU) 510PROCunitvec(ex%-x, ey%-y, ez%-z) 520XV=XU:YV=YU:ZV=ZU 530PROCunitvec(XR,YR,ZR) 540RDV=FNdotprod(XU,YU,ZU,XV,YV,ZV) 550xr=lx%-x:yr=ly%-y:zr=lz%-z 560r=SQR(xr*xr+yr*yr+zr*zr) 570i2=(6000/(r+20))*(0.1*LDN+2*(RDV^60)) 580IF i2<0 i2=0 590i=i+i2:IF i>15 i=15 600IF i>0 col%=i ELSE col%=0 610GCOL 0,col%/2 620PLOT 69,x%,y% 630ENDPROC 640: 650DEF PROCsurface 660z_diff%=ey%-y% 670IF z_diff%=0 ENDPROC 680x_diff% = ez%-wzp% 690IF x_diff%=0 ENDPROC 700sz=(wzp%*(ey%-sy%)+ez%*(sy%-y%))/z_diff% 710IF sz >= 0 ENDPROC 720sx=(x%*(ez%-sz)+ex%*(sz-y%))/x_diff% 730x_rat=(lx%-sx)/(lz%-sz) 740vec1=(lz%*sx-lx%*sz)/(lz%-sz) 750y_rat=(ly%-sy%)/(lz%-sz) 760vec2=(lz%*sy%-ly%*sz)/(lz%-sz) 770a=(x_rat*x_rat)+(y_rat*y_rat)+1 780b=2*(x_rat*(vec1-bx%)+y_rat*(vec2-by%)-bz%) 790c=((vec1-bx%)*(vec1-bx%))+((vec2-by%)*(vec2-by%))+(bz%*bz%)-(radius%*radius%) 800root=(b*b)-4*a*c 810col%=4 820IF root<0 OR y<sy% lighti=sx-lx%:lightj=sy%-ly%:lightk=sz-lz%:PROCunitvec(lighti,lightj,lightk):i=-lightj/UL:IF i>=0 col%=4+i*4 830zpos%=sz 840xpos%=sx 850col%=col%+6+3*((ABSzpos%MOD160)<80)+3*((ABSxpos% MOD160)<80) 860GCOL 0,col%/2 870PLOT 69,x%,y% 880ENDPROC 890: 900DEF PROCinitialise 910ex%=1:ey%=0:ez%=0:lx%=1:ly%=0:lz%=0 920bx%=0:by%=-100:bz%=-500:radius%=300 930sy%=-450:wzp%=-300:y=0 940ENDPROC 950: 960DATA 4,1,5,2,6,3,7
� � � (� 2: <�initialise F: P�2 Z� 29,640;512; d"�S%=1 � 7:� C%:� 19,S%,C%;0;:� n�x%=-640 � 640 �8 x�y% = -512 � 512 �4 �x_rat = (ex%-x%)/(ez%-wzp%) �%vec1=(ez%*x%-ex%*wzp%)/(ez%-wzp%) �y_rat = (ey%-y%)/(ez%-wzp%) �%vec2=(ez%*y%-ey%*wzp%)/(ez%-wzp%) �#a=(x_rat*x_rat)+(y_rat*y_rat)+1 �/b=2*(x_rat*(vec1-bx%)+y_rat*(vec2-by%)-bz%) �Qc=((vec1-bx%)*(vec1-bx%))+((vec2-by%)*(vec2-by%))+(bz%*bz%)-(radius%*radius%) �root=(b*b)-4*a*c �� root>=0 �sphere �)� root>=0 � y>sy% �reflect � �surface �� �� �� : � �unitvec(XE,YE,ZE) UL=�(XE*XE+YE*YE+ZE*ZE) "XU=XE/UL ,YU=YE/UL 6ZU=ZE/UL @� J: T!� �dotprod(X1,Y1,Z1,X3,Y3,Z3) ^=X1*X3+Y1*Y3+Z1*Z3 h: r � �sphere |/z0=(-b+�(root))/(2*a):z1=(-b-�(root))/(2*a) �� z0>z1 z=z0 � z=z1 �x=x_rat*z+vec1 �y=y_rat*z+vec2 �� �: �� �reflect ��unitvec(x-bx%,y-by%,z-bz%) �XN=XU:YN=YU:ZN=ZU �&XR=2*XN*ZN:YR=2*YN*ZN:ZR=2*ZN*ZN-1 �l� YR < 0 YD=YR:XD=XR:ZD=ZR:ST=-(y-sy%)/YD:X=XD*ST:Z=ZD*ST:i=10+3*((�Z � 160)<80)+3*((�X � 160)<80) � i=0 �!�unitvec(lx%-x, ly%-y, lz%-z) �#LDN=�dotprod(XN,YN,ZN,XU,YU,ZU) �!�unitvec(ex%-x, ey%-y, ez%-z) XV=XU:YV=YU:ZV=ZU �unitvec(XR,YR,ZR) #RDV=�dotprod(XU,YU,ZU,XV,YV,ZV) &xr=lx%-x:yr=ly%-y:zr=lz%-z 0r=�(xr*xr+yr*yr+zr*zr) :)i2=(6000/(r+20))*(0.1*LDN+2*(RDV^60)) D� i2<0 i2=0 Ni=i+i2:� i>15 i=15 X� i>0 col%=i � col%=0 b� 0,col%/2 l� 69,x%,y% v� �: �� �surface �z_diff%=ey%-y% �� z_diff%=0 � �x_diff% = ez%-wzp% �� x_diff%=0 � �,sz=(wzp%*(ey%-sy%)+ez%*(sy%-y%))/z_diff% �� sz >= 0 � �(sx=(x%*(ez%-sz)+ex%*(sz-y%))/x_diff% �x_rat=(lx%-sx)/(lz%-sz) �!vec1=(lz%*sx-lx%*sz)/(lz%-sz) �y_rat=(ly%-sy%)/(lz%-sz) �"vec2=(lz%*sy%-ly%*sz)/(lz%-sz) #a=(x_rat*x_rat)+(y_rat*y_rat)+1 /b=2*(x_rat*(vec1-bx%)+y_rat*(vec2-by%)-bz%) Qc=((vec1-bx%)*(vec1-bx%))+((vec2-by%)*(vec2-by%))+(bz%*bz%)-(radius%*radius%) root=(b*b)-4*a*c * col%=4 4}� root<0 � y<sy% lighti=sx-lx%:lightj=sy%-ly%:lightk=sz-lz%:�unitvec(lighti,lightj,lightk):i=-lightj/UL:� i>=0 col%=4+i*4 >zpos%=sz Hxpos%=sx R8col%=col%+6+3*((�zpos%�160)<80)+3*((�xpos% �160)<80) \� 0,col%/2 f� 69,x%,y% p� z: �� �initialise �'ex%=1:ey%=0:ez%=0:lx%=1:ly%=0:lz%=0 �'bx%=0:by%=-100:bz%=-500:radius%=300 �sy%=-450:wzp%=-300:y=0 �� �: �� 4,1,5,2,6,3,7 �
00000000 0d 00 0a 05 f4 0d 00 14 05 f4 0d 00 1e 05 f4 0d |................| 00000010 00 28 05 f4 0d 00 32 05 3a 0d 00 3c 0f f2 69 6e |.(....2.:..<..in| 00000020 69 74 69 61 6c 69 73 65 0d 00 46 05 3a 0d 00 50 |itialise..F.:..P| 00000030 06 eb 32 0d 00 5a 11 ef 20 32 39 2c 36 34 30 3b |..2..Z.. 29,640;| 00000040 35 31 32 3b 0d 00 64 22 e3 53 25 3d 31 20 b8 20 |512;..d".S%=1 . | 00000050 37 3a f3 20 43 25 3a ef 20 31 39 2c 53 25 2c 43 |7:. C%:. 19,S%,C| 00000060 25 3b 30 3b 3a ed 0d 00 6e 15 e3 78 25 3d 2d 36 |%;0;:...n..x%=-6| 00000070 34 30 20 b8 20 36 34 30 20 88 38 0d 00 78 17 e3 |40 . 640 .8..x..| 00000080 79 25 20 3d 20 2d 35 31 32 20 b8 20 35 31 32 20 |y% = -512 . 512 | 00000090 88 34 0d 00 82 1f 78 5f 72 61 74 20 3d 20 28 65 |.4....x_rat = (e| 000000a0 78 25 2d 78 25 29 2f 28 65 7a 25 2d 77 7a 70 25 |x%-x%)/(ez%-wzp%| 000000b0 29 0d 00 8c 25 76 65 63 31 3d 28 65 7a 25 2a 78 |)...%vec1=(ez%*x| 000000c0 25 2d 65 78 25 2a 77 7a 70 25 29 2f 28 65 7a 25 |%-ex%*wzp%)/(ez%| 000000d0 2d 77 7a 70 25 29 0d 00 96 1f 79 5f 72 61 74 20 |-wzp%)....y_rat | 000000e0 3d 20 28 65 79 25 2d 79 25 29 2f 28 65 7a 25 2d |= (ey%-y%)/(ez%-| 000000f0 77 7a 70 25 29 0d 00 a0 25 76 65 63 32 3d 28 65 |wzp%)...%vec2=(e| 00000100 7a 25 2a 79 25 2d 65 79 25 2a 77 7a 70 25 29 2f |z%*y%-ey%*wzp%)/| 00000110 28 65 7a 25 2d 77 7a 70 25 29 0d 00 aa 23 61 3d |(ez%-wzp%)...#a=| 00000120 28 78 5f 72 61 74 2a 78 5f 72 61 74 29 2b 28 79 |(x_rat*x_rat)+(y| 00000130 5f 72 61 74 2a 79 5f 72 61 74 29 2b 31 0d 00 b4 |_rat*y_rat)+1...| 00000140 2f 62 3d 32 2a 28 78 5f 72 61 74 2a 28 76 65 63 |/b=2*(x_rat*(vec| 00000150 31 2d 62 78 25 29 2b 79 5f 72 61 74 2a 28 76 65 |1-bx%)+y_rat*(ve| 00000160 63 32 2d 62 79 25 29 2d 62 7a 25 29 0d 00 be 51 |c2-by%)-bz%)...Q| 00000170 63 3d 28 28 76 65 63 31 2d 62 78 25 29 2a 28 76 |c=((vec1-bx%)*(v| 00000180 65 63 31 2d 62 78 25 29 29 2b 28 28 76 65 63 32 |ec1-bx%))+((vec2| 00000190 2d 62 79 25 29 2a 28 76 65 63 32 2d 62 79 25 29 |-by%)*(vec2-by%)| 000001a0 29 2b 28 62 7a 25 2a 62 7a 25 29 2d 28 72 61 64 |)+(bz%*bz%)-(rad| 000001b0 69 75 73 25 2a 72 61 64 69 75 73 25 29 0d 00 c8 |ius%*radius%)...| 000001c0 14 72 6f 6f 74 3d 28 62 2a 62 29 2d 34 2a 61 2a |.root=(b*b)-4*a*| 000001d0 63 0d 00 d2 15 e7 20 72 6f 6f 74 3e 3d 30 20 f2 |c..... root>=0 .| 000001e0 73 70 68 65 72 65 0d 00 dc 29 e7 20 72 6f 6f 74 |sphere...). root| 000001f0 3e 3d 30 20 80 20 79 3e 73 79 25 20 f2 72 65 66 |>=0 . y>sy% .ref| 00000200 6c 65 63 74 20 8b 20 f2 73 75 72 66 61 63 65 0d |lect . .surface.| 00000210 00 e6 05 ed 0d 00 f0 05 ed 0d 00 fa 05 e0 0d 01 |................| 00000220 04 05 3a 0d 01 0e 18 dd 20 f2 75 6e 69 74 76 65 |..:..... .unitve| 00000230 63 28 58 45 2c 59 45 2c 5a 45 29 0d 01 18 1b 55 |c(XE,YE,ZE)....U| 00000240 4c 3d b6 28 58 45 2a 58 45 2b 59 45 2a 59 45 2b |L=.(XE*XE+YE*YE+| 00000250 5a 45 2a 5a 45 29 0d 01 22 0c 58 55 3d 58 45 2f |ZE*ZE)..".XU=XE/| 00000260 55 4c 0d 01 2c 0c 59 55 3d 59 45 2f 55 4c 0d 01 |UL..,.YU=YE/UL..| 00000270 36 0c 5a 55 3d 5a 45 2f 55 4c 0d 01 40 05 e1 0d |6.ZU=ZE/UL..@...| 00000280 01 4a 05 3a 0d 01 54 21 dd 20 a4 64 6f 74 70 72 |.J.:..T!. .dotpr| 00000290 6f 64 28 58 31 2c 59 31 2c 5a 31 2c 58 33 2c 59 |od(X1,Y1,Z1,X3,Y| 000002a0 33 2c 5a 33 29 0d 01 5e 16 3d 58 31 2a 58 33 2b |3,Z3)..^.=X1*X3+| 000002b0 59 31 2a 59 33 2b 5a 31 2a 5a 33 0d 01 68 05 3a |Y1*Y3+Z1*Z3..h.:| 000002c0 0d 01 72 0d dd 20 f2 73 70 68 65 72 65 0d 01 7c |..r.. .sphere..|| 000002d0 2f 7a 30 3d 28 2d 62 2b b6 28 72 6f 6f 74 29 29 |/z0=(-b+.(root))| 000002e0 2f 28 32 2a 61 29 3a 7a 31 3d 28 2d 62 2d b6 28 |/(2*a):z1=(-b-.(| 000002f0 72 6f 6f 74 29 29 2f 28 32 2a 61 29 0d 01 86 17 |root))/(2*a)....| 00000300 e7 20 7a 30 3e 7a 31 20 7a 3d 7a 30 20 8b 20 7a |. z0>z1 z=z0 . z| 00000310 3d 7a 31 0d 01 90 12 78 3d 78 5f 72 61 74 2a 7a |=z1....x=x_rat*z| 00000320 2b 76 65 63 31 0d 01 9a 12 79 3d 79 5f 72 61 74 |+vec1....y=y_rat| 00000330 2a 7a 2b 76 65 63 32 0d 01 a4 05 e1 0d 01 ae 05 |*z+vec2.........| 00000340 3a 0d 01 b8 0e dd 20 f2 72 65 66 6c 65 63 74 0d |:..... .reflect.| 00000350 01 c2 1f f2 75 6e 69 74 76 65 63 28 78 2d 62 78 |....unitvec(x-bx| 00000360 25 2c 79 2d 62 79 25 2c 7a 2d 62 7a 25 29 0d 01 |%,y-by%,z-bz%)..| 00000370 cc 15 58 4e 3d 58 55 3a 59 4e 3d 59 55 3a 5a 4e |..XN=XU:YN=YU:ZN| 00000380 3d 5a 55 0d 01 d6 26 58 52 3d 32 2a 58 4e 2a 5a |=ZU...&XR=2*XN*Z| 00000390 4e 3a 59 52 3d 32 2a 59 4e 2a 5a 4e 3a 5a 52 3d |N:YR=2*YN*ZN:ZR=| 000003a0 32 2a 5a 4e 2a 5a 4e 2d 31 0d 01 e0 6c e7 20 59 |2*ZN*ZN-1...l. Y| 000003b0 52 20 3c 20 30 20 59 44 3d 59 52 3a 58 44 3d 58 |R < 0 YD=YR:XD=X| 000003c0 52 3a 5a 44 3d 5a 52 3a 53 54 3d 2d 28 79 2d 73 |R:ZD=ZR:ST=-(y-s| 000003d0 79 25 29 2f 59 44 3a 58 3d 58 44 2a 53 54 3a 5a |y%)/YD:X=XD*ST:Z| 000003e0 3d 5a 44 2a 53 54 3a 69 3d 31 30 2b 33 2a 28 28 |=ZD*ST:i=10+3*((| 000003f0 94 5a 20 83 20 31 36 30 29 3c 38 30 29 2b 33 2a |.Z . 160)<80)+3*| 00000400 28 28 94 58 20 83 20 31 36 30 29 3c 38 30 29 20 |((.X . 160)<80) | 00000410 8b 20 69 3d 30 0d 01 ea 21 f2 75 6e 69 74 76 65 |. i=0...!.unitve| 00000420 63 28 6c 78 25 2d 78 2c 20 6c 79 25 2d 79 2c 20 |c(lx%-x, ly%-y, | 00000430 6c 7a 25 2d 7a 29 0d 01 f4 23 4c 44 4e 3d a4 64 |lz%-z)...#LDN=.d| 00000440 6f 74 70 72 6f 64 28 58 4e 2c 59 4e 2c 5a 4e 2c |otprod(XN,YN,ZN,| 00000450 58 55 2c 59 55 2c 5a 55 29 0d 01 fe 21 f2 75 6e |XU,YU,ZU)...!.un| 00000460 69 74 76 65 63 28 65 78 25 2d 78 2c 20 65 79 25 |itvec(ex%-x, ey%| 00000470 2d 79 2c 20 65 7a 25 2d 7a 29 0d 02 08 15 58 56 |-y, ez%-z)....XV| 00000480 3d 58 55 3a 59 56 3d 59 55 3a 5a 56 3d 5a 55 0d |=XU:YV=YU:ZV=ZU.| 00000490 02 12 16 f2 75 6e 69 74 76 65 63 28 58 52 2c 59 |....unitvec(XR,Y| 000004a0 52 2c 5a 52 29 0d 02 1c 23 52 44 56 3d a4 64 6f |R,ZR)...#RDV=.do| 000004b0 74 70 72 6f 64 28 58 55 2c 59 55 2c 5a 55 2c 58 |tprod(XU,YU,ZU,X| 000004c0 56 2c 59 56 2c 5a 56 29 0d 02 26 1e 78 72 3d 6c |V,YV,ZV)..&.xr=l| 000004d0 78 25 2d 78 3a 79 72 3d 6c 79 25 2d 79 3a 7a 72 |x%-x:yr=ly%-y:zr| 000004e0 3d 6c 7a 25 2d 7a 0d 02 30 1a 72 3d b6 28 78 72 |=lz%-z..0.r=.(xr| 000004f0 2a 78 72 2b 79 72 2a 79 72 2b 7a 72 2a 7a 72 29 |*xr+yr*yr+zr*zr)| 00000500 0d 02 3a 29 69 32 3d 28 36 30 30 30 2f 28 72 2b |..:)i2=(6000/(r+| 00000510 32 30 29 29 2a 28 30 2e 31 2a 4c 44 4e 2b 32 2a |20))*(0.1*LDN+2*| 00000520 28 52 44 56 5e 36 30 29 29 0d 02 44 0f e7 20 69 |(RDV^60))..D.. i| 00000530 32 3c 30 20 69 32 3d 30 0d 02 4e 16 69 3d 69 2b |2<0 i2=0..N.i=i+| 00000540 69 32 3a e7 20 69 3e 31 35 20 69 3d 31 35 0d 02 |i2:. i>15 i=15..| 00000550 58 19 e7 20 69 3e 30 20 63 6f 6c 25 3d 69 20 8b |X.. i>0 col%=i .| 00000560 20 63 6f 6c 25 3d 30 0d 02 62 0e e6 20 30 2c 63 | col%=0..b.. 0,c| 00000570 6f 6c 25 2f 32 0d 02 6c 0e f0 20 36 39 2c 78 25 |ol%/2..l.. 69,x%| 00000580 2c 79 25 0d 02 76 05 e1 0d 02 80 05 3a 0d 02 8a |,y%..v......:...| 00000590 0e dd 20 f2 73 75 72 66 61 63 65 0d 02 94 12 7a |.. .surface....z| 000005a0 5f 64 69 66 66 25 3d 65 79 25 2d 79 25 0d 02 9e |_diff%=ey%-y%...| 000005b0 11 e7 20 7a 5f 64 69 66 66 25 3d 30 20 e1 0d 02 |.. z_diff%=0 ...| 000005c0 a8 16 78 5f 64 69 66 66 25 20 3d 20 65 7a 25 2d |..x_diff% = ez%-| 000005d0 77 7a 70 25 0d 02 b2 11 e7 20 78 5f 64 69 66 66 |wzp%..... x_diff| 000005e0 25 3d 30 20 e1 0d 02 bc 2c 73 7a 3d 28 77 7a 70 |%=0 ....,sz=(wzp| 000005f0 25 2a 28 65 79 25 2d 73 79 25 29 2b 65 7a 25 2a |%*(ey%-sy%)+ez%*| 00000600 28 73 79 25 2d 79 25 29 29 2f 7a 5f 64 69 66 66 |(sy%-y%))/z_diff| 00000610 25 0d 02 c6 0f e7 20 73 7a 20 3e 3d 20 30 20 e1 |%..... sz >= 0 .| 00000620 0d 02 d0 28 73 78 3d 28 78 25 2a 28 65 7a 25 2d |...(sx=(x%*(ez%-| 00000630 73 7a 29 2b 65 78 25 2a 28 73 7a 2d 79 25 29 29 |sz)+ex%*(sz-y%))| 00000640 2f 78 5f 64 69 66 66 25 0d 02 da 1b 78 5f 72 61 |/x_diff%....x_ra| 00000650 74 3d 28 6c 78 25 2d 73 78 29 2f 28 6c 7a 25 2d |t=(lx%-sx)/(lz%-| 00000660 73 7a 29 0d 02 e4 21 76 65 63 31 3d 28 6c 7a 25 |sz)...!vec1=(lz%| 00000670 2a 73 78 2d 6c 78 25 2a 73 7a 29 2f 28 6c 7a 25 |*sx-lx%*sz)/(lz%| 00000680 2d 73 7a 29 0d 02 ee 1c 79 5f 72 61 74 3d 28 6c |-sz)....y_rat=(l| 00000690 79 25 2d 73 79 25 29 2f 28 6c 7a 25 2d 73 7a 29 |y%-sy%)/(lz%-sz)| 000006a0 0d 02 f8 22 76 65 63 32 3d 28 6c 7a 25 2a 73 79 |..."vec2=(lz%*sy| 000006b0 25 2d 6c 79 25 2a 73 7a 29 2f 28 6c 7a 25 2d 73 |%-ly%*sz)/(lz%-s| 000006c0 7a 29 0d 03 02 23 61 3d 28 78 5f 72 61 74 2a 78 |z)...#a=(x_rat*x| 000006d0 5f 72 61 74 29 2b 28 79 5f 72 61 74 2a 79 5f 72 |_rat)+(y_rat*y_r| 000006e0 61 74 29 2b 31 0d 03 0c 2f 62 3d 32 2a 28 78 5f |at)+1.../b=2*(x_| 000006f0 72 61 74 2a 28 76 65 63 31 2d 62 78 25 29 2b 79 |rat*(vec1-bx%)+y| 00000700 5f 72 61 74 2a 28 76 65 63 32 2d 62 79 25 29 2d |_rat*(vec2-by%)-| 00000710 62 7a 25 29 0d 03 16 51 63 3d 28 28 76 65 63 31 |bz%)...Qc=((vec1| 00000720 2d 62 78 25 29 2a 28 76 65 63 31 2d 62 78 25 29 |-bx%)*(vec1-bx%)| 00000730 29 2b 28 28 76 65 63 32 2d 62 79 25 29 2a 28 76 |)+((vec2-by%)*(v| 00000740 65 63 32 2d 62 79 25 29 29 2b 28 62 7a 25 2a 62 |ec2-by%))+(bz%*b| 00000750 7a 25 29 2d 28 72 61 64 69 75 73 25 2a 72 61 64 |z%)-(radius%*rad| 00000760 69 75 73 25 29 0d 03 20 14 72 6f 6f 74 3d 28 62 |ius%).. .root=(b| 00000770 2a 62 29 2d 34 2a 61 2a 63 0d 03 2a 0a 63 6f 6c |*b)-4*a*c..*.col| 00000780 25 3d 34 0d 03 34 7d e7 20 72 6f 6f 74 3c 30 20 |%=4..4}. root<0 | 00000790 84 20 79 3c 73 79 25 20 6c 69 67 68 74 69 3d 73 |. y<sy% lighti=s| 000007a0 78 2d 6c 78 25 3a 6c 69 67 68 74 6a 3d 73 79 25 |x-lx%:lightj=sy%| 000007b0 2d 6c 79 25 3a 6c 69 67 68 74 6b 3d 73 7a 2d 6c |-ly%:lightk=sz-l| 000007c0 7a 25 3a f2 75 6e 69 74 76 65 63 28 6c 69 67 68 |z%:.unitvec(ligh| 000007d0 74 69 2c 6c 69 67 68 74 6a 2c 6c 69 67 68 74 6b |ti,lightj,lightk| 000007e0 29 3a 69 3d 2d 6c 69 67 68 74 6a 2f 55 4c 3a e7 |):i=-lightj/UL:.| 000007f0 20 69 3e 3d 30 20 63 6f 6c 25 3d 34 2b 69 2a 34 | i>=0 col%=4+i*4| 00000800 0d 03 3e 0c 7a 70 6f 73 25 3d 73 7a 0d 03 48 0c |..>.zpos%=sz..H.| 00000810 78 70 6f 73 25 3d 73 78 0d 03 52 38 63 6f 6c 25 |xpos%=sx..R8col%| 00000820 3d 63 6f 6c 25 2b 36 2b 33 2a 28 28 94 7a 70 6f |=col%+6+3*((.zpo| 00000830 73 25 83 31 36 30 29 3c 38 30 29 2b 33 2a 28 28 |s%.160)<80)+3*((| 00000840 94 78 70 6f 73 25 20 83 31 36 30 29 3c 38 30 29 |.xpos% .160)<80)| 00000850 0d 03 5c 0e e6 20 30 2c 63 6f 6c 25 2f 32 0d 03 |..\.. 0,col%/2..| 00000860 66 0e f0 20 36 39 2c 78 25 2c 79 25 0d 03 70 05 |f.. 69,x%,y%..p.| 00000870 e1 0d 03 7a 05 3a 0d 03 84 11 dd 20 f2 69 6e 69 |...z.:..... .ini| 00000880 74 69 61 6c 69 73 65 0d 03 8e 27 65 78 25 3d 31 |tialise...'ex%=1| 00000890 3a 65 79 25 3d 30 3a 65 7a 25 3d 30 3a 6c 78 25 |:ey%=0:ez%=0:lx%| 000008a0 3d 31 3a 6c 79 25 3d 30 3a 6c 7a 25 3d 30 0d 03 |=1:ly%=0:lz%=0..| 000008b0 98 27 62 78 25 3d 30 3a 62 79 25 3d 2d 31 30 30 |.'bx%=0:by%=-100| 000008c0 3a 62 7a 25 3d 2d 35 30 30 3a 72 61 64 69 75 73 |:bz%=-500:radius| 000008d0 25 3d 33 30 30 0d 03 a2 1a 73 79 25 3d 2d 34 35 |%=300....sy%=-45| 000008e0 30 3a 77 7a 70 25 3d 2d 33 30 30 3a 79 3d 30 0d |0:wzp%=-300:y=0.| 000008f0 03 ac 05 e1 0d 03 b6 05 3a 0d 03 c0 13 dc 20 34 |........:..... 4| 00000900 2c 31 2c 35 2c 32 2c 36 2c 33 2c 37 0d ff |,1,5,2,6,3,7..| 0000090e