Bitmap/Midpoint circle algorithm: Difference between revisions
Content added Content deleted
(Move one addition outside the loop.) |
|||
Line 444: | Line 444: | ||
{ |
{ |
||
int f = 1 - radius; |
int f = 1 - radius; |
||
int ddF_x = |
int ddF_x = 0; |
||
int ddF_y = -2 * radius; |
int ddF_y = -2 * radius; |
||
int x = 0; |
int x = 0; |
||
Line 464: | Line 464: | ||
x++; |
x++; |
||
ddF_x += 2; |
ddF_x += 2; |
||
f += ddF_x; |
f += ddF_x + 1; |
||
plot(x0 + x, y0 + y); |
plot(x0 + x, y0 + y); |
||
plot(x0 - x, y0 + y); |
plot(x0 - x, y0 + y); |