C++ Graphics Program to Draw Captain America Shield Animation in Command Line Full Project For Beginners

  • Post author:
  • Post category:c++
  • Post comments:0 Comments

 

 

main.cpp

 

 

#include<stdio.h>

#include<conio.h>

#include<dos.h>

#include<graphics.h>

#include<stdlib.h>

void star()

{

int pantagon_point[]={300,210, 350,210, 365,265, 325,295, 275,260, 300,210};

int triangle1_point[]={325,135, 350,210, 300,210, 325,135};

int triangle2_point[]={435,210, 365,265, 350,210, 435,210};

int triangle3_point[]={400,340, 365,265, 325,295, 400,340};

int triangle4_point[]={250,340, 325,295, 275,260, 250,340};

int triangle5_point[]={220,210, 275,260, 300,210, 320,210};



setcolor(11);

setfillstyle(1,15);

fillpoly(6,pantagon_point);delay(500);

fillpoly(4,triangle1_point);delay(500);

fillpoly(4,triangle2_point);delay(500);

fillpoly(4,triangle3_point);delay(500);

fillpoly(4,triangle4_point);delay(500);

fillpoly(4,triangle5_point);delay(500);

}



void circle(int r,int c)

{

setcolor(c);

circle(328.5 ,250.5,r);

setfillstyle(9,c);

floodfill(327,250,c);

delay(500);

 }



void shield()

{

circle(227,4);

circle(190,15);

circle(150,4);

circle(120,1);

star();

delay(500);

}



int main()

{

int gd=DETECT,gm;

initgraph(&gd,&gm,"c://tc//bgi");



shield();

getch();

closegraph();

return 0;

}

Leave a Reply