Drawing A Circle - The Circle Command - Commodore 128 System Manual

Table of Contents

Advertisement

Drawing a Circle — The CIRCLE command
To draw a circle, use the CIRCLE statement as follows:
60 CIRCLE 1,160,100,40,40
This displays a circle in the center of the screen. The CIRCLE
statement has nine parameters you can select to achieve various
types of circles and geometric shapes. For example, by changing
the numbers in the CIRCLE statement in line 60 you can obtain
different size circles or variations in the shape (e.g., an oval). The
CIRCLE statement adds power and versatility in programming
Commodore 128 graphics in BASIC. The meaning of the
numbers in the CIRCLE statement is explained under the CIRCLE
listing in Chapter V, BASIC 7.0 Encyclopaedia.
On your Commodore 128 screen, the point where X = 0 and Y = 0
is at the top left corner of the screen and is referred to as the
HOME position, ln standard geometry however, the point where X
and Y equal 0 is the bottom left corner of a graph. Figure 6-6
shows the arrangement of the X (horizontal) and Y (vertical)
screen coordinates and the four points at the corners of the C128
screen.
0,0
Y Coordinate
0,199
I---------------------------------------------------- 1 319,199
Figure 6-6. Arrangement of X and Y Coordinates
Here's what the numbers mean:
• 1 is the color source (in this case the foreground).
• 160 is the starting X (horizontal) coordinate.
• 100 is the starting Y (vertical) coordinate.
• 40 is the radius.
X Coordinate
319,0
6-9

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents