★ APPLICATIONS ★ PROGRAMMATION ★ Round and round ★ |
Graphic - Draw Really Fast Circles On Your Amstrad (Popular Computing Weekly) | Applications Programmation |
Draw really fast circles on your Amstrad with the help of B J Wathelet There have been several routines published already about drawing fast circles on the Amstrad. . . but these are really fast! They work by first Pokeing the coordinates of a given 90 degree arc and then Drawing the complete shape from machine memory. Both programs are quite memory consuming but can be shortened considerably in actual use. They are shown here with safeguards to prevent crashing and to demonstrate how they work. With Program One set any Mode,Run and the screen will clear as values are Poked. x%&y% are integers 0-255 and st= 9 is about the best for quick circles/ ellipses, although any value can be tried to give squares, octagons etc. Once the values have been Poked and the circle or what-ever Drawn, subsequent Run commands skip straight to the Draw section of the routine. Moving the Origin means, of course, that the shape can be Drawn any number of times anywhere on the screen. All that really differs between Program Two and the first listing is in the Draw routine. Here, step st must be smaller by several times. This routine (as 1) sets the variables to suit, and Pokes then Draws, filling the shape from left to right. If, in either program, you break whilst values are being Poked, strange things may happen when the program is run. If this does occur, reset the memory by entering variables for a larger shape in Mode 2. Program One - Circles
100 Sets variable, Deg mode & Origin Program Two - Discs 100 As 1 but branches up to 240 to set the step size to ensure that all lines are drawn adjacent to each other.
|