What's a good algorithm for drawing anti-aliased circles? (Filled and not filled.)
相关问题
- Finding k smallest elements in a min heap - worst-
- binary search tree path list
- High cost encryption but less cost decryption
- Scaling of the point sprites (Direc3D 9)
- Direct2D Only Partially Linking in C++ Builder
相关文章
- What are the problems associated to Best First Sea
- Coin change DP solution to keep track of coins
- Algorithm for partially filling a polygonal mesh
- Robust polygon normal calculation
- Algorithm for maximizing coverage of rectangular a
- Behavior of uniforms after glUseProgram() and spee
- Difference between SuspendLayout and BeginUpdate
- How to measure complexity of a string?
If you want an easy one, make a soft blur from pixel matrix A to pixel matrix B.
This is one i've used (here in pseudo-code)
Ofcourse this is applied to grayscale, but you can do easily the same in RGB.
This is really a very simple one, you can also add the diagonals i.e. [x+1][y+1] and split it by 16 or 32.
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
Create a Graphics object g. Do
Draw your anti aliased circle with g.FillEllipse or g.DrawEllipse