Home » Archimedes archive » Archimedes World » AW-1996-01-Disc2.adf » !Go-GoDemo_Go-GoDemo » Examples/Hexagons

Examples/Hexagons

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-1996-01-Disc2.adf » !Go-GoDemo_Go-GoDemo
Filename: Examples/Hexagons
Read OK:
File size: 01F9 bytes
Load address: 0000
Exec address: 0000
File contents

[ change these variables ]
size=10
x=3
y=3
Fill Yellow

JumpTo -65,-46
count=0
Repeat x*4

Repeat y
Hexagon size
Pen Up
Forward size*3.3
Pen Down
Next

Pen Up
Backward size*3.3*y
If count=0 Then NextRow1 size*1.1 Else NextRow2 size*1.1
If count=0 Then count=1 Else count=0
Pen Down
Next
#PROCEDURE Hexagon size
Repeat 6
Forward size
Right 360/6
Next
#PROCEDURE Nextrow1 size
Right 720/6
Forward size
Left 720/6
Forward size*2
#PROCEDURE Nextrow2 size
Left 720/6
Backward size
Right 720/6
Backward size*2
00000000  0a 0a 5b 20 63 68 61 6e  67 65 20 74 68 65 73 65  |..[ change these|
00000010  20 76 61 72 69 61 62 6c  65 73 20 5d 0a 73 69 7a  | variables ].siz|
00000020  65 3d 31 30 0a 78 3d 33  0a 79 3d 33 0a 46 69 6c  |e=10.x=3.y=3.Fil|
00000030  6c 20 59 65 6c 6c 6f 77  0a 0a 4a 75 6d 70 54 6f  |l Yellow..JumpTo|
00000040  20 2d 36 35 2c 2d 34 36  0a 63 6f 75 6e 74 3d 30  | -65,-46.count=0|
00000050  0a 52 65 70 65 61 74 20  78 2a 34 0a 0a 52 65 70  |.Repeat x*4..Rep|
00000060  65 61 74 20 79 0a 48 65  78 61 67 6f 6e 20 73 69  |eat y.Hexagon si|
00000070  7a 65 0a 50 65 6e 20 55  70 0a 46 6f 72 77 61 72  |ze.Pen Up.Forwar|
00000080  64 20 73 69 7a 65 2a 33  2e 33 0a 50 65 6e 20 44  |d size*3.3.Pen D|
00000090  6f 77 6e 0a 4e 65 78 74  0a 0a 50 65 6e 20 55 70  |own.Next..Pen Up|
000000a0  0a 42 61 63 6b 77 61 72  64 20 73 69 7a 65 2a 33  |.Backward size*3|
000000b0  2e 33 2a 79 0a 49 66 20  63 6f 75 6e 74 3d 30 20  |.3*y.If count=0 |
000000c0  54 68 65 6e 20 4e 65 78  74 52 6f 77 31 20 73 69  |Then NextRow1 si|
000000d0  7a 65 2a 31 2e 31 20 45  6c 73 65 20 4e 65 78 74  |ze*1.1 Else Next|
000000e0  52 6f 77 32 20 73 69 7a  65 2a 31 2e 31 0a 49 66  |Row2 size*1.1.If|
000000f0  20 63 6f 75 6e 74 3d 30  20 54 68 65 6e 20 63 6f  | count=0 Then co|
00000100  75 6e 74 3d 31 20 45 6c  73 65 20 63 6f 75 6e 74  |unt=1 Else count|
00000110  3d 30 0a 50 65 6e 20 44  6f 77 6e 0a 4e 65 78 74  |=0.Pen Down.Next|
00000120  0a 23 50 52 4f 43 45 44  55 52 45 20 48 65 78 61  |.#PROCEDURE Hexa|
00000130  67 6f 6e 20 73 69 7a 65  0a 52 65 70 65 61 74 20  |gon size.Repeat |
00000140  36 0a 46 6f 72 77 61 72  64 20 73 69 7a 65 0a 52  |6.Forward size.R|
00000150  69 67 68 74 20 33 36 30  2f 36 0a 4e 65 78 74 0a  |ight 360/6.Next.|
00000160  23 50 52 4f 43 45 44 55  52 45 20 4e 65 78 74 72  |#PROCEDURE Nextr|
00000170  6f 77 31 20 73 69 7a 65  0a 52 69 67 68 74 20 37  |ow1 size.Right 7|
00000180  32 30 2f 36 0a 46 6f 72  77 61 72 64 20 73 69 7a  |20/6.Forward siz|
00000190  65 0a 4c 65 66 74 20 37  32 30 2f 36 0a 46 6f 72  |e.Left 720/6.For|
000001a0  77 61 72 64 20 73 69 7a  65 2a 32 0a 23 50 52 4f  |ward size*2.#PRO|
000001b0  43 45 44 55 52 45 20 4e  65 78 74 72 6f 77 32 20  |CEDURE Nextrow2 |
000001c0  73 69 7a 65 0a 4c 65 66  74 20 37 32 30 2f 36 0a  |size.Left 720/6.|
000001d0  42 61 63 6b 77 61 72 64  20 73 69 7a 65 0a 52 69  |Backward size.Ri|
000001e0  67 68 74 20 37 32 30 2f  36 0a 42 61 63 6b 77 61  |ght 720/6.Backwa|
000001f0  72 64 20 73 69 7a 65 2a  32                       |rd size*2|
000001f9