2 /* arc plotting routine */
3 /* from x1,y1 to x2,y2 */
4 /* with center xc,yc and radius rr */
5 /* integrates difference equation */
6 /* negative rr draws counterclockwise */
8 void rarc(double x1, double y1, double x2, double y2, double xc, double yc, double rr){
9 register double dx, dy, a, b;
10 double ph, dph, rd, xnext;
14 rd = sqrt(dx * dx + dy * dy);
15 if (rd / e1->quantum < 1.0) {
20 dph = acos(1.0 - (e1->quantum / rd));
23 ph=atan2((y2-yc),(x2 - xc)) - atan2(dy, dx);
29 plotline(x1, y1, x2, y2);
38 xnext = dx * a - dy * b;
41 vec(dx + xc, dy + yc);