鉴于大家对机械模具设计十分关注,我们编辑小组在此为大家搜集整理了“轮式装载机设计的部分程序”一文,供大家参考学习!
客服咨询,网学网竭诚为您服务,本站永久域名:myeducs.cn |
动臂、铲斗运动仿真: #include "stdio.h" #include "math.h" #include "graphics.h" #define pi 3.1415926 main() { float l1 , l2 , l3 , l4 , a , b; int x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4; int gdriver=DETECT,gmode; initgraph (&gdriver ,&gmode , "c:\\mydocuments\\tc"); cleardevice(); line(20,460,400,460); line(20,460,20,20); circle(20,230,3); circle(20,320,3); l1=sqrt(pow(119,2)+pow(130,2)); l2=sqrt(pow(210,2)+pow(230,2)); x2=(int)(12*sin(135*(pi/180))); y2=(int)(230-12*cos(135*(pi/180))); l3=sqrt(pow((250-x2),2)+pow((460-y2),2)); l4=sqrt(pow((240-x2),2)+pow((y2-430),2)); x1=(int)(l1*sin(135*(pi/180))); y1=(int)(230-l1*cos(135*(pi/180))); circle(250,460,3); circle(240,460,3); line(x2,y2,250,460); line(x2,y2,240,430); line(240,430,250,460); b=60*(pi/180); for(a=70*(pi/180);a<145*(pi/180);a+=pi/180) {cleardevice(); line (20,460,400,460); line(20,460,20,20); circle(20,230,3); circle(20,320,3); line(20,230,x1,y1); line(x1,y1,x2,y2); circle(x2,y2,3); line(20,320,x1,y1); circle(x1,y1,3); x3=x2+l3*sin(a); y3=y2+l3*cos(a); x4=x2+l4*sin(a+b); y4=y2+l4*cos(a+b); circle(x3,y3,3); circle(x4,y4,3); line(x2,y2,x3,y3); line(x2,y2,x4,y4); line(x3,y3,x4,y4); getch(); } for (a=135*(pi/180); a>50*(pi/180); a-=pi/120) { line (20,460,400,460); line (20,460,20,20); circle(20,230,3); circle(20,320,3); x1=(int)(l1*sin(a)); y1=(int)(230-l1*cos(a)); circle(x1,y1,3); line(20,320,x1,y1); line(20,230,x1,y1); x2=(int)(12*sin(a)); y2=(int)(230-12*cos(a)); circle(x2,y2,3); line(x1,y1,x2,y2); getch(); } getch(); } |
本站发布的计算机毕业设计均是完整无错的全套作品,包含开题报告+程序+论文+源代码+翻译+答辩稿PPT |
本文选自计算机毕业设计http://myeducs.cn |