Line 250 starts a loop to calculate the points on the curve. Since
BASIC uses radian measure for angles, the value of ANGLE goes
from 0 to just over 360 degrees, slightly more than a full circle (to
ensure that there is no gap at the end). The step value must be
small enough that the curve appears smooth, and not as a series
of straight lines.
Lines 260 and 270 calculate the X and Y coordinates of each
point on the curve (X2 and Y2).
The routine in lines 310-380 creates a line between point Xl,
Yl and point X2, Y2. The routine calculates how many points
need to be plotted so that no possible points are missed. Then,
for each required point, the routine in lines 420-480 adds the
points to the image in memory.
Line 310 calculates the horizontal and vertical projected lengths
of the line. Lines 320 and 330 calculate the number of steps re-
quired in each direction so that no dots are missed. Line 340
selects the larger number of steps to use in plotting the line. Line
350 skips the rest of the routine if no steps are required.
Line 360 calculates the change in the X and Y coordinates for
each step, and line 370 starts a loop to plot the points.
Line 380 advances the position of point Xl, Yl along the line to
be plotted, using the rates of change calculated in line 360. Line
420 relates the point Xl, Yl to the actual dot coordinates. Lines
430 and 440 calculate the element in the array BUFFER%( ) that is
to be changed, and line 450 determines which bit is to be set.
Line 460 turns on a particular dot in the array in memory. The
selected element of the array is OR’ed with the value of the pin
that is to print (contained in the vector array DOT%( )). The OR
function is used to prevent problems in the case of the same dot
being set twice.
The procedure for creating printing dots is repeated for the
length of the line, and then the value of ANGLE is incremented
and the procedure is repeated until the figure is complete.
82
Summary of Contents for SQ-2000
Page 1: ...EPSON SQ 2000 Printer Operating Manual ...
Page 143: ...Proportional normal continued C 3 ...
Page 144: ...Proportional normal continued C 4 ...
Page 145: ...Proportional normal continued C 5 ...
Page 146: ...Proportional superscript subscript C 6 ...
Page 147: ...Proportional superscript subscript continued C 7 ...
Page 148: ...Proportional superscript subscript continued C 8 ...
Page 177: ......
Page 180: ......