C语言动画程序源码.docx

  1. 1、本文档共6页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
C语言动画程序源码

C语言动画程序#include math.h #include stdio.h #include graphics.h #include dos.h #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;i10000;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;i360.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))*180/pi)-90.0; drawline(xo,yo,a2,t

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档