Popular Computing Weekly 15/07/1982 Page 23

Spectrum Programming

Seeing curves where none really exist

Malcolm Davison explains how to draw a curve that is not really there.

While the Spectrum's CIRCLE instruction neatly draws an outline circle, drawing
a solid circle of colour is not so straightforward. However, this program does
the job.

Attractive designs may be created by introducing new co-ordinates, new circle
radii and changing the ink colours. To make this easier, you should add line 210
GOTO 4 and introduce an input for the INK colour.

Note this program does not appear to work.

Incidentally, it takes approximately 30 seconds to draw a 50 pixel circle, which
shows how slow the Spectrum is.

The second program does make use of the Spectrum's Circle facility. It will
print an array of circles with a black border and a white ink on a blue
background. If you add line 6 CLS the Spectrum will lock on to the correct
colours when the program is first RUN.

With a bit of practice, it should be quite easy to produce the Olympic Games
symbol.

See program "Circle"

The final program is based on an old idea to brighten up school geometry
lessons. This program deceives the eye into seeing curves where none actually
exist. The lines are black on a cyan background with a black border, but these
can be changed to suit your own taste. A CLS command on line 3 would be a
useful though not essential addition.

See program "Curves"