#include <stdio.h>
#include <math.h>
#include <unistd.h>
int main()
{
int t;
float x,y,s;
for(t=0;t<60;t++)
{
printf("\033[2J\033[1;1H");
s = 1 + 0.1f*sin(t*0.3);
for(y = 1.2f; y > -1.2f; y -= 0.15f)
{
for(x = -1.2f; x < 1.2f; x += 0.06f)
{
float nx=x/s, ny=y/s;
float a=nx*nx+ny*ny-1;
if(a*a*a - nx*nx*ny*ny*ny <=0)
printf("♥");
else printf(" ");
}
printf("\n");
}
printf("\n 遇见你我真的好幸运\n");
usleep(120000);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: