Showing posts with label ellipse function in c. Show all posts
Showing posts with label ellipse function in c. Show all posts

Friday, April 23, 2021

, , , ,

ellipse function in C programming

 ellipse function in c

 Learn to Declarations ellipse function in computer graphic

 void ellipse(int x, int y, int stangle, int endangle, int xradius, int yradius)


  This function is used to draw an ellipse where (x,y) are coordinates of center of that draw ellipse, stangle is the starting angle, end angle is the ending angle,  int xradius, int yradius are parameters specifies the X and Y radius of that drawn ellipses. 

Well if you want to draw an ellipse for strangles and end angle should be 0 and 360 respectively.

Program example for ellipse function in computer graphic


#include<graphics.h>
#include<conio.h>

main()
{
   int gd = DETECT, gm;

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

   ellipse(100, 100, 0, 360, 50, 25);

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