Mail Archives: djgpp/1999/08/11/06:32:19
Andy Kilner writes:
> What is the fastest circle algorithm available at the moment?
Bresenham is the only sane way to draw circles: not just at the
moment, but any time you care to ask :-)
The Allegro file gfx.c contains a simple implementation. It
can be modified to merge adjacent horizontal pixels into
line segments and/or to trace around the circle edge rather
than skipping back and forth between each octet, but these
changes usually add more overhead due to increased complexity
than they save due to more efficient pixel plotting.
Foley & Van Damme, Principles and Practice of Computer
Graphics has a lot of information about such things, including
material about how to extend the algorithm for antialising.
Shawn Hargreaves.
- Raw text -