VB icon

animation1

Email
Submitted on: 1/5/2015 2:14:00 AM
By: developer_x (from psc cd)  
Level: Advanced
User Rating: By 5 Users
Compatibility: C++ (general)
Views: 856
 
     it is just a simple but exquisite animation.
 

INCLUDE files:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
//INCLUDE files for :animation1
//**************************************
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: animation1
// Description:it is just a simple but exquisite animation.
// By: developer_x (from psc cd)
//
// Inputs:it is made with help of ellipses,for and while loops.
//**************************************

include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int d=DETECT,m;
float j=0,k=0,x1=0,x2=559,y1=0,y2=479,i=0;
initgraph(&d,&m,"");
cleardevice();
while(!kbhit())
{
j=0;i=0;
for(i=0;i<113;i+=.5)
{
setcolor(15);
ellipse(320,240,0,180,111-i,111+i); //closing pearl
ellipse(320,240,180,360,111+i,111-i);
setcolor(2);
ellipse(320,240,180,360,111-i,111+i);
ellipse(320,240,0,180,111+i,111-i);
delay(1);
}
for(i=0;i<113;i+=.5)
{
setcolor(2);
ellipse(320,240,0,180,111-i,111+i); //closing pearl
ellipse(320,240,180,360,111+i,111-i);
setcolor(15);
ellipse(320,240,0,180,111+i,111-i);
ellipse(320,240,180,360,111-i,111+i);
delay(1);
}
}
getch();
}


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.