无聊的,来看看这个加速球,速度很快时会有很多奇怪事发生。。…
easyx吧
全部回复
仅看楼主
level 8
Sail丶Man 楼主
———比较喜欢这一类———
# include <stdio.h>
# include <graphics.h>
# include <conio.h>
# include <math.h>
int main(void)
{initgraph(640,480);
float a = 0,c=20;
int x, y; char b;char z[30]="按任意键可加速,按ESC退出";
setwritemode(R2_XORPEN);
BeginBatchDraw();
setlinestyle(PS_SOLID | PS_JOIN_BEVEL, 5);
setcolor(GREEN);
outtextxy(430,3,z);
while(1)
{setcolor(GREEN);
x = 320 + 100 * cos( a / 300 );
y = 240 + 100 * sin( a / 300 );
line(320,240,x,y);setcolor(BLACK);
x = 320 + 100 * cos( a / 300 );
y = 240 + 100 * sin( a / 300 );
line(320,240,x,y);setcolor(RED);
x = 320 + 200 * cos( a / 300 );
y = 240 + 200 * sin( a / 300 );
line(320,240,x,y);FlushBatchDraw();
setcolor(BLACK);
x = 320 + 200 * cos( a / 300 );
y = 240 + 200 * sin( a / 300 );
line(320,240,x,y);
a=a+c;
if(kbhit())
{c+=62.141592;
if((b = getch())==27)return 0;
}}}
2013年08月17日 11点08分 1
吧务
level 11
2013年08月21日 15点08分 2
有BestAns的支持 我还会写更多的程序出来![哈哈]
2013年08月22日 04点08分
1