CIRCLES in BBC BASIC
You can "select, copy, paste" the programs
on this page into
"BB4W"(BBC BASIC for WINDOWS) using the method
shown here
A circle is easily plotted in BB4W (BBC Basic for Windows) using a programlet
such as the following:
MODE8:OFF
CIRCLE 640,512,400
However, if we later wish to draw a spiral, it is necessary to start
from a circle drawing program such as :
MODE8:OFF
ORIGIN 640,512
R=300
PLOT69,0,0
MOVE R,0
FOR t=0 TO 360
DRAW R*COSRADt,R*SINRADt
delay=INKEY(1)
NEXT
Here:
- R is the radius of the circle
- t is the angle at the centre of the circle in degrees( measured
anticlockwise from the right horizontal position)
- RAD converts t into Radians (required before COSine and SINe can
be computed)
- delay is required so that you can see what is going on!
- OFF turns off the flashing cursor
- ORIGIN here specifies the graphics origin to be in the centre of
the screen
- MOVE here avoids a line being drawn from the centre to the start
of the circle
Try changing a few of the parameters and see the effects (eg make
R=something else). That's the way to "get a feel" for what is happening.
Here is a further program which will introduce
you to applying colours, variable delays, and parameter display.
Richard Weston's Home Page