Circles, Ellipses, and General Implicit Functions

But this is very expensive and gives nonuniform pixel spacing.
Second try: use Polar Coordinates:

x = xc + r cos q step q
y = yc + r sin q
>

Could set step size yr and get uniform density about 1 pixel
apart. But this is still computationally expensive ( computing
sin, cos ). Use the Decision Variable Method (Bresenham). We can
compute in one octant then use symmetry. So can compute 1 point
then plot 8 points as below:

Note integer Addition/Subtraction, multiplication by power of
2. The aspect ratio for monitors is usually 4/3 = 1.33. If the
pixels are not "square" then a correction must be made,
else the circle will look like an ellipse. For example, in the
CGA Mode 6, the pixel resolution is 640/200 = 3.2, so the
correction = 3.2/1.33= 2.40.

Find change over point.
Slope = dy / dx = -bx/ay (x, y both positive in 1st quadrant)
so when ay < bx then slope < 1 and choose between 7, 8
{Note: complete derivation for ellipse in Dr. Dobb's Journal, May
1985 p.40-48}
We can use the Decision variable method to display any function
of form y = f(x). (Remember: changes in slope) Generally easier
to use Line segments but not as pretty or fast.

>May want to plot ARCS or part of curve. Can do as above
just compute initial, final pts. Example: Start at x1 and only
use 1st and 2nd octant symmetry.