nebakke@ndsuvax.UUCP (Jeff Bakke) (10/13/89)
I've been keeping watch on this group for sometime and although I've seend requests for circle/ellipse/arc functions, I was wondering if anyone had an algorithm/source/pseudo-code for a filled-arc function. I am currently using a filled arc function which simply draws a line from the center point to each point on the curve. The problem with this is that in a large arc, you end up with some gaps inside the arc. I alleviate this problem with a line function that draws a line 3 pixels wide instead of just one but unfortunately this function is horrendously slow. Is there a better method for filling an arc or should I just make an effort and improve on the wide line function? It seems to me that there would be a better way to do this but I haven't the faintest idea how. Thanks. Jeff Bakke nebakke@plains.NoDak.edu nu113738@ndsuvm1.bitnet
TEITTINEN@cc.helsinki.fi (Marko) (10/14/89)
In article <3002@ndsuvax.UUCP>, nebakke@ndsuvax.UUCP (Jeff Bakke) writes: > I've been keeping watch on this group for sometime and although I've seend > requests for circle/ellipse/arc functions, I was wondering if anyone had > an algorithm/source/pseudo-code for a filled-arc function. I am currently > using a filled arc function which simply draws a line from the center point > to each point on the curve. The problem with this is that in a large > arc, you end up with some gaps inside the arc. I alleviate this problem > with a line function that draws a line 3 pixels wide instead of just one > but unfortunately this function is horrendously slow. > > Is there a better method for filling an arc or should I just make an > effort and improve on the wide line function? It seems to me that > there would be a better way to do this but I haven't the faintest idea > how. Howabout just drawing an arc with the ends connected to the centerpoint and then filling the "wedge" with a floodfill algorithm. Of course this works only on a bitmap device. -- EARN: teittinen@finuh ! "Studying is the only way Internet: teittinen@cc.helsinki.fi ! to do nothing without Marko Teittinen, student of computer science ! anyone blaming you" -me