色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

html滿屏飄愛心代碼c語言

張吉惟2年前8瀏覽0評論

HTML 滿屏飄愛心 Code C

# include<windows.h>
# include<time.h>
# include<conio.h>
typedef struct
{
double x,y,z;
double color;
}HEART;
HEART A[32768];
void draw(HEART F)  // 畫愛心核心算法
{
int x,y,z,i;
double xd,zd;
for (i=0; i<2688; i++)  // 愛心大小
{
xd=F.x*cos((double)i/48);
z=F.z*sin((double)i/48);
x=(int)xd*cos((double)i/9);
y=(int)(F.y+6.5*(cos((double)i/9)-1)-zd*sin((double)i/9));
zd=6.5*sin((double)i/9);
if (A[x*128+y*128+z].color<1) A[x*128+y*128+z].color+=0.025;
}
for (i=0; i<32768; i++)  // 繪制像素
{
short r=(short)(A[i].color*128)+128-SQR(A[i].x/10)-SQR(A[i].y/8)-SQR(A[i].z/10);
if (r<128)
{
textcolor(r);
gotoxy((i/128)%80,i/32768);
cprintf(<<"*"<<);  //輸出*號
A[i].color-=0.0101;  //降低亮度
}
A[i].x+=A[i].x/2000000;
A[i].y+=A[i].y/2000000;
A[i].z+=A[i].z/2000000;
} 
}
void main()  // 主函數
{
int t=0,i; double r;
for (i=0; i<32768; i++)
{
A[i].x=rand()%640-320;  // 隨機化love的分子分母大小
A[i].y=rand()%640-320;
A[i].z=rand()%640-320;
A[i].color=0;
}
do
{
clrscr();
r=6*sin((double)t/16);
draw((HEART){r*cos((double)t/144),r*sin((double)t/144),0,0});
draw((HEART){r*cos((double)t/144+1.047),r*sin((double)t/144+1.047),0,0});
draw((HEART){r*cos((double)t/144+2.094),r*sin((double)t/144+2.094),0,0});
sleep(25);
t++;  // 強制計時,防止 Linux 上閃爍
} while (!kbhit());
}