#include<stdio.h>#include<math.h>#include<windows.h>#include<tchar.h>#define _UNICODE _UNICODE floatf(floatx,floaty,floatz)
{
floata=x*x+9.0/4.0*y*y+z*z-1;
returna*a*a-x*x*z*z*z-9.0/80.0*y*y*z*z*z;
}
floath(floatx,floatz)
{
for(floaty=1.0; y>=0.0; y-=0.001)
if(f(x,y,z)<=0.0)
returny;
return0.0;
}
intmain()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),0x0C);
HANDLEo=GetStdHandle(STD_OUTPUT_HANDLE);
_TCHARbuffer[25][80] = { _T(' ') };
_TCHARramp[] =_T(".:-=+*#%@");
intcount=0;
intcount1=0;
system("color F4");
for (floatt=0.0f;; t+=0.1f) {
intsy=0;
floats=sinf(t);
floata=s*s*s*s*0.2f;
for (floatz=1.3f; z>-1.2f; z-=0.1f) {
_TCHAR*p=&buffer[sy++][0];
floattz=z* (1.2f-a);
for (floatx=-1.5f; x<1.5f; x+=0.05f) {
floattx=x* (1.2f+a);
floatv=f(tx, 0.0f, tz);
if (v<=0.0f) {
floaty0=h(tx, tz);
floatny=0.01f;
floatnx=h(tx+ny, tz) -y0;
floatnz=h(tx, tz+ny) -y0;
floatnd=1.0f/sqrtf(nx*nx+ny*ny+nz*nz);
floatd= (nx+ny-nz) *nd*0.5f+0.5f;
*p++=ramp[(int)(d*5.0f)];
} else*p++=' ';
}
}
for (sy=0; sy<25; sy++) {
COORDcoord= { 0, sy };
SetConsoleCursorPosition(o, coord);
WriteConsole(o, buffer[sy], 79, NULL, 0);
}
if(count<=10) {
printf("I Love You ———.Mua~\n") ;
printf(" By ----");
count++;
} else {
printf("You Are My Best Lover.\n");
printf(" zyc");
count++;
if(count>=20) {
count=0;
}
}
Sleep(33);
}
}