Abstract:
A new and improved straight line coordinates generator to determine and generate the coordinates of a group of lattice points [P k  (k=1, 2, . . . , n-1)] to simulate an actual line defined by connecting the two lattice points P O  (X o , Y o ) and P n  (X n , Y n ), on a secondary coordinates face comprises registers, adders, comparators, a clock generator gate circuit, X-coordinate counter for determining X-coordinate values, Y-coordinate counter for determining Y-coordinate values, an initializing device for setting the registers with initial normalizing values and a generator for sequentially generating each X and Y coordinate of the lattice points to simulate the line. The circuit arrangement of the straight line coordinates generator is simplified by eliminating the need for decimal points in determining the coordinates of the lattice points to be lightened or highlighted to form the simulated line.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a straight line coordinates generator, and more particularly to a device which generates coordinates for a group of lattice points to simulate a straight line connecting two points. 
     2. Description of the Prior Art 
     The raster scan type graphic display device using a CRT monitor performs some basic operations to write a straight line connecting two points on the screen. The CRT monitor shoots an electron beam on the fluorescent screen to lighten predefined lattice points. Therefore, the raster scan type CRT monitor is principally limited to use of the predefined lattice points along its horizontal and vertical scan lines to generate a straight line between the two points, by defining the group of lattice points which must be lightened. When the CRT monitor displays a straight line, defined by the equation y=(Y/Z)x+a, connecting two points P 0  and P n , it needs to simulate the line by continuously lightening the lattice points closest to the actual line. Therefore, the monitor must be provided with all of the coordinates of the group of lattice points to lighten in order to simulate the actual line. 
     In general, a secondary coordinates face is considered to have a group of lattice points spaced a constant one unit distance from each other. A simulated lattice point has a position x=x k  on the line which is the nearest lattice point position corresponding to the actual position x=x k  on the line y=(Y/X)x+a within the group of lattice points on the Y axis in the position x=x k . Therefore, as shown in FIG. 1 to simulate position Q on the corresponding line y=(Y/X)x+a to the position x=x k , the lattice point P k  (x k , y k ) must be selected from one of the two points P or P&#39; whichever is nearest to the position Q on the Y axis. When the position Q is closer to the point P it becomes the simulated point P k , while when the position Q is closer to the point P&#39;, it becomes the simulated point P k . If the Y coordinate of the position Q is y and if the Y coordinates of the two points P and P&#39; are n and n+1 respectively wherein n is an integer, the Y coordinate y k  of the lattice point P k  (x k , y k ) to simulate the position Q on the line y=(Y/X)x+a corresponding to the line x=x k  is determined by the following equations. 
     
         if n≦y&lt;n+1/2 y.sub.k =n                             (1) 
    
     
         if n+1/2≦y≦n+1 y.sub.k =n+1                  (2) 
    
     The above equations define that the simulated point P k  will be the point P if the position Q is between the point P and a point midway between the points P and P&#39;, so called the comparative point, and that the simulated point P k  will be the point P&#39; if the position Q is between the point P&#39; and the comparative point. In FIG. 1 it is apparent that the point P&#39; becomes the simulated point P k . 
     A more detailed method to define each coordinate (x k , y k ) of the group of the lattice points [P k  (k=1, 2, . . . , n-1)] simulating the line y=(Y/K)x+a(0≦Y/K≦1) to connect the given two points P 0  and P n  will be explained hereinafter. If the slope Y/X is defined such that 0≦Y/x≦1, the Y coordinate of the next lattice point to the previously defined lattice point on the Y axis (assuming the X coordinate of the next lattice point is a positive one unit greater than the X coordinate of the previously defined lattice point) will be either equal to or will be one unit greater than the Y coordinate of the previously defined lattice point. Namely, if the coordinates of the previously defined lattice point are (x.sub.(k-1), y.sub.(k-1)), the coordinates (x k , y k ) of the next lattice point P k  are one of the following set of coordinates: 
     
         x.sub.k =x.sub.(k-1) +1, y.sub.k =y.sub.(k-1)              ( 3) 
    
     
         x.sub.k =x.sub.(k-1) +1, y.sub.k =y.sub.(k-1) +1           (4) 
    
     If any coordinate of the group of the lattice points which simulate the line requires movement along the X axis in the negative direction, the sign may be changed to minus instead of plus. 
     The following explanation herein assumes the lattice points will only require movement along the X axis in the positive direction. The next lattice point P k  to be required is on the Y axis whose X coordinate is x=x k . If the Y coordinate has a true value f k  on the line at x=x k , it might satisfy the equation y.sub.(k-1) ≦f k  ≦y.sub.(k-1) +1. The Y coordinate y.sub.(k-1) of the new lattice point P.sub.(k-1) corresponds to the n of the equations (1) and (2), and the f k  also corresponds to the y. Instead of the equations (1) and (2) it can also be expressed as follows: 
     
         if y.sub.(k-1) ≦f.sub.k ≦y.sub.(k-1) +1/2 y.sub.k =y.sub.(k-1)                                              ( 5) 
    
     
         if y.sub.(k-1)+1/2≦f.sub.k ≦y.sub.(k-1) +1 y.sub.k =y.sub.(k-1) +1                                           (6) 
    
     As explained above, where the f k  satisfies the equation y.sub.(k-1) ≦f k  ≦y.sub.(k-1) +1, it is necessary to know whether f k  is smaller or larger than y.sub.(k-1) +1/2 in order to determine the Y coordinate of the point P k . 
     
         if f.sub.k &lt;y.sub.(k-1) +1/2 y.sub.k =y.sub.(k-1)          ( 7) 
    
     
         if f.sub.k ≦y.sub.(k-1) +1/2 y.sub.k =y.sub.(k-1) +1 (8) 
    
     Now if the term gk is introduced as follows: 
     
         g.sub.(k-1) =y.sub.(k-1) +1/2                              (9) 
    
     Then the equations (7) and (8) become 
     
         if f.sub.k &lt;g.sub.(k-1) y.sub.k =y.sub.(k-1)               ( 10) 
    
     
         if f.sub.k ≦g.sub.(k-1) y.sub.k =y.sub.(k-1) +1     (11) 
    
     The term g.sub.(k-1) is called the comparative value of the comparative point C k  at x=x k . 
     It is apparent as mentioned above that if it is necessary to generate all of the coordinates (x k , y k ) of the group of the lattice points [P k  (k=1, 2 . . . n-1)] to simulate the line y=(Y/X)x+a(0≦Y/X≦1) connecting the given two points P 0  and P n , the value f k  of the Y coordinates on the line at x=x k  and the comparative value g.sub.(k-1) of the comparative point C k  at x=x k  may be compared to test if f k  is larger or smaller than g.sub.(k-1). It is apparent herein from the equation (9) that the comparative value g.sub.(k-1) is equal to the value of the Y coordinate y.sub.(k-1) of the previous simulated lattice point P.sub.(k-1) with 1/2 added to it. 
     In view of the aforementioned explanation, the determination of the straight line coordinates, by the prior art will be discussed hereunder. For example, the coordinates (x k , y k ) of a group of lattice points [P k  (k=1, 2 . . . 5)] to simulate a line represented by the equation y=(1/3)x connecting two points P 0  (0, 0) and P 6  (6, 2) may be required. The following Table 1 shows the values of the x k , y k , f k , and g k  from the start point P 0  (0, 0) to the point P 6  (6,2), adding one to the X coordinates step by step. 
     
                       TABLE 1______________________________________k       0      1       2     3    4     5     6______________________________________x.sub.k 0      1       2     3    4     5     6y.sub.k 0      0       1     1    1     2     2f.sub.k 0      1/3     2/3   1    4/3   5/3   2(=1/3 x.sub.k) =0.333  =0.666     =1.333                                   =1.666g.sub.k 1/2    1/2     3/2   3/2  3/2   5/2   5/2(=y.sub.k +1/2)   =0.5   =0.5    =1.5  =1.5 =1.5  =2.5  =2.5______________________________________ 
    
     Referring to Table 1 and to FIG. 2 P 0  is the starting point, with the coordinates (x 0 , y 0 ) having the respective values (0, 0). The comparative value g 0  is g 0  =Y 0  +1/2=0+0.5=0.5. The comparative value g 0  (=0.5) is a Y coordinate of a comparative point c 1  of a true value f 1  on the line x 1  =1 at requiring the next lattice point P 1 . 
     The true value f 1  at x 1  =1 is f 1  =(1/3)x 1  =1/3=0.333. In the case where f 1&lt;g   0 , it is apparent from the equation (10) and FIG. 2 that y 1  =y 0  =0. Namely, the coordinates (x 1 ,Y 1 ) of the succeeding lattice point P 1  from the point P 0  to simulate the line y=(1/3)x. 
     Next, the comparative value g 1  is determined to be g 1  =y 1  +1/2=0+0.5=0.5. 
     The coordinates (x 2 , y 2 ) of the next lattice point P 2  at x 2  =2 must be determined. The true value f 2  at x 2  =2 is f 2  =(1/3)x 2  =(1/3)X 2  2/3=0.666. In this case where f 2  &gt;g 1 , it is apparent from the equation (11) and FIG. 2 that y 2  =y 1  +1=0+1=1. The comparative value g 2  is determined to be g 2  =y 2  +1/2=1+0.5=1.5. It should be noted that the coordinates of the lattice points P 3  through P 5  at x 3  (=3) x 5  (=5) must be determined in the same manner as explained above and as shown in FIG. 2. 
     As can be seen from the above said explanation the straight line coordinates generator of the prior art requires a decimal point to ascertain the true value f k  and the comparative value g k  and further to compare the decimal values including decimal points of f k  with g k . For these reasons, the straight line coordinates generator circuits must have analog circuits, for instance integrators, to process decimal points. However, it is well known that these analog circuits are complicated, expensive and very slow to process. Although there are some methods which use a microprocessor to process the intelligent functions in firmware, they have proven to be slower than using the analog circuits for processing. 
     SUMMARY OF THE INVENTION 
     It is therefore the principal object of this invention to provide a straight line coordinates generator using digital circuits to generate a line more efficiently and rapidly. 
     It is another object of this invention to provide a straight line coordinates generator using digital circuits to generate all the coordinates for a group of lattice points to simulate a straight line connecting two given points. 
     It is still another object of the invention to provide a straight line coordinates generator using digital circuits which can handle whole numbers or integers, utilizing less numbers of bits. 
     In order to obtain the above objects the straight line coordinates generator to determine coordinates of a group of lattice points [P k  (k=1,2 . . . , n-1)] for simulating a line to connect two lattice points P 0  (x 0 ,y 0 ) and P n  (x n , y n ) on a secondary coordinates face comprises a first adder, a (2Y) register which supplies the first adder with a first input, an (F k ) register which supplies the first adder with a second input and stores the result from the first adder in synchronization with a first clock signal, a second adder, a (2X) register which supplies the second adder with a first input, a (G k ) register which supplies the second adder with a second input and stores the result from the second adder in synchronization with a second clock signal, a comparator to compare the stored contents of the G k  register with an added result of the first adder, a clock circuit for generating a basic clock signal, a gate circuit which generates the first clock signal from the basic clock signal and a second clock signal in response to the comparator, an (X k ) counter to count in synchronization with the first clock signal, a (Y k ) counter to count in synchronization with the second clock signal output from the gate circuit, and an initializing means for setting the (2Y) register, the (F k ) register, the (G k ) register, the (X k ) counter and the (Y k ) counter with initial values to eliminate decimal points; and a generator device for sequentially generating all of the coordinates of the group of lattice points to simulate the line from the (X k ) counter and the (Y k ) counter respectively, after initialization. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Various other objects, features and attendant advantages of the present invention will be more fully appreciated as the same becomes better understood from the following detailed description when considered in connection with the accompanying drawings in which like reference characters designate like or corresponding parts throughout the several views and wherein: 
     FIG. 1 is a partial view of a secondary axes face having a group of lattice points for explaining the principles of straight line generation. 
     FIG. 2 is a partial view of the secondary axes face of FIG. 1. 
     FIG. 3 is a block diagram of one embodiment of the present invention. 
     FIG. 4 is the timing chart for the block diagram of FIG. 3. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to the drawings, and more particularly to FIG. 1 and FIG. 2, the principle of the present invention will first be explained hereinafter. First, it is necessary to compare the true value f k  of the Y coordinates on the straight line x=x k  with the comparative value g.sub.(k-1) of the comparative point C k  at x=x k  in order that all of the coordinates for the group of the lattice points may be determined to the line y=(Y/X)x+a connecting the two points P 0  to P n , as explained above. Although the true value f k  is possible to define as f k  =(Y/X)x k  +a, the hardware to multiply the X coordinate by the slope each time the x-coordinate is transferred one becomes too complicated. Therefore, the true value should be determined as follows: 
     The Y coordinate is f.sub.(k-1) =(Y/X)x k  -1+a on the line at x=x k  -1. Then f k  -f.sub.(k-1) =(Y/X)(x k  -(x k  -1))=Y/X. Namely, 
     
         f.sub.k =f.sub.(k-1) +(Y/X)                                (12) 
    
     The true value f k  can be determined only by addition as shown in the above equation (12) if the true value f.sub.(k-1) is determined when defining the lattice point P.sub.(k-1) and is latched. The comparison of f k  with g.sub.(k-1) determines whether the position of the line y=(Y/X)x+a at x=x k  is above the comparative point C k . However, if it is possible to test the position of the line by other methods it is not necessary to compare f k  and g.sub.(k-1). Therefore it is considered that a true value f k  &#39; is the distance along the Y axis at x=x k  between the position of the line and the initial point P 0  and that a true value g.sub.(k-1) &#39; is the distance along the Y axis at x=x k  between the comparative point C k  and the initial point P 0 . In this case it is apparent that the true value g0&#39; of the comparative point C 0  at x=x 0  is: 
     
         g.sub.0 &#39;=1/2                                              (13) 
    
     It is also apparent the true value f 0  &#39; at x=x 0  is: 
     
         f.sub.0 &#39;=0                                                (14) 
    
     If the line starts from the point P 0  (x 0 , y 0 ), the Y coordinate can be analyzed from the equations (10) and (11) as follows: 
     
         if f.sub.k &#39;&lt;g.sub.(k-1) &#39; y.sub.k =y.sub.(k-1)            (15) 
    
     
         if f.sub.k &#39;≦g.sub.(k-1) &#39; y.sub.k =y.sub.(k-1) +1  (16) 
    
     The true value of g k  is analyzed from the equations (15) and (16) as follows: 
     
         if f.sub.k &#39;&lt;g.sub.(k-1) &#39; g.sub.k &#39;=g.sub.(k-1) &#39;         (17) 
    
     
         if f.sub.k ≦g.sub.(k-1) &#39; g.sub.k &#39;=g.sub.(k-1) &#39;   (18) 
    
     Furthermore it is also apparent that 
     
         f.sub.k &#39;=f.sub.(k-1) &#39;+(Y/X)                              (19) 
    
     If the line starts from the point P n  (x n , y n ), it has to use k-1 instead of k from the equation (15) to the equation (19) and has to use y.sub.(k-1) -1 instead of y.sub.(k-1) +1 in the equation (16). The case where the line starts from the starting point P 0  (x 0 , y 0 ) with no special conditions will now be explained. 
     Since it is too difficult to perform decimal point operations from the equations (13), (18) and (19) to compare f k  &#39; with g k  &#39; and f k  with g.sub.(k-1), a value F k  and a comparative value G.sub.(k-1), normalized values of f k  &#39; and g.sub.(k-1) &#39;, respectively, instead of f k  &#39; and g.sub.(k-1) &#39; are introduced. Since the values of g k  (g.sub.(k-1)) in the equation (17) and (18) are multiples of 1/2 and the values of f k  &#39; are a multiple of 1/X, it is possible to prevent the occurrence of decimal points. Two methods A and B can be considered to prevent the occurrence of a decimal point. 
     In the A method the equations from (13) to (19) are multiplied by a factor of (2X) as follows: 
     
         ______________________________________   g.sub.0 &#39; · 2X = X                             (13&#39;)   f.sub.0 · 2X = 0 (14&#39;)if      f.sub.k &#39; · 2X &lt; g.sub.(k-1) &#39;.2X, y.sub.k                             (15&#39;)ub.(k-1)if      f.sub.k &#39; · 2X ≧ g.sub.(k-1) &#39;.2X, y.sub.k =   y.sub.(k-1) &#39; + 1         (16&#39;)if      f.sub.k &#39; · 2X &lt; g.sub.(k-1) &#39;.2X, g.sub.k &#39;.2X =   g.sub.(k-1) &#39;.2X          (17&#39;)   f.sub.k &#39; · 2X = f.sub.(k-1) &#39;.2X + 2Y                             (19&#39;)______________________________________ 
    
     Whereby if G k  and F k  are introduced as follows: 
     
         G.sub.k =g.sub.k &#39;·2X                             (20) 
    
     
         F.sub.k =f.sub.k &#39;·2X                             (21) 
    
     The above equations (13&#39;) through (19&#39;) become: 
     
         G.sub.0 =X                                                 (22) 
    
     
         F.sub.0 =0                                                 (23) 
    
     
         ______________________________________if     F.sub.k &lt; G.sub.(k-1)               y.sub.k = y.sub.(k-1)                             (24)if     f.sub.k ≧ G.sub.(k-1)               y.sub.k = y.sub.(k-1) + 1                             (25)if     F.sub.k &lt; G.sub.(k-1)               G.sub.k = G.sub.(k-1)                             (26)if     F.sub.k ≧ G.sub.(k-1)               G.sub.k = G.sub.(k-1) + 2x                             (27)  F.sub.k = F.sub.(k-1)               + 2Y          (28)______________________________________ 
    
     The occurrence of a decimal point is completely eliminated by this method. 
     On the other hand, in the B method the equations from (13) to (19) are multiplied by a factor of X as follows: 
     
         ______________________________________  g.sub.0 &#39; · X = X/2                             (13&#34;)  f.sub.0 &#39; · X = 0 (14&#34;)if     f.sub.k &#39; · X &lt; g.sub.(k-1) &#39; · X, y.sub.k =  y.sub.(k-1)                (14&#34;)if     f.sub.k &#39; · X ≧ g.sub.(k-1) &#39; · X,  y.sub.k = y.sub.(k-1) + 1  (16&#34;)if     f.sub.k &#39; · X &lt; g.sub.(k-1) &#39; · X, g.sub.k &#39;  · X = g.sub.(k-1) &#39; · X                             (17&#34;)if     f.sub.k &#39; · X ≧ g.sub.(k-1) &#39; · X,  y.sub.k &#39; · X = g.sub.(k-1) &#39; · X                             (18&#34;)  f.sub.k · X = f.sub.(k-1) · X + Y                             (19&#34;)______________________________________ 
    
     Whereby if G k  and F k  are introduced as follows: 
     
         ______________________________________  G.sub.k = g.sub.k &#39; · X           (29)  F.sub.k = f.sub.k &#39; · X           (30)______________________________________ 
    
     The above equations (13&#34;) through (19&#34;) become: ##EQU1## 
     In this case it is apparent from the equation (31) if X is an odd number the value of G 0  must have a decimal point. As a result, the value G k  includes a decimal point. Hereby in the B method if X is an even number 
     
         X&#39;=X/2                                                     (38) 
    
     and if X is an odd number 
     
         X&#39;=[X-(2.sub.m -1)]/2, m is integer                        (39) 
    
     the decimal point may be eliminated by following equation (40) instead of the equation (31), 
     
         G.sub.0 =X&#39;                                                (40) 
    
     In the B method there will be neglegible error in generating coordinates in comparison with the A method or prior art because if X is an odd number, the value G k  is only different from the right value as quantity of compensating by the equation (39). The error m can be made negligible by using a small value for m (for example m=1). In comparison with the A method, the B method can only process approximately half as much data because the equations (13) through (19) are multiplied only by a factor of X. Therefore, the B method is more advantageous than the A method, because it requires a smaller number of bits and the digital circuit architecture operates using less registers. 
     There will be explained hereunder only the A method, however, the B method being accomplished merely by changing 2X to X and by changing 2Y to Y. 
     As explained above, the principal to generate straight line coordinates, firstly requires F k  to be calculated from the equation F k  =F.sub.(k-1) +2Y by using F.sub.(k-1) and G.sub.(k-1) obtained from the coordinates X.sub.(k-1), y.sub.(k-1) of the lattice point P.sub.(k-1) at x=x.sub.(k-1) to simulate the straight line y=(Y/X)x+a. Secondly, the Y coordinate y k  of the lattice point P k  at x-x k  is obtained by testing whether F k  is larger than G.sub.(k-1) or not and the next Y coordinate of the lattice point P.sub.(k-1) is ascertained by obtaining G k . 
     Now referring to FIG. 3, one embodiment of the straight line coordinates generator for a graphic display device using a CRT monitor suitable for the invention will be explained. A first adder 11 calculates F k . A 2Y register 12 provides the first adder 11 with one input (2Y). An F k  register 13 provides the first adder 11 with the other input F.sub.(k-1). The F k  register stores the result F k  of the first adder 11 and is synchronized by a first clock CLK 1 as mentioned hereinafter. A second adder 14 calculates G k . The 2X register 15 provides the second adder 14 with one input (2X). The G k  register 16 provides the second adder 14 with the other input G.sub.(k-1). The G k  register 16 stores the result G k  of the second adder 14 and is synchronized by the second clock CLK 2  as mentioned hereinafter. The inverter 17 generates the first clock signal CKL 1  by inverting a clock signal from a basic clock CLK. The comparater 18 compares the result (F k ) of the first adder 11 with the contents G.sub.(k-1) stored in the G k  register 16. In this embodiment, the comparator 18 outputs a compared detecting signal CMP of a logical &#34;1&#34; if A≧B. A NAND gate 19 makes the detecting signal CMP a logical product with the basic clock CLK to generate the second clock signal CLK 2 . 
     The comparator 18 outputs a compared detecting signal CMP of a logical &#34;1&#34; if A≧B. A NAND gate 19 makes the detecting signal CMP a logical product with the basic clock CLK to generate the second clock signal CLK 2 . 
     An X k  counter 20 generates the X coordinates (x k ) of the group [P k  (k=1, 2, . . . , n-1)] of lattice points which simulate the line y=(Y/X)x+a connecting P 0  and P n . For instance, the counter 20 is a step up counter synchronized by the first clock signal CLK 1 . The Y k  counter 21 generates the Y coordinates (y k ) of the group of lattice points defined above. For instance, the counter 21 is a step up counter synchronized by the second clock signal CLK 2 . 
     Referring now to FIG. 4, the timing chart is provided to explain hereinunder the operations of the embodiment of this invention to obtain all of the coordinates (x k , y k ) of the group [P k  (k=1, 2, . . . , 5)] of the lattice points simulating the line y=(1/3)x and connecting the two points P 0  (0, 0) and P 6  (6, 2). In this embodiment all of the lattice points P k  (x k , y k ) from the starting point P 0  (0, 0) to the terminated point P 6  (6, 2), in addition to the incremented X coordinates, are shown as x k , y k , (f k ), F k , G k  in the following Table 2. 
     
                       TABLE 2______________________________________k        0      1       2     3    4     5     6______________________________________x.sub.k  0      1       2     3    4     5     6y.sub.k  0      0       1     1    1     2     2f.sub.k  0      1/3     2/3   1    4/3   5/3   2(=1/3·x.sub.k)F.sub.k  0      2       4     6    8     10    12G.sub.k  3      3       9     9    9     15    15______________________________________ 
    
     When the straight line coordinates generator starts, a microprocessor or a host computer (not shown) sets initial values to the counters 20 and 21 and the registers 12, 13, 15 and 16. The counters 20 and 21 in this case, are set at the respective coordinates of the starting point. Namely, x 0  and y 0  are set in the counter 20 and 21 as shown in the timing charts (i) and (j) of FIG. 4. On the other hand, it sets 2Y (=2X1=2) and 2X (=2X3=6) to the respective registers 12 and 15, because the slope of the line connecting P 0  (0, 0) and P 6  (6, 2) is Y/X=1/3. Although it doesn&#39;t matter that Y is Y=y 6  -y 0  =2 and X is X=x 6  -x 0  =6, the complexity caused by an increase in the number of bits of the registers 12, 13, 15 and 16, the adders 11 and 14, and the comparator 18 must be considered. Furthermore, the values for F 0  and G 0  are set in the respective registers 13 and 16 as shown in the timing charts (c) and (e) of FIG. 4. The initial values are F 0  =0 and G 0  =X(=3) obtained from the equations (23) and (22). 
     The adder 11 adds the contents F 0  (=0) from the register 13 to the contents 2Y(=2) from the register 12 so that it obtains a value F 1  namely F 0  +2Y(=2) as shown in timing chart (d) of FIG. 4. The adder 11 outputs the result F 0  +2Y (=2) to the input of register 13 and to the A input of the comparator 18. The adder 14 adds the contents G 0  (=3) from the register 16 to the contents 2X (=6) from the register 15 and obtains G 0  +2X (=9) as shown in timing chart (f) of FIG. 4. The adder 14 outputs its result G 0  +2X (=9) to the input of the register 16. At this time, the contents G 0  (=3) of the register 16 is output to the B input of the comparator 18. The comparator 18 compares the A input with the B input. Namely the comparator 18 compares F 0  +2Y (=2) with G 0  (=3). In this case, since A&lt;B, the comparator 18 doesn&#39;t output the compared detecting signal CMP of a logical &#34;1&#34; as shown in (g) of FIG. 4. 
     After the completion of the initialization period for the counters 20 and 21, and the registers 12, 13, 15 and 16, a controller generates the basic clock signal CLK as shown in timing chart (a) of FIG. 4. After the basic clock CLK is inverted by the inverter 17, it is input to the register 13 and the counter 20 as the first clock signal CLK 1 , as shown in timing chart (b) of FIG. 4. Therefore, the contents x 0  (=0) of the counter 20 are incremented +1 and x 1  =x 0  +1 as shown in timing chart (i) of FIG. 4. The basic clock CLK is also input to the NAND gate 19. But the NAND gate 19 doesn&#39;t output the second clock signal CLK 2  because of a lack of a NAND condition because the comparator 18 is not outputting the compared detecting signal CMP of a logical &#34;1&#34; as shown in timing chart (h) of FIG. 4. Therefore the counter 21 does not operate as shown in (j) of FIG. 4 even though the counter 20 operates as shown in timing chart (i) of FIG. 4. Therefore, the Y coordinate y 1  of the lattice point P 1  at x=x 1  is the same as Y coordinate y 0  (=0) of the point P 0 . 
     The register 13 stores the result F 1  =F 0  +2Y(=2) of the adder 11 synchronized with the first clock signal CLK 1  as shown in timing chart (c) of FIG. 4, at the same time the counter 20 is incremented to x 0  =x 0  +1. Since the second clock signal CLK 2  is not generated at that time as mentioned above in the discussion of timing chart (h) of FIG. 4, the register 16 keeps its contents of G 0  (=3) as shown in timing chart (e) of FIG. 4. Namely, G 1  equals to G 0 . Next, the adder 11 adds the contents F 1  (=2) of the register 13 to the contents 2Y(=2) of the register 12 to obtain F 2  =F 1  +2Y(=4) as shown in the timing chart (d) of FIG. 4. The adder 11 outputs the result F 1  +2Y(=4) to the register 13 and to the comparator 18 as an A input. The adder 14 adds a content G 1  (=G 0  =3) of the register 16 with a content 2X(=6) of the register 15 to obtain G 1  +2X(=9) as shown in (f) of FIG. 4. The adder 14 outputs the result G 1  +2X(=9) to the register 16 wherein the contents G 1  (=3) of the register 16 becomes the B input of the comparator 18. The comparator 18 compares the A input F 2  =F 1  +2Y(=4) with the B input G 1  (=3). In the case F 2  &gt;G 1  and A&gt;B, the comparator 18 outputs the compared detecting signal CMP of a logical &#34;1&#34; as shown in timing chart (g) of FIG. 4. The NAND gate 19 in responding to the compared detecting signal CMP, and the output from the basic clock CLK outputs the second clock signal CLK 2  as shown in timing chart (h) of FIG. 4 while CMP=1. The second clock signal CLK 2  is input to the counter 21 and the register 16. The counter 21 then increments its contents from y 1  (=0) to 1 as shown in timing chart (j) of FIG. 4. This becomes the value for the Y coordinate y 2  of the lattice point P 2 . The register 16 stores the result G 1  +2X(=9) of the adder 14 as shwon in timing chart (e) of FIG. 4, which becomes the value of G 2 . However, the first clock signal CLK 1  is input to the counter 20 and the register 13. Thus, the counter 20 operates at the same time as the counter 21 and increments its content x 1  (=1) as shown in timing chart (i) of FIG. 4. The x coordinate of the lattice point P 2  becomes X 2  (=2). The register 13 also stores the result F 2  =F 1  +2Y(=4) from the adder 11. 
     The coordinates of the remaining lattice points P 3  through P 6  can be acquired in the same manner as explained above by repeating renewal of the contents of the registers 13 and 16 to determine the coordinates of the lattice point P k  based on the comparison of F k  with G.sub.(k-1) as shown in Table 2. It is apparent from the embodiment that the architecture of the straight line coordinate generator enables the use of extremely simple digital circuits to efficiently and rapidly generate all the coordinates (x k , y k ) of a group of lattice points to simulate the line y=(1/3)x connecting the two points P 0  (0, 0) and P 6  (6, 2) without the necessity of using decimal points. This invention is acceptable for all straight lines having a slope Y/X, where 0≦Y/X≦1. 
     Although in the aforesaid embodiment a method starting from the point P 0  was explained, it is possible to acquire all of the lattice points by decrementing the X and Y coordinates from a starting point such as P 6  in the above example. In this case step down counters are necessary to replace step up counters 20 and 21. It is also possible to change count directions in accordance with which starting point is selected from two points by using both step up and step down counters. 
     F k  is a normalized value, obtained by multiplying f k  &#39; by 2X, of the distance in the y direction between the point P 0  and the line y=(Y/X)x+a at x=x k . G.sub.(k-1) is also a normalized value, obtained by multiplying g.sub.(k-1)&#39; by 2X, of the distance in the y direction between the comparative point C k  and the point P 0  at x=x k . In this case, F 0  and G 0  are steady values independent of the coordinates of the starting value P 0  which is apparent from the equations 23 and 22. 
     On the other hand, it is also possible to acquire F k  and G k  by multiplying the y coordinate f k  on the line y=(Y/X)x+a at x=x k  and the y coordinate y k  of the comparative point C k  at x=x k  by 2X. In this case, F 0  and G 0  are variable in accordance with the coordinates of the starting point because they include elements of the coordinates of the starting point P 0 . It also becomes necessary for the adders 11 and 14 to perform subtraction if the point P 6  is selected as the starting point. 
     Although the above mentioned embodiment has been explained in conjunction with using a graphic display apparatus using a CRT monitor, it should also be noted that the invention is readily adaptable for an X-Y plotter using the equivalent principal. 
     Obviously, numerous modifications and variations of the present invention are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the invention may be practiced otherwise than as specifically described herein.