
#include <graphics.h>
#include <conio.h>
{
int d,m;
driver = DETECT;
int midx, midy;
initgraph(&d, &m, "d:\\tc\\bgi");
midx = getmaxx() / 2;
midy = getmaxy() / 2;
/* set fill style and draw pie slices */
setfillstyle(1, 2);
pieslice(midx,midy, 180, 210,150);
floodfill(midx,midy,15);
setfillstyle(1, 3);
pieslice(midx,midy, 110, 140,150);
floodfill(midx,midy,15);
setfillstyle(1, 4);
pieslice(midx,midy, 0, 30,150);
floodfill(midx,midy,15);
setfillstyle(1, 1);
pieslice(midx,midy, 80, 50,150);
floodfill(midx,midy,15);
setfillstyle(1, 5);
pieslice(midx,midy, 290, 320,150);
floodfill(midx,midy,15);
setfillstyle(1, 6);
pieslice(midx,midy, 235, 265,150);
floodfill(midx,midy,15);
getch();
closegraph();
}
Output :

Rotating this fan :
You will learn how to Rotate this fan in the next program.
1 comments:
This C/C++ graphics program creates a vibrant and eye-catching colorful fan with smooth animation. It’s as fun to explore visually as experimenting with the unleashed flipper zero in the tech world.
Post a Comment