skip to main content
article

Line drawing, leap years, and Euclid

Published:01 March 2004Publication History
Skip Abstract Section

Abstract

Bresenham's algorithm minimizes error in drawing lines on integer grid points; leap year calculations, surprisingly, are a generalization. We compare the two calculations, explicate the pattern, and discuss the connection of the leap year/line pattern with integer division and Euclid's algorithm for computing the greatest common divisor.

References

  1. Allouche, J.-P. and Shallit, J. 2003. Automatic Sequences. Cambridge University Press, Cambridge, U.K.Google ScholarGoogle Scholar
  2. Berstel, J. 1990. Tracé de droites, fractions continues et morphismes itérés. In Mots: Mélanges Offerts à M.-P. Schützenberger, M. Lothaire, Ed. Editions Hermès, Paris, France, 298--309.Google ScholarGoogle Scholar
  3. Bresenham, J. E. 1965. Algorithm for computer control of a digital plotter. IBM Syst. J. 4, 1, 25--30.Google ScholarGoogle Scholar
  4. Brons, R. 1974. Linguistic methods for the description of a straight line on a grid. Comput. Graph. Image Process. 3, 1, 48--62.Google ScholarGoogle Scholar
  5. Castle, C. M. A. and Pitteway, M. L. V. 1987. An efficient structural technique for encoding 'best-fit' straight lines. Comput. J. 30, 2, 168--175. Google ScholarGoogle Scholar
  6. Fraenkel, A. S., Mushkin, M., and Tassa, U. 1978. Determination of {n θ} by its sequence of differences. Can. Math. Bull. 21, 441--446.Google ScholarGoogle Scholar
  7. Graham, R. L., Knuth, D. E., and Patashnik, O. 1994. Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA. Google ScholarGoogle Scholar
  8. Knuth, D. E. 1998. The Art of Computer Programming (Volume 2: Seminumerical Algorithms), 3rd ed. Addison-Wesley, Reading, MA. Google ScholarGoogle Scholar
  9. Pitteway, M. L. V. 1985. The relationship between Euclid's algorithm and run-length encoding. In Fundamental Algorithms for Computer Graphics, R. A. Earnshaw, Ed. Springer, Berlin, Germany, 105--111.Google ScholarGoogle Scholar
  10. Reingold, E. M. and Dershowitz, N. 2001. Calendrical Calculations: The Millennium Edition. Cambridge University Press, Cambridge, U.K. Google ScholarGoogle Scholar
  11. Rockett, A. M. and Szüsz, P. 1992. Continued Fractions. World Scientific, Singapore.Google ScholarGoogle Scholar
  12. Shallit, J. 1994. Pierce expansions and rules for the determination of leap years. Fibonacci Quart. 32, 5, 416--423.Google ScholarGoogle Scholar
  13. Sproull, R. F. 1982. Using program transformations to derive line-drawing algorithms. ACM Trans. Graph. 1, 4, 259--273. Google ScholarGoogle Scholar
  14. Troesch, A. 1998. Droites discrètes et calendriers. Math. Inform. et Sci. Humaines 141, 36, 11--41.Google ScholarGoogle Scholar

Index Terms

  1. Line drawing, leap years, and Euclid

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader