Circles - AMSTRAD CPC464 User Manual

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

Type in:
5 cls
1 0 p l o t 1 0 , 1 0
2 0 d r a w 1 0 , 3 9 0
3 0 d r a w 6 3 0 , 3 9 0
4 0 d r a w 6 3 0 , 1 0
5 0 d r a w 1 0 , 1 0
6 0 g o t o 1 0
run
Press [ESC] twice to break from this program.
Now add the following lines to the program, to draw a second rectangle inside the first. Type in:
6 0 p l o t 2 0 , 2 0
7 0 d r a w 2 0 , 3 8 0
8 0 d r a w 6 2 0 , 3 8 0
9 0 d r a w 6 2 0 , 2 0
1 0 0 d r a w 2 0 , 2 0
2 0 0 g o t o 1 0
run
Press [ESC] twice to break from this program.

CIRCLES

Circles can either be plotted or drawn. One method of forming a circle is to plot the x,y, co-ordinates
of each point on the circumference of a circle. Refer to the figure below and you will see that point p
on the circumference can be plotted using x and y co-ordinates. These are:
x = 1 9 0 * c o s ( a ) and y = 1 9 0 * s i n ( a )

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents