Im Magazin „8000 PLUS" wurde im Februar 1989 der folgende Artikel abgedruckt.
Ein BASIC-Programm des Spieles Spirograph

SPIROGRAPHIX

by Richard Cox
Program of the month is undoubtedly this computer emulation of the the famous Spirograph game. To see the program in action, simply load it in the usual way and wait while it gets itself sorted out (about 10-15 seconds). The screen will then display some values and a (*) prompt. Just type the letter d (for DRAW) followed by [RETURN] to draw your first design, which appears before your very eyes. Now just for practise, make it disappear by typing e for ERASE.
The display in the top left corner of the screen shows the values which govern the resulting design, and they can be changed at will, but first, here's what they mean.
Ring and Wheel:
These simply indicate the size of ring (the boundaries of the design) and the size of the imaginary wheel which rotates within the ring. Different combinations of ring and wheel will result in different shapes. To try this, type w48and [RETURN). This changes the wheel to size 48 - notice the display has changed. Now draw again with d, and the pattern will be different. The ring size may also be changed in the same way, e.g. type r105 w60 cd (cd clears the screen before drawing).
Hole:
This also governs the shape of the design. Generally, a larger hole number gives a less pointed design - you can try this by typing c h1 w60 d h5 d.
Tooth:
This governs the starting position for the design. Tooth 0 is at the top of the ring, tooth 1 is a little to the right moving clockwise around the ring. Again, try it with t0 cd t1 d. Changing the tooth rotates the pattern, as you can see.
Qalty (Quality):
This number should be set to between 5 and 15; it governs the distance between the dots of the patterns - high quality has dots very close together, but it takes longer to draw. Try c q6 d t8 q10 d and notice how the second pattern is denser. Remember to set the quality back to 6 with q6.
Xoff and Yoff :
These values simply position the centre of the ring. Increasing Xoff (x axis offset) moves the whole shape to the right, decreasing it moves the shape to the left; the Yoff (y axis offset) moves the shape up and down. Try c x0 d x1 d.
All the values can be changed by typing the first letter followed by a number. You can input one command at a time, e.g. 'h5', or input lots of commands at one go, e.g. r96 w50 t5 h3 cd h4.
To add 1 to any value, type the letter, then an ampersand -& - and then 1 , like this, t&1 , which will increase the tooth value 1. Similarly t&3 will increase it by 3, t&-5 will decrease it by 5, etc.. Any of the values may be changed in this way. To stop using the program, just type 'f' at the (*) prompt. To get back into CP/M, type SYSTEM.
Erasing:
To erase a shape that you have just drawn, use e'. You must make sure that the values are exactly the same as the ones used to draw the shape.
Multi-drawing:
And now the really powerful feature of SPIROGFX. Clear the screen with c, and draw a pattern with values of your choice (e.g. r96 w72 d). Now type the following: m6 ht&1 d. Watch what happens. The program draws six more
designs on lop of the first increasing the hole by one each time - with a very pretty result. The multi command is very versatile - again you can change any of the values on the display, try: r75 w60 h2 to x-49 y0 cdand wait for the pattern to be drawn. Now the multi command: m30 x&3 t&-1 d.
Miscellaneous:
Don't worry about getting near the edge of the screen - lines going off the edge will be clipped off.
Low quality (q5 or q6) often has a beauty of its own with pretty mottling effects in the middle of the pattern - it is also a good bit quicker than, say, q10. To stop drawing at any time, type [CAN] or ALT+H. To repeat a command, type 'a' (for AGAIN) at the (*) prompt. Letters may be typed in upper or lower case - thus t6 & T6 mean the same. Spaces may be used at will - you can use lots of spaces or none, it makes no difference, except that spaces make the command longer (but that is unlikely to matter).
The program has a few restrictions - the wheel must be smaller than the ring, wheels have only a limited number of holes (try minus ones), the smallest wheel is w5, and the quality must be at least q1. All the values except Ring, Wheel and Quality may be changed to minus ones, often with interesting effects. To obtain a printout of your masterpiece, press [EXTRA] and [PTR] for a screen dump.
[BASIC-Listing] und [Assembler-Listing]


HTML-Bearbeitung von Werner Cirsovius
Dezember 2014
© 8000 PLUS