Posts

How To Draw Parachute Animation in C Or C++ (Computer Graphics)

Image
                                                                                     PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON PARACHUTE ANIMATION SOURCE CODE: #include <stdio.h> #include <conio.h> #include <graphics.h> #include <dos.h>   int main() {         /* request auto detection */         int gdriver = DETECT, gmode, err;         int i, x, y;         /* initialize graphic mode */         initgraph(&gdriver, &gmode, "C:/TURBOC3/BGI");         err = graphresult();         if (err != grOk) {                 /* er...

How To Draw Helicopter Animation in C Or C++ (Computer Graphics)

Image
                                                                                                PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON HELICOPTER ANIMATION SOURCE CODE: #include<conio.h> #include<graphics.h> #include<dos.h> //Animation void Helicopter(); void Go(); void main() {   clrscr();   int gd=DETECT, gm;   initgraph(&gd, &gm,"C://TC//BGI");   Go();   Helicopter();   getch();   closegraph(); } //This Go is only to make it stand for some time  void Go(){ //...........     For Background   .........  for(int l=0;l<50;l++){   int b=0;                ...

How To Draw Cosine Wave Animation in C Or C++ (Computer Graphics)

Image
                                                                                          PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON COSINE 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);  /* generate a sine wave */  for(x = 0; x < getmaxx(); x+=3) {        /* calculate y value given x */      y = 50*sin(angle*3.141/180);      y = getmaxy()...

How To Draw Bar Chart Animation in C Or C++ (Computer Graphics)

Image
    PROJECT BY (SIMPLIFY LEARN PROGRAMMING) ON BAR CHART ANIMATION SOURCE CODE: #include <graphics.h> #include <conio.h> int main() {    int gd = DETECT, gm;      initgraph(&gd, &gm, "C:\\TC\\BGI");      setcolor(YELLOW);    rectangle(0,30,639,450);    settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2);    setcolor(WHITE);    outtextxy(275,0,"Bar Chart");      setlinestyle(SOLID_LINE,0,2);      line(100,420,100,60);    line(100,420,600,420);    line(90,70,100,60);    line(110,70,100,60);    line(590,410,600,420);    line(590,430,600,420);      outtextxy(95,35,"Y");    outtextxy(610,405,"X");    outtextxy(85,415,"O");      setfillstyle(LINE_FILL,BLUE);    bar(150,100,200,419); outtextxy(160,419...

How To Draw Scenery Animation in C or C++ (Computer Graphics)

Image
    PROJECT BY (SIMPLIFY LEARN PROGRAMMING)  ON SCENERY ANIMATION SOURCE CODE: #include<iostream.h> #include<conio.h> #include<graphics.h> #include<dos.h> void main() { int gd=DETECT,gm,i; initgraph(&gd,&gm,"C:\\TC\\BGI");                         //Write the Path of BGI Folder   //a,b,c,d are used for Translation int a=200, b=-190; int c=200, d=-190;   //x,y,m,n are used for Scaling.   float x=0.5, y=0.5; float m=0.5, n=0.5; for(i=0;i<=500;i++) {   //================================= 3 CLOUDS ===============================// //================================= MIDDLE CLOUD ===========================//   ellipse(200,30,60,240,10,15); ellipse(225,20,345,165,20,15); ellipse(262,27,340,160,20,15); ellipse(268,42,230,50,20,10); ellipse(226,46,163,340...

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

Image
    PROJECT BY (SIMPLIFY LEARN PROGRAMMING)    ON CAPTCHA ANIMATION SOURCE CODE: #include <stdlib.h> #include <dos.h> #include<conio.h> #include <graphics.h> int main() {   int i = 0, key, n, x, gd = DETECT, gm;   char a[10];     initgraph(&gd, &gm, "C:\\TC\\BGI");     x = getmaxx()/2;     settextstyle(DEFAULT_FONT, HORIZ_DIR, 5);   settextjustify(CENTER_TEXT, CENTER_TEXT);   setcolor(GREEN);   outtextxy(x, 20, "CAPTCHA");   settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);   outtextxy(x, 125, "Press any key to change the generated \"captcha\"");   outtextxy(x, 150, "Press escape key to exit...");     setcolor(WHITE);   setviewport(100, 200, 600, 400, 1);   setcolor(RED);   randomize();     while (1)   {     while (i < 6)     {       n = random(3);         if (n == 0)   ...