EasyManua.ls Logo

Sinclair QL - Page 86

Sinclair QL
135 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
A straight angle is 180 degrees or PI radians, so you can make a pattern of ellipses with the program:
100 FOR rot = 0 TO 2*PI STEP PI/6
110 CIRCLE 50,50,40,0.5,rot
120 END FOR rot
The order of the parameters for a circle or ellipse is:
centre _across, centre_up, height [eccentricity, angle]
The last two parameters are optional and this is indicated by putting them inside square brackets ([ ]).
Write a program which does the following:
1. Open a window 100x100 at (100,50)
2. Scale 100 in mode 8
3. Select black paper and clear window
4. Make green border 2 units wide
5. Draw a pattern of six coloured circles.
6. Close the window
100 REMark pattern
110 MODE 8
120 OPEN #7,scr_100x100a100x50
130 SCALE #7,100,0,0
140 PAPER #7,0 : CLS #7
150 BORDER #7,2,4
160 FOR colour = 1 TO 6
170 INK #7,colour
180 LET rot = 2*PI/colour
190 CIRCLE #7,50,50,30,0.5,rot
200 END FOR colour
210 CLOSE #7
You can get some interesting effects by altering the program. For example try the amendments:
160 FOR colour = 1 TO 100
180 LET rot = colour*PI/50
ARCS
If you want to draw an arc you need to decide:
starting point
end point

Other manuals for Sinclair QL

Related product manuals