Skip to main content

Part of the book series: NATO ASI Series ((NATO ASI F,volume 40))

  • 477 Accesses

Abstract

Discussed are implementation considerations relevant to selecting and customizing incremental line drawing algorithms to cope with such anomalies as equal error metric instances, perturbation effects of clipping, intersections in raster space, EXOR interpretations for polylines, reversibility, and fractional end point rounding. Pel-level, visibly noticeable, effects are illustrated by reference to four rastering considerations:

  1. 1)

    Exactly reversible paths or RETRACEABILITY Should grid points selected for the line from (0,0) to (2,1) be identical to the grid points selected for the line back from (2,1) to (0,0)?

  2. 2)

    Fractional end point processing or FIDELITY Should grid points selected for the line from (5.5,0.5) to (0.5,5.5) actually be coincident with any of the points selected for the line from (6,0) to (0,6); both do have the same form: y=6-x.

  3. 3)

    Chained, concatenated line segments or POLYLINE Should a POLYLINE from (10,0) to (0,0) to (10,0) written in EXCLUSIVE OR drawing mode actually display multiple pels or one pel or no pels in a frame-buffer display?

  4. 4)

    Line parameter choices or SPECIFICATION Should the two radial lines bounding a pie chart slice of the 13-unit radius, origin centered circle between arc end points (5,12) and (0,13) intersect close to (0,0) if the circular sector or pie chart slice is constrained to specification only as an integer three-point circumferential arc with circle center point inferred?

Ambiguities and anomalies in rastering are not always apparent. As I’ve lectured at university colloquia or perused papers in professional journals, I’ve sometimes been surprised to observe minimal awareness of what I choose to call pel-level considerations implicit in rastering algorithm usage. In this paper I propose to illustrate several such pel-level, visibly noticeable, effects by reference to four rastering considerations:

  1. 1)

    Exactly reversible paths or RETRACEABILITY Will, for instance, grid points selected for the line from (0,0) to (2,1) be identical to the grid points selected for the line back from (2,1) to (0,0)? Does reversibility affect polygon approximation of curves and arcs?

  2. 2)

    Fractional end point processing or FIDELITY Will, say, grid points selected for the line from (5.5,0.5) to (0.5,5.5) actually be coincident with any of the points selected for the line from (6,0) to (0,6); after all, both do have the same form: y=6-x. Is pre-raster algebraic clipping in geometric space likely to differ from post-raster scissor clipping in raster space?

  3. 3)

    Chained, concatenated line segments or POLYLINE Will, say, a polyline from (10,0) to (0,0) to (10,0) rastered in EXCLUSIVE OR drawing mode actually display multiple pels or one pel or no pels in a frame-buffer display? Is polyline a geometric entity itself or are its individual line segments, separately, each a unique entity distinct from polyline as merely a concatenation construct for compact specification?

  4. 4)

    Line parameter choices or SPECIFICATION will, say, the two radial lines bounding the sector of a 13-unit radius, origin centered circle between arc end points (5,12) and (0,13) intersect close to (0,0) if the circular sector or pie chart slice is constrained to specification only as an integer three-point circumferential arc with circle center point inferred?

As frame-buffer raster function such as BIT-BLIT and EXOR (exclusive or) come into more prominence and portability receives more attention together with picture interchange, pel-level matters merit more explicit awareness. Verifying drawing results by, say, EXORing two interchange bit-maps drawn by separate implementations will infer commonality or at least understanding of pel-level ambiguities or anomalies. My purpose here is not to provide cookbook answers. Rather, my intent is to counsel that graphics algorithms, even a quarter-century-old rastering algorithm (2) developed in 1962, should be thoroughly understood and adapted as appropriate to fit implementation specific environments. The notions discussed are not necessarily new or original or unknown. Any raster graphics implementation ever done has resolved, explicitly or more often implicitly, each of the matters raised in the illustrative examples. What concerns me is that little has been published on the matter. Standardization activities, even those at the device driver level, often prefer to avoid sticky questions of pel-level attention to picture equivalence. Even classroom coverage can skirt pel-level matters by leaving any consideration to self-discovery through debugging thoroughness of the student. I believe a bit more explicit attention to pel-level details and clarity of system conceptual constructs --such as POLYLINE or EXOR or WIDELINE or even the sampling function for rastering incremental lines--can enhance past practices. Implementers, hardware or software, should make overt, conscious, explicit choices for ambiguity resolution and should document resultant pel-level behavior to preclude wasted time by users who may have intuitive expectations that differ from those of the designer. It is not enough to define a raster function in isolation; one needs to pay attention to interaction of related functions as they make up a system as a whole. Wideline interaction with linestyle and drawing modes and fractional end-points from affine transformations, for example, should be conscientiously and consistently specified if one is to be able to predict rendered picture content. Pel-level behavior may appear negligible, certainly disinteresting, at the surface level. As the time taken finally to arrive at a floating-point standard such as ANSI/IEEE 754-1985 illustrates, attention to fine detail is useful if common resolution is to be achieved for what may seem at first glance to be merely “don’t care” items which, in reality, do propagate through to influence a final result.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J. Boothroyd and P.A. Hamilton. Exactly reversible plotter paths. Australian Computer Journal 2(No.l) p20–21 (1970).

    Google Scholar 

  2. J.E. Bresenham. An incremental algorithm for digital plotting. ACM National Conference, Denver, Colorado (August 1963).

    Google Scholar 

  3. J.E. Bresenham. Algorithm for computer control of a digital plotter. IBM Systems Journal 4(No.l) p25–30 (January 1965).

    Article  Google Scholar 

  4. J.E. Bresenham. Incremental line compaction. The Computer Journal 25(No.l) p116–120 (February 1982).

    Google Scholar 

  5. A.R. Forrest. Computational geometry in practice. Fundamental Algorithms for Computer Graphics. Springer-Verlag. edited by R.A. Earnshaw. p707–724 (1985).

    Google Scholar 

  6. P.L. Gardner. Modification of Bresenham’s algorithm for displays. IBM Technical Disclosure Bulletin 18(No.5) p1595–1596 (October 1975).

    Google Scholar 

  7. Roger D. Hersch. Descriptive contour fill of partly degenerated shapes. IEEE Computer Graphics and Applications 6(No.7) p61–70 (July 1986).

    Article  Google Scholar 

  8. M.D. Mcllroy. Best approximate circles on integer grids. ACM Transactions on Graphics (TOGS) 2(No.4) p237–263 (October 1983).

    Article  Google Scholar 

  9. Tran-Thong. A symmetric linear algorithm for line segment generation. Computers &Graphics 6(No.l) 15–17 (1982).

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bresenham, J.E. (1988). Anomalies in Incremental Line Rastering. In: Earnshaw, R.A. (eds) Theoretical Foundations of Computer Graphics and CAD. NATO ASI Series, vol 40. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-83539-1_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-83539-1_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-83541-4

  • Online ISBN: 978-3-642-83539-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics