int x = 0, y = r, yi, d;
d = 3 - 2 * r;
while (x <= y)
{
draw_circle_8(img, xc, yc, x, y, c);
if (d < 0)
{
d = d + 4 * x + 6;
}
else
{
d = d + 4 * (x - y) + 10;
y --;
}
x ++;
}
请问那3句红色的,那些常数值是怎么取的,我不太懂,看到有的不是这样的
如:d = 1 - r;
d = d + 2 * x + 3;
d = d + 2 * (x - y) + 5; |