Home » Archimedes archive » Archimedes World » AW-1991-11.adf » November91 » !AWNov91/Goodies/3DGraphics/Demos/SQR_SCALE
!AWNov91/Goodies/3DGraphics/Demos/SQR_SCALE
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 » Archimedes archive » Archimedes World » AW-1991-11.adf » November91 |
Filename: | !AWNov91/Goodies/3DGraphics/Demos/SQR_SCALE |
Read OK: | ✔ |
File size: | 0435 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >SQR_SCALE 20: 30REM Initialise variables 40: 50*RMENSURE 3DGraphics 0.01 RMLOAD 3DGRAPHICS 60DIM plot%(100),xpos%(100),ypos%(100),zpos%(100) 70xa%=0:ya%=0 80scale=1 90FOR read=1 TO 3 100READ p%,x%,y%,z% 110plot%(read)=p%:xpos%(read)=x%:ypos%(read)=y%:zpos%(read)=z% 120NEXT 130MODE 9 140SYS "Vector_SetViewangle",89 150: 160REM Swap screens 170: 180REPEAT 190MOUSE a,b,c 200IF c=1 AND scale>0.2 THEN scale-=.2 210IF c=4 AND scale<10 THEN scale+=.2 220WAIT:SYS 6,&71,1:SYS 6,&70,2:PROCscreen 230WAIT:SYS 6,&71,2:SYS 6,&70,1:PROCscreen 240UNTIL FALSE 250: 260REM Update screen display 270: 280DEFPROCscreen 290SYS "Vector_SetYangle",ya% 300CLS 310GCOL 1 320ORIGIN 150,880 330SYS "Vector_SetXangle",xa% 340PROCsquare 350GCOL 2 360ORIGIN 1130,880 370SYS "Vector_SetXangle",xa%+22 380PROCsquare 390GCOL 3 400ORIGIN 150,140 410SYS "Vector_SetXangle",xa%+45 420PROCsquare 430GCOL 4 440ORIGIN 1130,140 450SYS "Vector_SetXangle",xa%+67 460PROCsquare 470xa%+=8:ya%+=1 480ENDPROC 490: 500REM Draw filled square 510: 520DEFPROCsquare 530FOR t%=1 TO 3 540SYS "Vector_Plot",plot%(t%),xpos%(t%)*scale,ypos%(t%)*scale,zpos%(t%) 550NEXT 560ENDPROC 570: 580REM Data for square 590: 600DATA 4,-50,-50,1,4,50,-50,1,117,50,50,1
� >SQR_SCALE : � Initialise variables (: 2/*RMENSURE 3DGraphics 0.01 RMLOAD 3DGRAPHICS <1� plot%(100),xpos%(100),ypos%(100),zpos%(100) Fxa%=0:ya%=0 Pscale=1 Z� read=1 � 3 d� p%,x%,y%,z% n?plot%(read)=p%:xpos%(read)=x%:ypos%(read)=y%:zpos%(read)=z% x� �� 9 �ș "Vector_SetViewangle",89 �: �� Swap screens �: �� �ȗ a,b,c �!� c=1 � scale>0.2 � scale-=.2 � � c=4 � scale<10 � scale+=.2 �$Ȗ:ș 6,&71,1:ș 6,&70,2:�screen �$Ȗ:ș 6,&71,2:ș 6,&70,1:�screen �� � �: � Update screen display : ��screen "ș "Vector_SetYangle",ya% ,� 6� 1 @ȑ 150,880 Jș "Vector_SetXangle",xa% T�square ^� 2 hȑ 1130,880 r ș "Vector_SetXangle",xa%+22 |�square �� 3 �ȑ 150,140 � ș "Vector_SetXangle",xa%+45 ��square �� 4 �ȑ 1130,140 � ș "Vector_SetXangle",xa%+67 ��square �xa%+=8:ya%+=1 �� �: �� Draw filled square �: ��square � t%=1 � 3 Hș "Vector_Plot",plot%(t%),xpos%(t%)*scale,ypos%(t%)*scale,zpos%(t%) &� 0� :: D� Data for square N: X(� 4,-50,-50,1,4,50,-50,1,117,50,50,1 �
00000000 0d 00 0a 10 f4 20 3e 53 51 52 5f 53 43 41 4c 45 |..... >SQR_SCALE| 00000010 0d 00 14 05 3a 0d 00 1e 1a f4 20 49 6e 69 74 69 |....:..... Initi| 00000020 61 6c 69 73 65 20 76 61 72 69 61 62 6c 65 73 0d |alise variables.| 00000030 00 28 05 3a 0d 00 32 2f 2a 52 4d 45 4e 53 55 52 |.(.:..2/*RMENSUR| 00000040 45 20 33 44 47 72 61 70 68 69 63 73 20 30 2e 30 |E 3DGraphics 0.0| 00000050 31 20 52 4d 4c 4f 41 44 20 33 44 47 52 41 50 48 |1 RMLOAD 3DGRAPH| 00000060 49 43 53 0d 00 3c 31 de 20 70 6c 6f 74 25 28 31 |ICS..<1. plot%(1| 00000070 30 30 29 2c 78 70 6f 73 25 28 31 30 30 29 2c 79 |00),xpos%(100),y| 00000080 70 6f 73 25 28 31 30 30 29 2c 7a 70 6f 73 25 28 |pos%(100),zpos%(| 00000090 31 30 30 29 0d 00 46 0f 78 61 25 3d 30 3a 79 61 |100)..F.xa%=0:ya| 000000a0 25 3d 30 0d 00 50 0b 73 63 61 6c 65 3d 31 0d 00 |%=0..P.scale=1..| 000000b0 5a 10 e3 20 72 65 61 64 3d 31 20 b8 20 33 0d 00 |Z.. read=1 . 3..| 000000c0 64 11 f3 20 70 25 2c 78 25 2c 79 25 2c 7a 25 0d |d.. p%,x%,y%,z%.| 000000d0 00 6e 3f 70 6c 6f 74 25 28 72 65 61 64 29 3d 70 |.n?plot%(read)=p| 000000e0 25 3a 78 70 6f 73 25 28 72 65 61 64 29 3d 78 25 |%:xpos%(read)=x%| 000000f0 3a 79 70 6f 73 25 28 72 65 61 64 29 3d 79 25 3a |:ypos%(read)=y%:| 00000100 7a 70 6f 73 25 28 72 65 61 64 29 3d 7a 25 0d 00 |zpos%(read)=z%..| 00000110 78 05 ed 0d 00 82 07 eb 20 39 0d 00 8c 1f c8 99 |x....... 9......| 00000120 20 22 56 65 63 74 6f 72 5f 53 65 74 56 69 65 77 | "Vector_SetView| 00000130 61 6e 67 6c 65 22 2c 38 39 0d 00 96 05 3a 0d 00 |angle",89....:..| 00000140 a0 12 f4 20 53 77 61 70 20 73 63 72 65 65 6e 73 |... Swap screens| 00000150 0d 00 aa 05 3a 0d 00 b4 05 f5 0d 00 be 0c c8 97 |....:...........| 00000160 20 61 2c 62 2c 63 0d 00 c8 21 e7 20 63 3d 31 20 | a,b,c...!. c=1 | 00000170 80 20 73 63 61 6c 65 3e 30 2e 32 20 8c 20 73 63 |. scale>0.2 . sc| 00000180 61 6c 65 2d 3d 2e 32 0d 00 d2 20 e7 20 63 3d 34 |ale-=.2... . c=4| 00000190 20 80 20 73 63 61 6c 65 3c 31 30 20 8c 20 73 63 | . scale<10 . sc| 000001a0 61 6c 65 2b 3d 2e 32 0d 00 dc 24 c8 96 3a c8 99 |ale+=.2...$..:..| 000001b0 20 36 2c 26 37 31 2c 31 3a c8 99 20 36 2c 26 37 | 6,&71,1:.. 6,&7| 000001c0 30 2c 32 3a f2 73 63 72 65 65 6e 0d 00 e6 24 c8 |0,2:.screen...$.| 000001d0 96 3a c8 99 20 36 2c 26 37 31 2c 32 3a c8 99 20 |.:.. 6,&71,2:.. | 000001e0 36 2c 26 37 30 2c 31 3a f2 73 63 72 65 65 6e 0d |6,&70,1:.screen.| 000001f0 00 f0 07 fd 20 a3 0d 00 fa 05 3a 0d 01 04 1b f4 |.... .....:.....| 00000200 20 55 70 64 61 74 65 20 73 63 72 65 65 6e 20 64 | Update screen d| 00000210 69 73 70 6c 61 79 0d 01 0e 05 3a 0d 01 18 0c dd |isplay....:.....| 00000220 f2 73 63 72 65 65 6e 0d 01 22 1d c8 99 20 22 56 |.screen.."... "V| 00000230 65 63 74 6f 72 5f 53 65 74 59 61 6e 67 6c 65 22 |ector_SetYangle"| 00000240 2c 79 61 25 0d 01 2c 05 db 0d 01 36 07 e6 20 31 |,ya%..,....6.. 1| 00000250 0d 01 40 0e c8 91 20 31 35 30 2c 38 38 30 0d 01 |..@... 150,880..| 00000260 4a 1d c8 99 20 22 56 65 63 74 6f 72 5f 53 65 74 |J... "Vector_Set| 00000270 58 61 6e 67 6c 65 22 2c 78 61 25 0d 01 54 0b f2 |Xangle",xa%..T..| 00000280 73 71 75 61 72 65 0d 01 5e 07 e6 20 32 0d 01 68 |square..^.. 2..h| 00000290 0f c8 91 20 31 31 33 30 2c 38 38 30 0d 01 72 20 |... 1130,880..r | 000002a0 c8 99 20 22 56 65 63 74 6f 72 5f 53 65 74 58 61 |.. "Vector_SetXa| 000002b0 6e 67 6c 65 22 2c 78 61 25 2b 32 32 0d 01 7c 0b |ngle",xa%+22..|.| 000002c0 f2 73 71 75 61 72 65 0d 01 86 07 e6 20 33 0d 01 |.square..... 3..| 000002d0 90 0e c8 91 20 31 35 30 2c 31 34 30 0d 01 9a 20 |.... 150,140... | 000002e0 c8 99 20 22 56 65 63 74 6f 72 5f 53 65 74 58 61 |.. "Vector_SetXa| 000002f0 6e 67 6c 65 22 2c 78 61 25 2b 34 35 0d 01 a4 0b |ngle",xa%+45....| 00000300 f2 73 71 75 61 72 65 0d 01 ae 07 e6 20 34 0d 01 |.square..... 4..| 00000310 b8 0f c8 91 20 31 31 33 30 2c 31 34 30 0d 01 c2 |.... 1130,140...| 00000320 20 c8 99 20 22 56 65 63 74 6f 72 5f 53 65 74 58 | .. "Vector_SetX| 00000330 61 6e 67 6c 65 22 2c 78 61 25 2b 36 37 0d 01 cc |angle",xa%+67...| 00000340 0b f2 73 71 75 61 72 65 0d 01 d6 11 78 61 25 2b |..square....xa%+| 00000350 3d 38 3a 79 61 25 2b 3d 31 0d 01 e0 05 e1 0d 01 |=8:ya%+=1.......| 00000360 ea 05 3a 0d 01 f4 18 f4 20 44 72 61 77 20 66 69 |..:..... Draw fi| 00000370 6c 6c 65 64 20 73 71 75 61 72 65 0d 01 fe 05 3a |lled square....:| 00000380 0d 02 08 0c dd f2 73 71 75 61 72 65 0d 02 12 0e |......square....| 00000390 e3 20 74 25 3d 31 20 b8 20 33 0d 02 1c 48 c8 99 |. t%=1 . 3...H..| 000003a0 20 22 56 65 63 74 6f 72 5f 50 6c 6f 74 22 2c 70 | "Vector_Plot",p| 000003b0 6c 6f 74 25 28 74 25 29 2c 78 70 6f 73 25 28 74 |lot%(t%),xpos%(t| 000003c0 25 29 2a 73 63 61 6c 65 2c 79 70 6f 73 25 28 74 |%)*scale,ypos%(t| 000003d0 25 29 2a 73 63 61 6c 65 2c 7a 70 6f 73 25 28 74 |%)*scale,zpos%(t| 000003e0 25 29 0d 02 26 05 ed 0d 02 30 05 e1 0d 02 3a 05 |%)..&....0....:.| 000003f0 3a 0d 02 44 15 f4 20 44 61 74 61 20 66 6f 72 20 |:..D.. Data for | 00000400 73 71 75 61 72 65 0d 02 4e 05 3a 0d 02 58 28 dc |square..N.:..X(.| 00000410 20 34 2c 2d 35 30 2c 2d 35 30 2c 31 2c 34 2c 35 | 4,-50,-50,1,4,5| 00000420 30 2c 2d 35 30 2c 31 2c 31 31 37 2c 35 30 2c 35 |0,-50,1,117,50,5| 00000430 30 2c 31 0d ff |0,1..| 00000435