Home » Archimedes archive » Acorn User » AU 1994-08.adf » !Education_Education » Control/!Control/Dir/Logo/Answers2

Control/!Control/Dir/Logo/Answers2

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 » Acorn User » AU 1994-08.adf » !Education_Education
Filename: Control/!Control/Dir/Logo/Answers2
Read OK:
File size: 0314 bytes
Load address: 0000
Exec address: 0000
File contents
1. Roman Key. This shape should be constructed as a procedure called, for example, KEY. Once done it can be called any number of times to produce a row of Keys. They can then be extended to create a frame of Keys. By rotating each successive key through, say, 10� it will make a circular frame of Keys.

FORWARD 16
RIGHT 90
FORWARD 16
RIGHT 90
FORWARD 8
RIGHT 90
FORWARD 8
LEFT 90
FORWARD 8
LEFT 90
FORWARD 16
LEFT 90

The last left turn is vital to ensure the turtle is in the correct position to begin the next Key.


2. Squares. This is 36 squares, each rotated by 1/36th of a circle - in other words 10�. Note the nested REPEATs. The inner one draws the squares.

REPEAT 36
 REPEAT 4
  FORWARD 100
  RIGHT 90
 END
LEFT 10
END

or 

REPEAT 36 [REPEAT 4 [FORWARD 100 RIGHT 90] LEFT 10]
00000000  31 2e 20 52 6f 6d 61 6e  20 4b 65 79 2e 20 54 68  |1. Roman Key. Th|
00000010  69 73 20 73 68 61 70 65  20 73 68 6f 75 6c 64 20  |is shape should |
00000020  62 65 20 63 6f 6e 73 74  72 75 63 74 65 64 20 61  |be constructed a|
00000030  73 20 61 20 70 72 6f 63  65 64 75 72 65 20 63 61  |s a procedure ca|
00000040  6c 6c 65 64 2c 20 66 6f  72 20 65 78 61 6d 70 6c  |lled, for exampl|
00000050  65 2c 20 4b 45 59 2e 20  4f 6e 63 65 20 64 6f 6e  |e, KEY. Once don|
00000060  65 20 69 74 20 63 61 6e  20 62 65 20 63 61 6c 6c  |e it can be call|
00000070  65 64 20 61 6e 79 20 6e  75 6d 62 65 72 20 6f 66  |ed any number of|
00000080  20 74 69 6d 65 73 20 74  6f 20 70 72 6f 64 75 63  | times to produc|
00000090  65 20 61 20 72 6f 77 20  6f 66 20 4b 65 79 73 2e  |e a row of Keys.|
000000a0  20 54 68 65 79 20 63 61  6e 20 74 68 65 6e 20 62  | They can then b|
000000b0  65 20 65 78 74 65 6e 64  65 64 20 74 6f 20 63 72  |e extended to cr|
000000c0  65 61 74 65 20 61 20 66  72 61 6d 65 20 6f 66 20  |eate a frame of |
000000d0  4b 65 79 73 2e 20 42 79  20 72 6f 74 61 74 69 6e  |Keys. By rotatin|
000000e0  67 20 65 61 63 68 20 73  75 63 63 65 73 73 69 76  |g each successiv|
000000f0  65 20 6b 65 79 20 74 68  72 6f 75 67 68 2c 20 73  |e key through, s|
00000100  61 79 2c 20 31 30 b0 20  69 74 20 77 69 6c 6c 20  |ay, 10. it will |
00000110  6d 61 6b 65 20 61 20 63  69 72 63 75 6c 61 72 20  |make a circular |
00000120  66 72 61 6d 65 20 6f 66  20 4b 65 79 73 2e 0a 0a  |frame of Keys...|
00000130  46 4f 52 57 41 52 44 20  31 36 0a 52 49 47 48 54  |FORWARD 16.RIGHT|
00000140  20 39 30 0a 46 4f 52 57  41 52 44 20 31 36 0a 52  | 90.FORWARD 16.R|
00000150  49 47 48 54 20 39 30 0a  46 4f 52 57 41 52 44 20  |IGHT 90.FORWARD |
00000160  38 0a 52 49 47 48 54 20  39 30 0a 46 4f 52 57 41  |8.RIGHT 90.FORWA|
00000170  52 44 20 38 0a 4c 45 46  54 20 39 30 0a 46 4f 52  |RD 8.LEFT 90.FOR|
00000180  57 41 52 44 20 38 0a 4c  45 46 54 20 39 30 0a 46  |WARD 8.LEFT 90.F|
00000190  4f 52 57 41 52 44 20 31  36 0a 4c 45 46 54 20 39  |ORWARD 16.LEFT 9|
000001a0  30 0a 0a 54 68 65 20 6c  61 73 74 20 6c 65 66 74  |0..The last left|
000001b0  20 74 75 72 6e 20 69 73  20 76 69 74 61 6c 20 74  | turn is vital t|
000001c0  6f 20 65 6e 73 75 72 65  20 74 68 65 20 74 75 72  |o ensure the tur|
000001d0  74 6c 65 20 69 73 20 69  6e 20 74 68 65 20 63 6f  |tle is in the co|
000001e0  72 72 65 63 74 20 70 6f  73 69 74 69 6f 6e 20 74  |rrect position t|
000001f0  6f 20 62 65 67 69 6e 20  74 68 65 20 6e 65 78 74  |o begin the next|
00000200  20 4b 65 79 2e 0a 0a 0a  32 2e 20 53 71 75 61 72  | Key....2. Squar|
00000210  65 73 2e 20 54 68 69 73  20 69 73 20 33 36 20 73  |es. This is 36 s|
00000220  71 75 61 72 65 73 2c 20  65 61 63 68 20 72 6f 74  |quares, each rot|
00000230  61 74 65 64 20 62 79 20  31 2f 33 36 74 68 20 6f  |ated by 1/36th o|
00000240  66 20 61 20 63 69 72 63  6c 65 20 2d 20 69 6e 20  |f a circle - in |
00000250  6f 74 68 65 72 20 77 6f  72 64 73 20 31 30 b0 2e  |other words 10..|
00000260  20 4e 6f 74 65 20 74 68  65 20 6e 65 73 74 65 64  | Note the nested|
00000270  20 52 45 50 45 41 54 73  2e 20 54 68 65 20 69 6e  | REPEATs. The in|
00000280  6e 65 72 20 6f 6e 65 20  64 72 61 77 73 20 74 68  |ner one draws th|
00000290  65 20 73 71 75 61 72 65  73 2e 0a 0a 52 45 50 45  |e squares...REPE|
000002a0  41 54 20 33 36 0a 20 52  45 50 45 41 54 20 34 0a  |AT 36. REPEAT 4.|
000002b0  20 20 46 4f 52 57 41 52  44 20 31 30 30 0a 20 20  |  FORWARD 100.  |
000002c0  52 49 47 48 54 20 39 30  0a 20 45 4e 44 0a 4c 45  |RIGHT 90. END.LE|
000002d0  46 54 20 31 30 0a 45 4e  44 0a 0a 6f 72 20 0a 0a  |FT 10.END..or ..|
000002e0  52 45 50 45 41 54 20 33  36 20 5b 52 45 50 45 41  |REPEAT 36 [REPEA|
000002f0  54 20 34 20 5b 46 4f 52  57 41 52 44 20 31 30 30  |T 4 [FORWARD 100|
00000300  20 52 49 47 48 54 20 39  30 5d 20 4c 45 46 54 20  | RIGHT 90] LEFT |
00000310  31 30 5d 0a                                       |10].|
00000314