efficient algorithm for drawing circle arcs?

horseyguy picture horseyguy · Jun 15, 2010 · Viewed 10.2k times · Source

I am using the mid-point circle algorithm (bresenham circle) to efficiently draw whole circles. Is there something similar to draw circle arcs? I would like to specify a start angle and end angle and have only that portion of the circle drawn.

Thanks in advance!

EDIT: I would like to draw filled circle arcs too, i.e pie-slices. :)

Answer

Krumelur picture Krumelur · Jun 15, 2010

Calculate the start and end point of the arc and terminate when this point has been reached. See e.g. http://en.wikipedia.org/wiki/Midpoint_circle_algorithm