
2.5 Rasterizing 87
DrawPixel(xc-x,yc-y);
if ( sigma >= 0 )
{
sigma += fb2*(1-x);
x--;
}
sigma += a2*(4*y+6);
}
General Ellipses
An attempt could be made to mimic the case of axis-aligned ellipses by drawing the
arc from (x
b
, y
b
) to (x
a
, y
a
) and reflecting each pixel (x , y) through the appropriate
lines. For example, given pixel u = (x, y), the pixel reflected through v = (x
b
, y
b
)
given by
(x
, y
) = u − 2
u
.
v
v
.
v
v = (x, y) − 2
x
b
x +y
b
y
x
2
b
+ y
2
b
(x
b
, y
b
)
would also be dr awn. The right-hand side requires a division. Moreover, even if
the division is performed (whether as float or integer), the resulting pixels are not
always contiguous and noticeable gaps occur ...