#include#include#include#definepi3.1415926535doubleca3mm1(doublem1,do">
C語言動畫程序源碼

C語言動畫程序源碼

ID:43463553

大小:16.70 KB

頁數(shù):6頁

時間:2019-10-03

C語言動畫程序源碼_第1頁
C語言動畫程序源碼_第2頁
C語言動畫程序源碼_第3頁
C語言動畫程序源碼_第4頁
C語言動畫程序源碼_第5頁
資源描述:

《C語言動畫程序源碼》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。

1、C語言動畫程序#include#include#include#include#definepi3.1415926535doubleca3mm1(doublem1,doublem2);doubleca3fm1(doublecosine,doublesine);doubleca5fm2(doublea6m,doublea5m,doublea4m,doublea4f,intshang);doubleca6fm2(doublea4m,doublea4f,doublea

2、5m,doublea5f);charinbox(intx,inty,intx1,inty1);charbuf();main(){doublem=3.0;doublexo=100.0,yo=200.0,a1=30.0,t1=pi;doublexc=xo+m*a1,yc=yo;doublea2=8.0,a3,a4=25.0,a5=30.0,a6=20.0,a7=35.0;doublet2,t3,t4,t5,t6,t7;doublexo1=xo+m*150,yo1=yo;doublexc1=xo1-m*a1,yc1=yo1;doublei

3、,j,k;doublel1;doublen=116.1,nt;initscreen();setfillstyle(SOLID_FILL,DARKGRAY);bar(0,0,640,480);mybutton(10,10,"BEGIN",1,0);mybutton(500,10,"EXIT",1,0);line(0,69,640,69);mouseinit();changemousecross();setmousexy(320,20);mouseshow();setmousearea(0,0,640,60);do{if(inbox(1

4、0,10,70,26)&&button()==1){mousehide();mybutton(10,10,"BEGIN",0,0);mouseshow();mousehold();mousehide();mybutton(10,10,"BEGIN",1,7);mouseshow();break;}if(inbox(500,10,555,26)&&button()==1){mousehide();mybutton(500,10,"EXIT",0,0);mouseshow();mousehold();mousehide();mybutt

5、on(500,10,"EXIT",1,7);mouseshow();exit(0);}if(buf()==56)for(i=0;i<10000;i++){switch(buf()){case18:{mousehide();mybutton(500,10,"EXIT",0,0);mouseshow();delay(4000);mousehide();mybutton(500,10,"EXIT",1,7);mouseshow();exit(0);}case48:{mousehide();mybutton(10,10,"BEGIN",0,

6、0);mouseshow();delay(4000);mousehide();mybutton(10,10,"BEGIN",1,7);mouseshow();gotorun;}default:break;}}}while(1);run:drawjijia(xo,yo,1);drawjijia(xc,yc,1);drawjijia(xo1,yo1,1);drawjijia(xc1,yc1,1);setwritemode(1);do{for(i=0;i<360.0;i+=1.0){t2=i;a3=ca3mm1(a1*cos(t1)+a2

7、*cos(t2*pi/180.0),a1*sin(t1)+a2*sin(t2*pi/180.0));t3=ca3fm1(a1*cos(t1)+a2*cos(t2*pi/180.0),a1*sin(t1)+a2*sin(t2*pi/180.0));a4=a3;t4=t3;t5=ca5fm2(a6,a5,a4,t4,0);t6=ca6fm2(a4,t4,a5,t5);t7=t6-90.0;l1=xc1-xc-2*m*a7*cos(t7*pi/180);nt=(asin(l1/2/(n/2))*180/pi)-90.0;drawline(

8、xo,yo,a2,t2,m,LIGHTGRAY);drawline(xo+m*a2*cos(t2*pi/180),yo-m*a2*sin(t2*pi/180),a5,t5,m,LIGHTGRAY);drawline(xc,yc,a6,

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動畫的文件,查看預(yù)覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負(fù)責(zé)整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡(luò)波動等原因無法下載或下載錯誤,付費(fèi)完成后未能成功下載的用戶請聯(lián)系客服處理。