# Mid-point circle drawing algorithm

Apr 14th, 2015
Studypool Tutor
Price: \$5 USD

Tutor description

A graphics program for drawing a circle using Mid-point circle drawing algorithm. It draws a circle with the specified radius at the specified coordinates

Word Count: 127
Showing Page: 1/2
#include #include #include #include int main(void){int gd = DETECT, gm;int x, xc, y, yc, r, p;initgraph(&gd, &gm, "C:\\turboc3\\bgi");printf("Enter xc:\n");scanf("%d",&xc);printf("enter yc:\n");scanf("%d",&yc);printf("Enter r:\n");scanf("%d",&r);x = 0;y = r;putpixel(xc,yc,WHITE);delay(30);p = (5/4)-r;while(x<=y){if(p<0){x = x+1;p = p+(2*x)+3;}else{x = x+1;y = y-1;p = p+(2*x)-(2*y)+1;}putpixel(xc+x,yc+y,WHITE); //4delay(20);putpixel(xc+x,yc-y,WHITE);//1putpixel(xc-x,y

## Review from student

Studypool Student
" The best tutor out there!!!! "

1825 tutors are online

### Other Documents

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors