Method and apparatus for drawing antialiased lines on a raster display
AssigneeInternational Business Machines Corporation
InventorsTerrance L. Staley, II, William F. Lawless
Life of this patent
Estimating the term…
Abstract
Antialiased lines are generated in a computer graphics system by drawing the pixels on one side of the ideal line segment in the minor axis direction on one pass and drawing the pixels lying on the other side of the line segment in the minor axis direction on another pass. A modified Bresenham procedure is used to generate the pixel positions on both passes. On either pass, intensity values are generated from the integral Bresenham determinant directly, rather than from the perpendicular or vertical distance between the pixel and the line.
Claims27
In a graphics system in which a two-dimensional pixel image is generated for display by a raster-scan device, a method of generating intensity values for an antialiased pixel approximation of a line segment extending between a first point and a second point spaced from each other along major and minor coordinate axes, said method comprising the steps of:
- generating integer valued Bresenham parameters including a positive correction, a negative correction, and an initial determinant;
- iteratively generating a new value of the determinant for each pixel along said line segment as a function of the previous value of the determinant and the positive and negative corrections;
- generating an intensity value for said pixel along said line segment as a function of the value of the determinant generated for said pixel by performing the following steps:;
- generating a plurality of comparison values ranging between zero and a predetermined multiple of the spacing of said points along said major axis;
- comparing the value of the determinant generated for a pixel along said segment with each of said comparison values;
- and
- generating said intensity value in accordance with the results of said comparisons.
In a graphics system in which a two-dimensional pixel image is generated for display by a raster-scan device, apparatus for generating intensity values for an antialiased pixel approximation of a line segment extending between a first point and a second point spaced from each other along major and minor coordinate axes, said apparatus comprising:
- means for generating integer valued Bresenham parameters including a positive correction, a negative correction, and an initial determinant;
- means for generating a new value of the determinant for each pixel along said line segment as a function of the previous value of the determinant and the positive and negative corrections;
- and
- means for generating an intensity value for said pixel along said line segment as a function of the new value of the determinant wherein said means for generating an intensity value includes:
- means for generating a plurality of comparison values of said determinant;
- means for comparing the value of the determinant generated for a pixel along said segment with each of said values of said determinant;
- means for generating said intensity values in accordance with the results of said comparisons.
In a graphics system in which a two-dimensional pixel image is generated for display by a raster-scan device, a method of generating pixel positions for an antialiased pixel approximation of a line segment extending between a first point and a second point spaced from each other along minor and major coordinate axes, said method comprising the steps of:
- generating integer valued Bresenham parameters including a positive correction, a negative correction, and an initial determinant;
- iteratively generating a new value of the determinant for each pixel along said line segment as a function of the previous value of the determinant and the positive and negative corrections;
- and
- generating a pixel position for said pixel along said line segment as a function of the value of the determinant generated for said pixel wherein
- pixel positions for pixels on one side of said line segment are generated on a first performance of the method steps above and for pixels on the other side of said line segment are generated on a second performance of the method steps above.
In a graphics system in which a two-dimensional pixel image is generated for display by a raster-scan device, apparatus for generating pixel positions for an antialiased pixel approximation of a line segment extending between a first point and a second point spaced from each other along minor and major coordinate axes, said apparatus comprising:
- means for generating integer valued Bresenham parameters including a positive correction, a negative correction, and an initial determinant;
- means for iteratively generating a new value of the determinant for each pixel along said line segment as a function of the previous value of the determinant and the positive and negative corrections;
- and
- means for generating a pixel position for said pixel along said line segment as a function of the value of the determinant generated by said pixel wherein
- the pixel positions are generated for pixels on one side of said line segment by first using said apparatus with a first Bresenham parameter set and for pixels on the other side of said line segment by repeating use of said apparatus with a second Bresenham parameter set.
Dependencies are inferred from the claim text.