Home » Archimedes archive » Archimedes World » AW-1994-01.adf » AWJan94 » !AWJan94/Goodies/Disc/Example_1/Polygon

!AWJan94/Goodies/Disc/Example_1/Polygon

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_1/Polygon
Read OK:
File size: 0211 bytes
Load address: 0000
Exec address: 0000
File contents
    1PROCList
    2LIBRARY "PathLib:OS_units.Paths"
    3polygon%=FNPath_CreateRegularPolygon(640,512,400,6)
    4FOR n%=1 TO 7
    5 GCOL n%
    6 SYS "Draw_Fill",polygon%
    7 x$=GET$
    8 NEXT
    9END
   10
   11DEF PROCList
   12MODE MODE
   13COLOUR 2
   14PRINT "EXAMPLE 1: Regular polygon of 6 sides" : PRINT
   15DATA LIBRARY "PathLib:OS_units.Paths"
   16DATA "polygon%=FNPath_CreateRegularPolygon(640,512,400,6)"
   17DATA "FOR n%=1 TO 7"
   18DATA " GCOL n%"
   19DATA " SYS ""Draw_Fill"",triangle%"
   20DATA " x$=GET$"
   21DATA "NEXT"
   22DATA "END"
   23COLOUR 1
   24FOR i%=1 TO 8 : READ x$ : PRINT x$ :NEXT
   25COLOUR 7
   26PRINT '"Press space bar!"
   27ENDPROC
	�List
ț "PathLib:OS_units.Paths"
6polygon%=�Path_CreateRegularPolygon(640,512,400,6)
� n%=1 � 7
	 � n%
 ș "Draw_Fill",polygon%
	 x$=�
 �
	�


� �List
� �

� 2
1� "EXAMPLE 1: Regular polygon of 6 sides" : �
&� LIBRARY "PathLib:OS_units.Paths"
;� "polygon%=FNPath_CreateRegularPolygon(640,512,400,6)"
� "FOR n%=1 TO 7"
� " GCOL n%"
$� " SYS ""Draw_Fill"",triangle%"
� " x$=GET$"
� "NEXT"
� "END"
� 1
� i%=1 � 8 : � x$ : � x$ :�
� 7
� '"Press space bar!"
�
�
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 36 70 6f 6c 79  |s.Paths"...6poly|
00000030  67 6f 6e 25 3d a4 50 61  74 68 5f 43 72 65 61 74  |gon%=.Path_Creat|
00000040  65 52 65 67 75 6c 61 72  50 6f 6c 79 67 6f 6e 28  |eRegularPolygon(|
00000050  36 34 30 2c 35 31 32 2c  34 30 30 2c 36 29 0d 00  |640,512,400,6)..|
00000060  04 0e e3 20 6e 25 3d 31  20 b8 20 37 0d 00 05 09  |... n%=1 . 7....|
00000070  20 e6 20 6e 25 0d 00 06  1c 20 c8 99 20 22 44 72  | . n%.... .. "Dr|
00000080  61 77 5f 46 69 6c 6c 22  2c 70 6f 6c 79 67 6f 6e  |aw_Fill",polygon|
00000090  25 0d 00 07 09 20 78 24  3d be 0d 00 08 06 20 ed  |%.... x$=..... .|
000000a0  0d 00 09 05 e0 0d 00 0a  04 0d 00 0b 0b dd 20 f2  |.............. .|
000000b0  4c 69 73 74 0d 00 0c 07  eb 20 eb 0d 00 0d 07 fb  |List..... ......|
000000c0  20 32 0d 00 0e 31 f1 20  22 45 58 41 4d 50 4c 45  | 2...1. "EXAMPLE|
000000d0  20 31 3a 20 52 65 67 75  6c 61 72 20 70 6f 6c 79  | 1: Regular poly|
000000e0  67 6f 6e 20 6f 66 20 36  20 73 69 64 65 73 22 20  |gon of 6 sides" |
000000f0  3a 20 f1 0d 00 0f 26 dc  20 4c 49 42 52 41 52 59  |: ....&. LIBRARY|
00000100  20 22 50 61 74 68 4c 69  62 3a 4f 53 5f 75 6e 69  | "PathLib:OS_uni|
00000110  74 73 2e 50 61 74 68 73  22 0d 00 10 3b dc 20 22  |ts.Paths"...;. "|
00000120  70 6f 6c 79 67 6f 6e 25  3d 46 4e 50 61 74 68 5f  |polygon%=FNPath_|
00000130  43 72 65 61 74 65 52 65  67 75 6c 61 72 50 6f 6c  |CreateRegularPol|
00000140  79 67 6f 6e 28 36 34 30  2c 35 31 32 2c 34 30 30  |ygon(640,512,400|
00000150  2c 36 29 22 0d 00 11 15  dc 20 22 46 4f 52 20 6e  |,6)"..... "FOR n|
00000160  25 3d 31 20 54 4f 20 37  22 0d 00 12 10 dc 20 22  |%=1 TO 7"..... "|
00000170  20 47 43 4f 4c 20 6e 25  22 0d 00 13 24 dc 20 22  | GCOL n%"...$. "|
00000180  20 53 59 53 20 22 22 44  72 61 77 5f 46 69 6c 6c  | SYS ""Draw_Fill|
00000190  22 22 2c 74 72 69 61 6e  67 6c 65 25 22 0d 00 14  |"",triangle%"...|
000001a0  10 dc 20 22 20 78 24 3d  47 45 54 24 22 0d 00 15  |.. " x$=GET$"...|
000001b0  0c dc 20 22 4e 45 58 54  22 0d 00 16 0b dc 20 22  |.. "NEXT"..... "|
000001c0  45 4e 44 22 0d 00 17 07  fb 20 31 0d 00 18 1f e3  |END"..... 1.....|
000001d0  20 69 25 3d 31 20 b8 20  38 20 3a 20 f3 20 78 24  | i%=1 . 8 : . x$|
000001e0  20 3a 20 f1 20 78 24 20  3a ed 0d 00 19 07 fb 20  | : . x$ :...... |
000001f0  37 0d 00 1a 19 f1 20 27  22 50 72 65 73 73 20 73  |7..... '"Press s|
00000200  70 61 63 65 20 62 61 72  21 22 0d 00 1b 05 e1 0d  |pace bar!"......|
00000210  ff                                                |.|
00000211