This paper describes a 2-D graphics algorithm that uses shifts and adds to precisely plot a series of points on an ellipse of any shape and orientation. The algorithm can also plot an elliptic arc that starts and ends at arbitrary angles. The ellipse algorithm described here is largely based on earlier papers by Van Aken and Simar [1,2], which extend Marvin Minsky's well-known circle algorithm [3,4,5] to ellipses, and show how to cancel out the sources of error in Minsky's original algorithm. A new flatness test is presented for automatically controlling the spacing between points plotted on an ellipse or elliptic arc. Most of the calculations performed by the ellipse algorithm and flatness test use fixed-point addition and shift operations, and thus are well-suited to run on less-powerful processors. C++ source code listings are included.
Keywords: parametric ellipse algorithm, rotated ellipse, Minsky circle algorithm, flatness, elliptic arc, conjugate diameters, affine invariance
[1]
Stefan Gottschalk,et al.
Postscript Language Reference Manual
,
2016
.
[2]
A matrix analytic approach to conjugate diameters of an ellipse
,
2013
.
[3]
Thomas Ertl,et al.
Computer Graphics - Principles and Practice, 3rd Edition
,
2014
.
[4]
Alan W. Paeth,et al.
A fast algorithm for general raster rotation
,
1986
.
[5]
Robert F. Sproull,et al.
Principles in interactive computer graphics
,
1973
.
[6]
James F. Blinn.
How Many Ways Can You Draw a Circle?
,
1987,
IEEE Computer Graphics and Applications.
[7]
Sudhir P. Mudur,et al.
Mathematical Elements for Computer Graphics
,
1985,
Advances in Computer Graphics.
[8]
C. Musès.
Explorations in Mathematics.
,
1977
.
[9]
Steve Hollasch,et al.
Advanced animation and rendering techniques
,
1994,
Comput. Graph..
[10]
Jerry R. Van Aken,et al.
A parametric elliptical Arc Algorithm
,
1992,
Graphics Gems III.