# Arc Function - Computer Graphics CG Program

Declare :- void arc(int x, int y, int stangle, int endangle, int sweep);

curve capacity is utilized to draw a circular segment with focus (x,y) and stangle determines beginning edge, endangle details the end plot and last parameter points out the sweep of the bend. curve capacity can additionally be utilized to draw a loop yet for that beginning point and end edge ought to be 0 and 360 individually.

In the below program (100,100) are directions of middle of circular segment, 0 is the beginning plot, 135 is the end edge and 50 indicates the sweep of the curve.
#include <graphics.h>
#include <conio.h>

main()
{
int gd = DETECT, gm;

initgraph(&gd, &gm, "C:\\TC\\BGI");

arc(100, 100, 0, 135, 50);

getch();
closegraph();
return 0;
}

### 2 Comments

1. but what part that point represents arc(int,int,int,int,int)

1. Hi Deepak,

Below is the declaration of arc() function. i hope this will clear your question.

void arc(int x, int y, int stangle, int endangle, int radius);
arc function is used to draw an arc with center (x,y) and stangle specifies starting angle, endangle specifies the end angle and last parameter specifies the radius of the arc. arc function can also be used to draw a circle but for that starting angle and end angle should be 0 and 360 respectively.