c语言字符动画源码下载,C语言动画程序源码.docx

C语言动画程序源码

C语言动画程序#include #include #include #include #define pi 3.1415926535 double ca3mm1(double m1,double m2); double ca3fm1(double cosine,double sine); double ca5fm2(double a6m,double a5m,double a4m,double a4f,int shang); double ca6fm2(double a4m ,double a4f,double a5m , double a5f); char inbox(intx,inty,int x1,int y1); charbuf(); main(){ double m=3.0; double xo=100.0,yo=200.0,a1=30.0,t1=pi; double xc=xo+m*a1,yc=yo; double a2=8.0,a3,a4=25.0,a5=30.0,a6=20.0,a7=35.0; double t2,t3,t4,t5,t6,t7; double xo1=xo+m*150,yo1=yo; double xc1=xo1-m*a1,yc1=yo1; doublei,j,k; double l1; double n=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(10,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(); mybutton(500,10,"EXIT",1,7); mouseshow(); exit(0); } if(buf()==56) for(i=0;i<10000;i++){ switch (buf()){ case 18:{ mousehide(); mybutton(500,10,"EXIT",0,0); mouseshow(); delay(4000); mousehide(); mybutton(500,10,"EXIT",1,7); mouseshow(); exit(0); } case 48: { mousehide(); mybutton(10,10,"BEGIN",0,0); mouseshow(); delay(4000); mousehide(); mybutton(10,10,"BEGIN",1,7); mouseshow(); goto run; } 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*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))

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值