凸轮程序的设计

上传人:灯火****19 文档编号:20559743 上传时间:2021-03-29 格式:DOC 页数:4 大小:30.51KB
返回 下载 相关 举报
凸轮程序的设计_第1页
第1页 / 共4页
凸轮程序的设计_第2页
第2页 / 共4页
凸轮程序的设计_第3页
第3页 / 共4页
点击查看更多>>
资源描述
习题4-1凸轮轮廓曲线的程序设计10级机制班 丁林森 2010001630211、 C语言程序/各字母含义 e偏距、基圆半径ro、滚子半径rt、行程h、推程运动角phi1、远休止角phis、回程、运动角phi_1,近休止角phi_s#include #include #define PI 3.1415926 void main() double e=10.0,ro=40.0,rt=10.0,h=20.0,phi1=150.0,phis=30.0,phi_1=120.0,phi_s=60; double s, alp73,x73,y73,x1,y1,xr73,yr73; double ic,ic1,ic2,ic3,ic4,so,s1,cop,sip,phi,gam,bel,del=5.0,q,t; int i; gam=phi1+phis; bel=phi1+phis+phi_1; ic=(int)(360.0/del); ic1=(int)(phi1/del); ic2=(int)(gam/del); ic3=(int)(phi1+phis+phi_1/2.0)/del); ic4=(int)(bel/del); so=sqrt(ro*ro-e*e); printf( No deg x/mm y/mm X/mm Y/mm radn); for(i=0;i=ic;i+) / phi=i*del*PI/180.0; cop=cos(phi); sip=sin(phi); if(i=ic1) s=h/2.0*(1.0-cos(180.0*phi/phi1); s1=h*PI*sin(180.0*phi/phi1)/2.0/phi1; x1=-(s+so)*sip+s1*cop-e*cop; y1=(s+so)*cop+s1*sip-e*sip; else if(i=ic2) s=h; s1=0; x1=-(s+so)*sip-e*cop; y1=(so+s)*cop-e*sip; else if(i=ic3) s=h-2.0*h*(phi-gam)*(phi-gam)/phi_1/phi_1; s1=-4.0*h*(phi-gam)/phi_1/phi_1; x1=s1*cop-(s+so)*sip-e*cop; y1=s1*sip+(so+s)*cop-e*sip; else if(i=ic4) s=2.0*h*(bel-phi)*(bel-phi)/phi_1/phi_1; s1=-4.0*h*(bel-phi)/phi_1/phi_1; x1=s1*cop-(so+s)*sip-e*cop; y1=s1*sip+(so+s)*cop-e*sip; else s=0; s1=0; x1=-(s+so)*sip-e*cop; y1=so*cop-e*sip; t=fabs(s1-e); alpi=atan2(t,(s+so); q=rt/sqrt(x1*x1+y1*y1); / xi=(s+so)*cop-e*sip; yi=(s+so)*sip+e*cop; xri=xi-q*y1; yri=yi+q*x1; phi=i*del; printf(n%2d%12.3f%12.3f%12.3f%12.3f%12.3f%12.3f,i+1,phi,xi,yi,xri,yri,alpi); 2、 计算结果No deg x/mm y/mm X/mm Y/mm rad 1 0.000 38.730 10.000 29.047 7.500 0.253 2 5.000 37.765 13.342 28.335 10.016 0.252 3 10.000 36.620 16.611 27.509 12.490 0.250 4 15.000 35.295 19.810 26.567 14.929 0.248 5 20.000 33.786 22.939 25.502 17.339 0.245 6 25.000 32.089 25.997 24.304 19.721 0.242 7 30.000 30.195 28.980 22.960 22.076 0.238 8 35.000 28.094 31.879 21.458 24.398 0.234 9 40.000 25.776 34.682 19.782 26.677 0.230 10 45.000 23.230 37.372 17.919 28.899 0.226 11 50.000 20.449 39.927 15.855 31.044 0.221 12 55.000 17.426 42.321 13.581 33.090 0.216 13 60.000 14.160 44.525 11.089 35.008 0.212 14 65.000 10.652 46.506 8.379 36.768 0.207 15 70.000 6.912 48.229 5.452 38.336 0.203 16 75.000 2.953 49.658 2.318 39.678 0.198 17 80.000 -1.205 50.755 -1.008 40.757 0.194 18 85.000 -5.534 51.487 -4.504 41.540 0.190 19 90.000 -10.000 51.820 -8.142 41.994 0.187 20 95.000 -14.564 51.725 -11.887 42.090 0.184 21 100.000 -19.178 51.177 -15.700 41.802 0.181 22 105.000 -23.793 50.159 -19.534 41.111 0.178 23 110.000 -28.352 48.659 -23.341 40.005 0.176 24 115.000 -32.798 46.673 -27.068 38.477 0.174 25 120.000 -37.070 44.208 -30.661 36.532 0.172 26 125.000 -41.109 41.275 -34.065 34.178 0.171 27 130.000 -44.856 37.900 -37.226 31.435 0.170 28 135.000 -48.253 34.111 -40.094 28.330 0.169 29 140.000 -51.250 29.950 -42.620 24.898 0.169 30 145.000 -53.800 25.463 -44.762 21.182 0.168 31 150.000 -55.862 20.705 -46.485 17.229 0.169 32 155.000 -57.453 15.757 -47.810 13.112 0.169 33 160.000 -58.608 10.690 -48.770 8.896 0.169 34 165.000 -59.317 5.541 -49.360 4.611 0.169 35 170.000 -59.574 0.350 -49.574 0.291 0.169 36 175.000 -59.378 -4.843 -49.411 -4.030 0.169 37 180.000 -58.730 -10.000 -48.872 -8.321 0.169 38 185.000 -57.635 -15.081 -47.960 -12.549 0.169 39 190.000 -56.072 -20.041 -46.656 -16.673 0.169 40 195.000 -54.109 -24.851 -45.023 -20.675 0.169 41 200.000 -51.736 -29.472 -43.049 -24.520 0.169 42 205.000 -48.969 -33.868 -40.746 -28.177 0.169 43 210.000 -45.829 -38.007 -38.134 -31.620 0.169 44 215.000 -42.341 -41.855 -35.232 -34.823 0.169 45 220.000 -38.530 -45.385 -32.061 -37.759 0.169 46 225.000 -34.427 -48.569 -28.647 -40.409 0.169 47 230.000 -30.062 -51.383 -25.015 -42.750 0.169 48 235.000 -25.468 -53.806 -21.193 -44.766 0.169 49 240.000 -20.680 -55.819 -17.210 -46.441 0.169 50 245.000 -7.306 -39.330 -5.481 -29.498 0.253 51 250.000 -3.867 -39.862 -2.896 -29.909 0.252 52 255.000 -0.379 -40.051 -0.278 -30.052 0.252 53 260.000 3.113 -39.934 2.342 -29.964 0.252 54 265.000 6.581 -39.513 4.944 -29.648 0.252 55 270.000 10.000 -38.792 7.510 -29.107 0.252 56 275.000 13.343 -37.775 10.019 -28.343 0.252 57 280.000 16.585 -36.470 12.451 -27.365 0.252 58 285.000 19.701 -34.888 14.790 -26.177 0.252 59 290.000 22.668 -33.041 17.016 -24.791 0.252 60 295.000 25.462 -30.942 19.113 -23.216 0.252 61 300.000 28.063 -28.607 21.065 -21.463 0.252 62 305.000 30.406 -25.990 22.805 -19.492 0.253 63 310.000 32.555 -23.241 24.417 -17.431 0.253 64 315.000 34.457 -20.315 25.843 -15.236 0.253 65 320.000 36.097 -17.235 27.072 -12.926 0.253 66 325.000 37.461 -14.023 28.096 -10.517 0.253 67 330.000 38.541 -10.705 28.906 -8.028 0.253 68 335.000 39.327 -7.305 29.495 -5.479 0.253 69 340.000 39.814 -3.849 29.861 -2.887 0.253 70 345.000 39.998 -0.365 29.999 -0.274 0.253 71 350.000 39.878 3.123 29.908 2.342 0.253 72 355.000 39.454 6.586 29.591 4.940 0.253 73 360.000 38.730 10.000 29.047 7.500 0.253
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 其他分类 > 其它学术


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!