Search code examples
algorithmdrawingrenderinggraphics

Algorithm for drawing an anti-aliased circle?


What's a good algorithm for drawing anti-aliased circles? (Filled and not filled.)


Solution

  • Bresenham (of the line algorithm fame) also had a circle algorithm.

    Xiaolin Wu adapted the line algorithm for anti-aliasing, and likewise did the same to the circle algorithm.

    http://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm

    You can find the circle algorithm with this search:

    http://www.google.com/search?q=Xiaolin%20Wu%20circle

    -Adam