How to make an animated Rocket in Computer Graphics ?
Here a program for make an animated Rocket...
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
void roket();
int gd=DETECT,gm=0;
initgraph(&gd,&gm,"c:\\tc\\bgi");
roket();
getch();
}
void roket()
{
for(int i=0;i<300;i++)
{
line(250,250-i,250,400-i);
line(320,250-i,320,400-i);
ellipse(285,260-i,0,360,35,10);
ellipse(285,400-i,0,360,35,10);
setfillstyle(SOLID_FILL,12);
fillellipse(285,260-i,35,10);
fillellipse(285,400-i,35,10);
setcolor(6);
settextstyle(SMALL_FONT,VERT_DIR,8);
outtextxy(268,269-i,"PRITHIVI");
setcolor(WHITE);
line(250,250-i,250,200-i);
line(320,250-i,320,200-i);
line(250,200-i,285,150-i);
line(320,200-i,285,150-i);
line(250,200-i,320,200-i);
line(260,200-i,285,165-i);
line(310,200-i,285,165-i);
line(270,200-i,285,175-i);
line(300,200-i,285,175-i);
line(280,200-i,285,185-i);
line(290,200-i,285,185-i);
line(260,200-i,260,252-i);
line(270,200-i,270,251-i);
line(280,200-i,280,250-i);
line(290,200-i,290,250-i);
line(300,200-i,300,251-i);
line(310,200-i,310,252-i);
line(250,400-i,220,450-i);
line(320,400-i,350,450-i);
line(220,450-i,350,450-i);
clearviewport();
delay(60);
}
}
Output : Watch video for output...