Home » Archimedes archive » Archimedes World » AW-1994-01.adf » AWJan94 » !AWJan94/Goodies/Disc/Example_3/RotMag
!AWJan94/Goodies/Disc/Example_3/RotMag
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-1994-01.adf » AWJan94 |
Filename: | !AWJan94/Goodies/Disc/Example_3/RotMag |
Read OK: | ✔ |
File size: | 0495 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1PROCList 2LIBRARY "PathLib:OS_units.Paths" 3LIBRARY "PathLib:OS_units.Transforms" 4ORIGIN 640,512 5square%=FNPath_CreateSquare(0,0,100) 6PROCCreateTransform 7PROCDrawObjects 8END 9 10DEF PROCCreateTransform 11 PROCPath_CreateTransform(rotmag%) 12 PROCPath_Rotation(rotmag%,PI/16) 13 PROCPath_Magnify(rotmag%,1.05) 14ENDPROC 15 16DEF PROCDrawObjects 17 REPEAT 18 SYS "Draw_Stroke",square% 19 PROCPath_Transform(square%,rotmag%) 20 x$=GET$ 21 UNTIL FALSE 22ENDPROC 23 24DEF PROCList 25MODE MODE 26COLOUR 2 27PRINT "EXAMPLE 3: ROTATING and MAGNIFYING A SQUARE" : PRINT 28DATA LIBRARY "PathLib:OS_units.Paths" 29DATA LIBRARY "PathLib:OS_units.Transforms" 30DATA "ORIGIN 640,512" 31DATA "square%=FNPath_CreateSquare(0,0,100)" 32DATA "PROCCreateTransform" 33DATA "PROCDrawObjects" 34DATA "END" 35DATA "" 36DATA "DEF PROCCreateTransform" 37DATA " PROCPath_CreateTransform(rotmag%)" 38DATA " PROCPath_Rotation(rotmag%,PI/16)" 39DATA " PROCPath_Magnify(rotmag%,1.05)" 40DATA "ENDPROC" 41DATA "" 42DATA "DEF PROCDrawObjects" 43DATA " REPEAT" 44DATA " SYS ""Draw_Stroke"",square%" 45DATA " PROCPath_Transform(square%,rotmag%)" 46DATA " x$=GET$" 47DATA " UNTIL FALSE" 48DATA "ENDPROC" 49COLOUR 1 50FOR i%=1 TO 20 : READ x$ : PRINT x$ :NEXT 51COLOUR 7 52PRINT '"Press space bar! (ESC to finish)." 53ENDPROC 54
�List ț "PathLib:OS_units.Paths" $ț "PathLib:OS_units.Transforms" ȑ 640,512 'square%=�Path_CreateSquare(0,0,100) �CreateTransform �DrawObjects � � �CreateTransform # �Path_CreateTransform(rotmag%) ! �Path_Rotation(rotmag%,�/16) �Path_Magnify(rotmag%,1.05) � � �DrawObjects � ș "Draw_Stroke",square% & �Path_Transform(square%,rotmag%) x$=� � � � � �List � � � 2 7� "EXAMPLE 3: ROTATING and MAGNIFYING A SQUARE" : � &� LIBRARY "PathLib:OS_units.Paths" +� LIBRARY "PathLib:OS_units.Transforms" � "ORIGIN 640,512" ,� "square%=FNPath_CreateSquare(0,0,100)" � "PROCCreateTransform" !� "PROCDrawObjects" "� "END" #� "" $� "DEF PROCCreateTransform" %*� " PROCPath_CreateTransform(rotmag%)" &*� " PROCPath_Rotation(rotmag%,PI/16)" ''� " PROCPath_Magnify(rotmag%,1.05)" (� "ENDPROC" )� "" *� "DEF PROCDrawObjects" +� " REPEAT" ,%� " SYS ""Draw_Stroke"",square%" --� " PROCPath_Transform(square%,rotmag%)" .� " x$=GET$" /� " UNTIL FALSE" 0� "ENDPROC" 1� 1 2!� i%=1 � 20 : � x$ : � x$ :� 3� 7 4*� '"Press space bar! (ESC to finish)." 5� 6 �
00000000 0d 00 01 09 f2 4c 69 73 74 0d 00 02 1f c8 9b 20 |.....List...... | 00000010 22 50 61 74 68 4c 69 62 3a 4f 53 5f 75 6e 69 74 |"PathLib:OS_unit| 00000020 73 2e 50 61 74 68 73 22 0d 00 03 24 c8 9b 20 22 |s.Paths"...$.. "| 00000030 50 61 74 68 4c 69 62 3a 4f 53 5f 75 6e 69 74 73 |PathLib:OS_units| 00000040 2e 54 72 61 6e 73 66 6f 72 6d 73 22 0d 00 04 0e |.Transforms"....| 00000050 c8 91 20 36 34 30 2c 35 31 32 0d 00 05 27 73 71 |.. 640,512...'sq| 00000060 75 61 72 65 25 3d a4 50 61 74 68 5f 43 72 65 61 |uare%=.Path_Crea| 00000070 74 65 53 71 75 61 72 65 28 30 2c 30 2c 31 30 30 |teSquare(0,0,100| 00000080 29 0d 00 06 14 f2 43 72 65 61 74 65 54 72 61 6e |).....CreateTran| 00000090 73 66 6f 72 6d 0d 00 07 10 f2 44 72 61 77 4f 62 |sform.....DrawOb| 000000a0 6a 65 63 74 73 0d 00 08 05 e0 0d 00 09 04 0d 00 |jects...........| 000000b0 0a 16 dd 20 f2 43 72 65 61 74 65 54 72 61 6e 73 |... .CreateTrans| 000000c0 66 6f 72 6d 0d 00 0b 23 20 f2 50 61 74 68 5f 43 |form...# .Path_C| 000000d0 72 65 61 74 65 54 72 61 6e 73 66 6f 72 6d 28 72 |reateTransform(r| 000000e0 6f 74 6d 61 67 25 29 0d 00 0c 21 20 f2 50 61 74 |otmag%)...! .Pat| 000000f0 68 5f 52 6f 74 61 74 69 6f 6e 28 72 6f 74 6d 61 |h_Rotation(rotma| 00000100 67 25 2c af 2f 31 36 29 0d 00 0d 20 20 f2 50 61 |g%,./16)... .Pa| 00000110 74 68 5f 4d 61 67 6e 69 66 79 28 72 6f 74 6d 61 |th_Magnify(rotma| 00000120 67 25 2c 31 2e 30 35 29 0d 00 0e 05 e1 0d 00 0f |g%,1.05)........| 00000130 04 0d 00 10 12 dd 20 f2 44 72 61 77 4f 62 6a 65 |...... .DrawObje| 00000140 63 74 73 0d 00 11 06 20 f5 0d 00 12 1e 20 20 c8 |cts.... ..... .| 00000150 99 20 22 44 72 61 77 5f 53 74 72 6f 6b 65 22 2c |. "Draw_Stroke",| 00000160 73 71 75 61 72 65 25 0d 00 13 26 20 20 f2 50 61 |square%...& .Pa| 00000170 74 68 5f 54 72 61 6e 73 66 6f 72 6d 28 73 71 75 |th_Transform(squ| 00000180 61 72 65 25 2c 72 6f 74 6d 61 67 25 29 0d 00 14 |are%,rotmag%)...| 00000190 0a 20 20 78 24 3d be 0d 00 15 08 20 fd 20 a3 0d |. x$=..... . ..| 000001a0 00 16 05 e1 0d 00 17 04 0d 00 18 0b dd 20 f2 4c |............. .L| 000001b0 69 73 74 0d 00 19 07 eb 20 eb 0d 00 1a 07 fb 20 |ist..... ...... | 000001c0 32 0d 00 1b 37 f1 20 22 45 58 41 4d 50 4c 45 20 |2...7. "EXAMPLE | 000001d0 33 3a 20 52 4f 54 41 54 49 4e 47 20 61 6e 64 20 |3: ROTATING and | 000001e0 4d 41 47 4e 49 46 59 49 4e 47 20 41 20 53 51 55 |MAGNIFYING A SQU| 000001f0 41 52 45 22 20 3a 20 f1 0d 00 1c 26 dc 20 4c 49 |ARE" : ....&. LI| 00000200 42 52 41 52 59 20 22 50 61 74 68 4c 69 62 3a 4f |BRARY "PathLib:O| 00000210 53 5f 75 6e 69 74 73 2e 50 61 74 68 73 22 0d 00 |S_units.Paths"..| 00000220 1d 2b dc 20 4c 49 42 52 41 52 59 20 22 50 61 74 |.+. LIBRARY "Pat| 00000230 68 4c 69 62 3a 4f 53 5f 75 6e 69 74 73 2e 54 72 |hLib:OS_units.Tr| 00000240 61 6e 73 66 6f 72 6d 73 22 0d 00 1e 16 dc 20 22 |ansforms"..... "| 00000250 4f 52 49 47 49 4e 20 36 34 30 2c 35 31 32 22 0d |ORIGIN 640,512".| 00000260 00 1f 2c dc 20 22 73 71 75 61 72 65 25 3d 46 4e |..,. "square%=FN| 00000270 50 61 74 68 5f 43 72 65 61 74 65 53 71 75 61 72 |Path_CreateSquar| 00000280 65 28 30 2c 30 2c 31 30 30 29 22 0d 00 20 1b dc |e(0,0,100)".. ..| 00000290 20 22 50 52 4f 43 43 72 65 61 74 65 54 72 61 6e | "PROCCreateTran| 000002a0 73 66 6f 72 6d 22 0d 00 21 17 dc 20 22 50 52 4f |sform"..!.. "PRO| 000002b0 43 44 72 61 77 4f 62 6a 65 63 74 73 22 0d 00 22 |CDrawObjects".."| 000002c0 0b dc 20 22 45 4e 44 22 0d 00 23 08 dc 20 22 22 |.. "END"..#.. ""| 000002d0 0d 00 24 1f dc 20 22 44 45 46 20 50 52 4f 43 43 |..$.. "DEF PROCC| 000002e0 72 65 61 74 65 54 72 61 6e 73 66 6f 72 6d 22 0d |reateTransform".| 000002f0 00 25 2a dc 20 22 20 50 52 4f 43 50 61 74 68 5f |.%*. " PROCPath_| 00000300 43 72 65 61 74 65 54 72 61 6e 73 66 6f 72 6d 28 |CreateTransform(| 00000310 72 6f 74 6d 61 67 25 29 22 0d 00 26 2a dc 20 22 |rotmag%)"..&*. "| 00000320 20 20 50 52 4f 43 50 61 74 68 5f 52 6f 74 61 74 | PROCPath_Rotat| 00000330 69 6f 6e 28 72 6f 74 6d 61 67 25 2c 50 49 2f 31 |ion(rotmag%,PI/1| 00000340 36 29 22 0d 00 27 27 dc 20 22 20 50 52 4f 43 50 |6)"..''. " PROCP| 00000350 61 74 68 5f 4d 61 67 6e 69 66 79 28 72 6f 74 6d |ath_Magnify(rotm| 00000360 61 67 25 2c 31 2e 30 35 29 22 0d 00 28 0f dc 20 |ag%,1.05)"..(.. | 00000370 22 45 4e 44 50 52 4f 43 22 0d 00 29 08 dc 20 22 |"ENDPROC"..).. "| 00000380 22 0d 00 2a 1b dc 20 22 44 45 46 20 50 52 4f 43 |"..*.. "DEF PROC| 00000390 44 72 61 77 4f 62 6a 65 63 74 73 22 0d 00 2b 0f |DrawObjects"..+.| 000003a0 dc 20 22 20 52 45 50 45 41 54 22 0d 00 2c 25 dc |. " REPEAT"..,%.| 000003b0 20 22 20 20 53 59 53 20 22 22 44 72 61 77 5f 53 | " SYS ""Draw_S| 000003c0 74 72 6f 6b 65 22 22 2c 73 71 75 61 72 65 25 22 |troke"",square%"| 000003d0 0d 00 2d 2d dc 20 22 20 20 50 52 4f 43 50 61 74 |..--. " PROCPat| 000003e0 68 5f 54 72 61 6e 73 66 6f 72 6d 28 73 71 75 61 |h_Transform(squa| 000003f0 72 65 25 2c 72 6f 74 6d 61 67 25 29 22 0d 00 2e |re%,rotmag%)"...| 00000400 11 dc 20 22 20 20 78 24 3d 47 45 54 24 22 0d 00 |.. " x$=GET$"..| 00000410 2f 14 dc 20 22 20 55 4e 54 49 4c 20 46 41 4c 53 |/.. " UNTIL FALS| 00000420 45 22 0d 00 30 0f dc 20 22 45 4e 44 50 52 4f 43 |E"..0.. "ENDPROC| 00000430 22 0d 00 31 07 fb 20 31 0d 00 32 21 e3 20 69 25 |"..1.. 1..2!. i%| 00000440 3d 31 20 b8 20 20 32 30 20 3a 20 f3 20 78 24 20 |=1 . 20 : . x$ | 00000450 3a 20 f1 20 78 24 20 3a ed 0d 00 33 07 fb 20 37 |: . x$ :...3.. 7| 00000460 0d 00 34 2a f1 20 27 22 50 72 65 73 73 20 73 70 |..4*. '"Press sp| 00000470 61 63 65 20 62 61 72 21 20 28 45 53 43 20 74 6f |ace bar! (ESC to| 00000480 20 66 69 6e 69 73 68 29 2e 22 0d 00 35 05 e1 0d | finish)."..5...| 00000490 00 36 04 0d ff |.6...| 00000495