没事闲着做的东西,请高手不要见笑:
#include <time.h>
#include <math.h>
#include <graphics.h>
main()
{
float i,x,y;
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
for(i=0;i<660;i+=.01)
{
x=cos(i/5)*50+log(i+2)*sin(pow(i,0.5))*20+300;
y=sin(i/5)*50+log(i+2)*cos(pow(i,0.5))*20+230;
putpixel(x,y,12);
delay(100);
if(kbhit())exit(0);
}
getch();
}
-------------------------------
#include <time.h>
#include <math.h>
#include <graphics.h>
main()
{
float i,x,y;
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
for(i=0;i<660;i+=.01)
{
x=cos(i/5)*50+log(i+2)*sin(pow(i,0.5))*20+300;
y=sin(i/5)*50+log(i+2)*cos(pow(i,0.5))*20+230;
putpixel(x,y,12);
delay(100);
if(kbhit())exit(0);
}
getch();
}
--------------------------------
#include <time.h>
#include <math.h>
#include <graphics.h>
main()
{
float i,x,y;
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
for(i=0;i<660;i+=.01)
{
x=(pow(i,0.75)*cos(i/5)+pow(i,0.75)*sin(i/5))*sin(i/100)+300;
y=(pow(i,0.75)*cos(i/5)+pow(i,0.75)*sin(i/5))*cos(i/100)+230;
putpixel(x,y,12);
delay(10);
if(kbhit())exit(0);
}
getch();
}
无意间画出来的
感觉挺有意思的
不知道谁还有其他有意思的函数曲线
让大家分享一下!