FOLIUM OF DESCARTES


#include"graphics.h"
#include"math.h"
main()
{
int gd=DETECT,gm,x,y,i,j;
float a;
initgraph(&gd,&gm,"c:\\tc\\bgi");
setcolor(RED);
x=getmaxx()/2;
y=getmaxy()/2;
line(x,0,x,480);
line(0,y,640,y);
setcolor(LIGHTMAGENTA);
outtextxy(20,20,"FOLIUM OF DESCARTES");
for(a=0;a<3.3;a+=0.001)
{
putpixel(x+100*sin(a)*cos(a)*cos(a)/(pow(sin(a),3)+pow(cos(a),3)),y+100*sin(a)*cos(a)*sin(a)/(pow(sin(a),3)+pow(cos(a),3)),LIGHTBLUE);
delay(100);
}
getch();
closegraph();
}

Go to the programs pageclick here!!

Hosted by www.Geocities.ws

1