Skip to main content

Part of the book series: Undergraduate Topics in Computer Science ((UTICS))

  • 4108 Accesses

Abstract

Drawing lines and curves on pixel graphic devices needs special attention in computer graphics. Algorithmic aspects of drawing lines and curves, especially the midpoint or Bresenham algorithm, are highlighted in this Chapter as well techniques for antialiasing to avoid staircasing effects. Examples in Java 2D are provided for the use of the techniques.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    To be precise: One addition and one subtraction.

  2. 2.

    Note that (x 0,y 0) and (x 1,y 1) are assumed to be pixels, so that x 0, x 1, y 0 and y 1 must be integer values.

  3. 3.

    H dxdy D dy means (dxdy) letters H followed by dy letters D.

References

  1. Bresenham, J.E.: Algorithm for computer control of a digital plotter. IBM Syst. J. 4, 25–30 (1965)

    Article  Google Scholar 

  2. Bresenham, J.E.: A linear algorithm for incremental digital display of circular arcs. Commun. ACM 20, 100–106 (1977)

    Article  MATH  Google Scholar 

  3. Brons, R.: Linguistic methods for the description of a straight line on a grid. Comput. Graph. Image Process. 3, 48–62 (1974)

    Article  MathSciNet  Google Scholar 

  4. Brons, R.: Theoretical and linguistic methods for describing straight lines. In: [6], pp. 19–57

    Google Scholar 

  5. Cyrus, M., Beck, J.: Generalized two- and three-dimensional clipping. Computers and Graphics 3, 23–28 (1978)

    Article  Google Scholar 

  6. Earnshaw, R.A. (ed.): Fundamental Algorithms for Computer Graphics. Springer, Berlin (1985)

    MATH  Google Scholar 

  7. Foley, J.D., van Dam, A., Feiner, S.K., Hughes, J.F.: Computer Graphics: Principles and Practice in C, 2nd edn. Addison-Wesley, Boston (1996)

    MATH  Google Scholar 

  8. Gupta, S., Sproull, R.E.: Filtering edges for gray-scale displays. Comput. Graph. 15, 1–5 (1981)

    Article  Google Scholar 

  9. Hearn, D., Baker, M.P.: Computer Graphics with OpenGL, 3rd edn. Pearson Prentice Hall, Upper Saddle River, NJ (2004)

    Google Scholar 

  10. Kappel, M.R.: An ellipse-drawing algorithm for raster displays. In: [6], pp. 257–280

    Google Scholar 

  11. Pitteway, M.L.V.: Algorithms for drawing ellipses or hyperbolae with a digital plotter. Comput. J. 10, 282–289 (1967)

    Article  Google Scholar 

  12. Pitteway, M.L.V., Watkinson, D.J.: Bresenham’s algorithm with gray scale. Commun. ACM 23, 625–626 (1980)

    Article  Google Scholar 

  13. Van Aken, J.R.: An efficient ellipse-drawing algorithm. IEEE Comput. Graph. Appl. 4, 24–35 (1984)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag London Limited

About this chapter

Cite this chapter

Klawonn, F. (2012). Drawing Lines and Curves. In: Introduction to Computer Graphics. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-1-4471-2733-8_3

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-2733-8_3

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-4471-2732-1

  • Online ISBN: 978-1-4471-2733-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics