I've been approximating circles by breaking them into short line segments
and using a 'flatness test' to insure that that I'm getting a decent
representation (e.g., small circles get only a few lines, while large
circles get much more).  I'm rendering the lines by simply using
WinDrawLine.  There are little tricks you can use to reduce the number of
calculations, such as calculating one quadrant and reflecting it to get the
other three.

I'm not familiar with the Bresenham alg.  I suspect it's faster than my
approach, but more complex to code.  I'm curious if anyone knows otherwise.

~Rich

> Of course this will work, but give you a filled circle - if you're after
the
> outline of a circle, then you need to erase a slightly smaller "rectangle"
> also. The other alternative is to implement Bresenhams circle algorithm
> which is pretty quick and less of a kludge... :-)
>
>
http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=Bresenham%27s+circle+algor
ithm
>
>
> Cheers,


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to