TO MAKE A CURVE SOURCE CODE


#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<math.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm,erroecode;
float i;
float x=250,y=200;
float a=10,b=15,r=0;
initgraph(&gd,&gm,"c:\\tc\bgi");
while(!kbhit())
{
for(i=0;i<100;i=i+0.01)
{
setcolor(7);
r=(a*i)*sin(3*i) ;

x=200+r*cos(i);
y=200+r*sin(i);
circle(x,y,0);
delay(100);
setcolor(4);
}
}
getch();
}

Comments

Popular posts from this blog

REFLECTION OF A TRIANGLE (COMPUTER GRAPHICS)