Posts

How To Create Simple Mickey Mouse Animation in C Or C++ (Computer Graphics)

Image
                                                                                          PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON MICKEY MOUSE ANIMATION SOURCE CODE: #include<graphics.h> #include<conio.h> void main() {     int gd=0,gm=0;     initgraph(&gd,&gm,"C:\\TC\\BGI");     setcolor(7);     circle(150,150,20);     circle(210,150,20);     circle(180,212,50);     ellipse(170,212,60,180,20,40);     ellipse(190,212,0,120,20,40);     ellipse(140,248,60,120,20,40);     ellipse(220,248,60,120,20,40);     ellipse(172,200,0,360,6,15);     ellipse(188,200,0,360,6,15);     ellipse(182,220,10,160,12,6);     ellipse(182,225,0,360,12,6);     ellipse(182,225,195,345,25,30);     ellipse(182,225,195,345,25,20);     ellipse(172,208,0,360,2,6);     ellipse(188,208,0,360,2,6);     getch(); }

How To Create Tan Graph Animation in C Or C++ (Computer Graphics)

Image
                                                                                         PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON TAN GRAPH ANIMATION SOURCE CODE: #include<conio.h> #include<math.h> #include<graphics.h> #include<dos.h> void main() { int gd=DETECT,gm; int angle=0; double x,y; initgraph(&gd,&gm,"C:\\TC\\BGI"); line(0,getmaxy()/2,getmaxx(),getmaxy()/2); for(x=0;x<getmaxx();x++) { y=50*tan(angle*3.141/180); y=getmaxy()/2-y; putpixel(x,y,15); delay(50); angle+=2; } getch(); closegraph(); }

How To Create Stars In Night Sky Animation in C Or C++ (Computer Graphics)

Image
                                                                                        PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON STARS IN NIGHT SKY ANIMATION SOURCE CODE: #include<conio.h> #include<graphics.h> #include<dos.h> #include<stdlib.h> void main() { int gd=DETECT,gm; int i,x,y; initgraph(&gd,&gm,"C:\\TC\\BGI"); while(!kbhit()) { for(i=0;i<500;i++) { x=rand()%getmaxx(); y=rand()%getmaxy(); putpixel(x,y,15); } delay(500); cleardevice(); } getch(); closegraph(); }

How To Create Smiley Face Animation in C Or C++ (Computer Graphics)

Image
                                                                                         PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON SMILEY FACE ANIMATION SOURCE CODE: #include<graphics.h> #include<conio.h> #include<stdlib.h> void main() {    int gd = DETECT, gm, area, temp1, temp2, left = 25, top = 75;    void *p;    initgraph(&gd,&gm,"..\\bgi");    setcolor(YELLOW);    circle(50,100,25);    setfillstyle(SOLID_FILL,YELLOW);    floodfill(50,100,YELLOW);    setcolor(RED);    setfillstyle(SOLID_FILL,RED);    fillellipse(44,85,2,6);    fillellipse(56,85,2,6);    ellipse(50,100,205,335,20,9);    ellipse(50,100,205,335,20,10);    ellipse(50,100,205,335,20,11);    area = imagesize(left, top, left + 50, top + 50);    p = malloc(area);    setcolor(WHITE);    settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2);    outtextxy(155,451,"Smiling Face Animation");    setcolor(BLUE);    rectangle(0,0,639,449);    while(!kbhit())    {       temp1 = 1 + random ( 588 )

How To Create Pie Chart With Value Enter By User Animation in C Or C++ (Computer Graphics)

Image
                                                                                         PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON PIE CHART WITH VALUE ENTER BY USER ANIMATION SOURCE CODE: #include<stdio.h> #include<graphics.h> #include<conio.h> #include<dos.h> #include<stdlib.h> void main() { int gd=DETECT,gm; float x=0,y=0,tm,m; int c=1,n=5; initgraph(&gd,&gm,"C:\\TC\\BGI"); setcolor(BLUE); pieslice(300,250,0,360,100); printf("Enter Total Marks:"); scanf("%f",&tm); while(n>0) { printf("Enter Marks:"); scanf("%f",&m); setfillstyle(1,c); c++; y=y+((m/tm)*360); pieslice(300,250,x,y,100); x=y; n--; } getch(); closegraph(); }

How To Create Pie Chart Animation in C Or C++ (Computer Graphics)

Image
                                                                                         PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON PIE CHART ANIMATION SOURCE CODE: #include<graphics.h> #include<conio.h> void main() { int gd = DETECT, gm, midx, midy; initgraph(&gd, &gm, "C:\\TC\\BGI"); settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2); setcolor(WHITE); outtextxy(275,80,"PIE CHART"); midx = getmaxx()/2; midy = getmaxy()/2; setfillstyle(LINE_FILL,BLUE); pieslice(midx, midy, 0, 75, 100); setfillstyle(XHATCH_FILL,RED); pieslice(midx, midy, 75, 225, 100); setfillstyle(WIDE_DOT_FILL,GREEN); pieslice(midx, midy, 225, 360, 100); getch(); }

How To Create Sine Wave Animation in C Or C++ (Computer Graphics)

Image
                                                                                         PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON SINE WAVE ANIMATION SOURCE CODE: #include<conio.h> #include<math.h> #include<graphics.h> #include<dos.h> void main() { int gd=DETECT,gm; int angle=0; double x,y; initgraph(&gd,&gm,"C:\\TC\\BGI"); line(0,getmaxy()/2,getmaxx(),getmaxy()/2); for(x=0;x<getmaxx();x+=3) { y=50*sin(angle*3.141/180); y=getmaxy()/2-y; putpixel(x,y,15); delay(100); angle+=5; } getch(); closegraph(); }