[comp.graphics] Mathematically perfect ellipses

DSeal@acorn.co.uk (03/02/89)

With regard to holes appearing in sufficiently eccentric ellipses produced
by the Mac, it has been pointed out that this is a consequence of the fact
that the Mac's ellipses are "mathematically perfect": the holes correspond
to areas where no pixel is sufficiently covered by the gap between two
concentric ellipses to be plotted.

This makes sense when you are thinking of an ellipse as a projection of a
circle in 3 dimensions: concentric ellipses are simply projections of
concentric circles. The holes are caused by the fact that the gap between
two concentric ellipses is different at different places: when the gap is
small compared with a pixel, it is likely that no pixel will be plotted.

On the other hand, if you regard an ellipse as being a 2-dimensional curve
in its own right, this approach is not very sensible: one wants the ellipse
to be plotted as a set of pixels which is connected and contains as few
pixels as possible (in line with the Bresenham line and circle drawing
algorithms).

The best criterion I know of for "mathematical perfection" in the plotting
of 2-dimensional curves is: within each pixel, you can define a "diamond",
obtained by joining the midpoints of its four edges. A pixel should be
plotted if the (infinitely thin) curve intersects its diamond.

With this definition, Bresenham's line algorithm is mathematically perfect.
I believe his circle algorithm is as well, though I have never checked this
in detail. Does anyone know of a reasonably fast ellipse algorithm that is
mathematically perfect in this sense?

David Seal