Here's a quick (as compared to a method in a program that I downloaded) filled circle drawing algorithm where X,Y, and R are the x-coordinate of center, y-coordinate of center, and radius, respectively.
Code:
The cool thing is that it is faster for smaller circles!
It could also support ovals if you replace
:sqrt(R^2-F^2
with
:S/Rsqrt(R^2-F^2
where R is the x-radius and S is the y-radius.
So, what do you think?
Code:
:For(F,0,R,[deltaX]
:sqrt(R^2-F^2
:Line(X+F,Y+Ans,X+F,Y-Ans
:Line(X-F,Y+Ans,X-F,Y-Ans
:End
The cool thing is that it is faster for smaller circles!
It could also support ovals if you replace
:sqrt(R^2-F^2
with
:S/Rsqrt(R^2-F^2
where R is the x-radius and S is the y-radius.
So, what do you think?